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

Dominik 'Rathann' Mierzejewski dominik at greysector.net
Thu Feb 18 14:57:21 CET 2016


On Thursday, 18 February 2016 at 14:39, Mark Abraham wrote:
> Hi,
> Yes, perhaps that call to check_library_exists can be improved, e.g. by
> setting CMAKE_REQUIRED_LIBRARIES for the check (see
> https://cmake.org/cmake/help/v3.0/module/CheckLibraryExists.html). However,
> it is awkward to do a good job here, because libxml2 only requires zlib if
> the former was configured that way, so we have a fairly large number of
> conditions to handle in constructing our handling (shared/static, whether
> either was found, whether libxml2 needs zlib or not, whether test binaries
> need to be built, etc.).

I'd suggest checking if a test binary links against the detected libxml2
successfully. I'm not sure if that cmake check does that. Also, the
libxml2 copy that I have has a .pc file, which means you can get the
necessary libraries to link using pkg-config.

> Roland suggested https://gerrit.gromacs.org/#/c/5630/2 but I am not sure if
> it is related.

> Alternatively/also, since currently the only use for XML handling in master
> branch is for test reference data, I have uploaded
> https://gerrit.gromacs.org/#/c/5653/ to replace this use of libxml2 with a
> bundled copy of tinyxml2, as part of http://redmine.gromacs.org/issues/1908 so
> that we get rid of such problematic external dependencies. These have been
> causing grief lately for users on BG/Q machines. I suggest we keep libxml2
> detection and handling present but inactive while the future of various
> patches in Gerrit gets resolved.

Please retain the option to use system copy of tinyxml. It's widely
available in various Linux distributions and bundling leads to security
issues and bloat. If you do start bundling tinyxml, I'll have to
unbundle and link against system library anyway, according to Fedora
Packaging Guidelines.

Dominik (Fedora maintainer of GROMACS package)
Fedora http://fedoraproject.org/wiki/User:Rathann
RPMFusion http://rpmfusion.org
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"

More information about the gromacs.org_gmx-developers mailing list