[tlbuild] linking against expat ... why
peb at mppmu.mpg.de
Tue Sep 15 16:06:05 CEST 2009
On Wed, 26 Aug 2009, Vladimir Volovich wrote:
> "NP" == Norbert Preining writes:
> NP> Hi everyone, maybe one of you can help me. I am investigating why
> NP> on earth xetex is linked to libexpat while it does definitely NOT
> NP> use any symbols directly, but only via usage of libfontconfig.
> NP> Anyone of you?
> some shared library dependencies shown by "ldd" are indirect, caused by
> other shared libraries (e.g. libfontconfig).
> could you run
> strings -a xetex | grep '\.so'
> to see which are the direct shared library dependencies?
Hi Vladimir, Norbert,
(1) On systems using ELF (e.g., linux) or on Solaris (I think),
objdump -p xetex
should give you the same info.
(2) This is at least in parts a libtool problem. When linking against
libfontconfig libtool tries to locate a libfontconfig.la file which contains
among many other things a list of libraries libfontconfig depends on.
If such a file is found libtool (recursively) adds these additional libraries
to the command line and the resulting executable will depend explicitly on
them. This is needed on some systems that do not encode these dependencies
into the shared libraries.
Many distros choose not to install the .la files. IMHO that is a mistake but
in the present situation to our advantage. If no .la file is found libtool
does not add further libraries to the command line and the executable will
not depend explicitly on libexpat, only implicitly through libfontconfig.
However, on systems that do not encode these dependencies into the shared
libraries either the link step or the resulting executable will fail with
Peter Breitenlohner <peb at mppmu.mpg.de>
More information about the tlbuild