GNOME Bugzilla – Bug 707545
xml2-config doesn't report lzma as dependency
Last modified: 2017-09-07 18:01:15 UTC
As of 2.8.0, libXML2 depends on LZMA (bug #659404), but "xml2-config --libs" doesn't report as so. Normally, that wouldn't make much difference, since if the xml2 package is installed, so is lzma, or if libxml2 is compiled successfully, so was lzma. But when the libraries are copied by hand, as it happens during cross-compilation, build systems (such as CMake), that rely on that output, don't get the correct dependency, and the link process fails. With current GNU linker (as of 2.21) requiring explicit dependencies, it'd be good if xml2-config could report lzma as a library to include in the linker command-line. I'm currently adding the -llzma myself as an additional library in CMake, but that's not ideal.
Fixed in 2016 with https://git.gnome.org/browse/libxml2/commit/?id=2e354d7432dd4fd946328c242ff5289d9bfb3ce9