[gmx-developers] issues with libxml detection issues with GMX_BUILD_UNITTESTS=ON

Szilárd Páll pall.szilard at gmail.com
Wed Feb 10 16:37:31 CET 2016



-- Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.a
-- Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.a - found
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.a (found version "2.9.1")
-- Looking for xmlTextWriterEndAttribute in /usr/lib/x86_64-linux-gnu/libxml2.a
-- Looking for xmlTextWriterEndAttribute in
/usr/lib/x86_64-linux-gnu/libxml2.a - not found
CMake Error at CMakeLists.txt:562 (message):
  Cannot build unit tests without libxml2.  Either set
  GMX_BUILD_UNITTESTS=OFF or tell CMake how to find a working version of

Even though both libz and libxml are detected, the
xmlTextWriterEndAttribute lib test fails to link as the
check_library_exists() does not pass -lz.

I vaguely remember some discussion around it so I thought I'd ask
whether this is a known issue before filing a report.

Are there any simple workarounds for this? (I tried passing -lz in the
linker flags, but that does not help).
Could we provide a better hint in the error?


More information about the gromacs.org_gmx-developers mailing list