DCMTK 3.6.2 compilation fails when creating static binaries due to libxml2 dependency
Compilation of DCMTK 3.6.2 static binaries on Linux, i.e. with
LDFLAGS = -static, fails when libxml2 support is enabled.
Apparently libxml2 depends on liblzma, so
XMLLIBS = -lxml2 -llzma is needed instead of the current
XMLLIBS = -lxml2.
For some reasone, this does not cause compile errors when libxml2 is dynamically linked.
Since libxml2 can (as far as I know) be compiled without lzma support, the preferrable solution would be to add
a configure test for the presence of liblzma. If the library is found, -llzma should be added to XMLLIBS.
#1 Updated by Jörg Riesmeier 5 months ago
- Module set to config
If static linkage is used, "xml2-config" should be called with "--static" in addition to "--libs":
> xml2-config --libs --static -lxml2 -lz -lpthread -lm
This change is at least needed for the Auoconf build systems (see "config/configure.in").