Project

General

Profile

Bug #787

DCMTK 3.6.2 compilation fails when creating static binaries due to libxml2 dependency

Added by Marco Eichelberg 5 months ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Configuration
Target version:
Start date:
2017-07-26
Due date:
% Done:

0%

Module:
config
Operating System:
Compiler:

Description

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.

History

#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").

#2 Updated by Marco Eichelberg 6 days ago

  • Target version changed from 3.6.3 to 3.6.4+

Also available in: Atom PDF