[tlbuild] xetex dependencies

Ken Moffat zarniwhoop at ntlworld.com
Thu Feb 16 02:18:49 CET 2017


On Wed, Feb 15, 2017 at 10:52:11PM +0000, Karl Berry wrote:
>     $  ldd xetex
>         libfontconfig.so.1 =>     /usr/lib/64/libfontconfig.so.1
>         libfreetype.so.6 =>     /usr/lib/64/libfreetype.so.6
>         libsocket.so.1 =>     /lib/64/libsocket.so.1
>         libm.so.2 =>     /lib/64/libm.so.2
>         libc.so.1 =>     /lib/64/libc.so.1
>         libexpat.so.1 =>     /usr/lib/64/libexpat.so.1
>         libpthread.so.1 =>     /lib/64/libpthread.so.1
>         libz.so.1 =>     /usr/lib/64/libz.so.1
>         libbz2.so.1 =>     /usr/lib/64/libbz2.so.1
>         libpng16.so.16 =>     /usr/lib/64/libpng16.so.16
>         libharfbuzz.so.0 =>     /usr/lib/64/libharfbuzz.so.0
>         libnsl.so.1 =>     /lib/64/libnsl.so.1
>         libglib-2.0.so.0 =>     /usr/lib/64/libglib-2.0.so.0
>         libgraphite2.so.3 =>     /usr/lib/64/libgraphite2.so.3
>         libmp.so.2 =>     /lib/64/libmp.so.2
>         libmd.so.1 =>     /lib/64/libmd.so.1
>     Is this OK?
> 
> I don't know.  I also don't know of anything significant that has
> changed since last year.
> 
> Maybe most of those libraries are indirect dependencies pulled in by
> fontconfig, in which case I know of no way to avoid them. The link line
> in your mail looks ok.
> 
> The i386-linux binary I built last year has these dependencies:
> 	linux-gate.so.1 =>  (0xf772f000)
> 	libfontconfig.so.1 => /lib/libfontconfig.so.1 (0xf76c6000)
> 	libm.so.6 => /lib/libm.so.6 (0xf7683000)
> 	libc.so.6 => /lib/libc.so.6 (0xf74c5000)
> 	/lib/ld-linux.so.2 (0xf7730000)
> 	libfreetype.so.6 => /lib/libfreetype.so.6 (0xf7424000)
> 	libexpat.so.1 => /lib/libexpat.so.1 (0xf73fa000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0xf73df000)
> where, again, libfreetype is (I believe) because of libfontconfig (which
> is unavoidable).  Maybe there are yet more indirect dependencies which
> my ldd is not reporting. I don't know. --best, karl.

I built the 2016 release from source a few days ago on a recent
x86_64 linux test build, with system libraries preferred.  ldd
has 39 lines for xetex including things like glib, lcms2, libtiff,
libjpeg, libnss3, libnspr4, libopenjpeg, libexpat, libpcre,
libsqlite3.  So in that sense it is somewhat different from the
"general purpose binaries" I assume you guys want to produce.

But, I have a 'library' wrapper for scanelf from pax-utils (I
assume that package might be linux-only) which is supposed to
exclude libraries pulled in by something else (it seemed to do that
when I first got shown it, but that was a while ago) -

scanelf -BF "%f: %n" $*

And that reduces the list to about 18 libs - and freetype is still
mentioned:

ken at plexi ~ $library /opt/texlive/2016/bin/x86_64-linux/xetex
xetex:
libharfbuzz-icu.so.0,
libharfbuzz.so.0,
libgraphite2.so.3,
libicui18n.so.58,
libicuuc.so.58,
libicudata.so.58,
libpthread.so.0,
libdl.so.2,
libpoppler.so.66,
libpng16.so.16,libz.so.1,
libfontconfig.so.1,
libfreetype.so.6,
libkpathsea.so.6,
libstdc++.so.6,
libm.so.6,
libgcc_s.so.1,
libc.so.6

I guess Karl used internal versions of at least graphite2 and
harfbuzz, not sure if both of you are using an internal icu or just
omitting it, but I guess that freetype is being used directly.

Indeed, texk/web2c/xetexdir/XeTeXFontInst.h includes ft2build.h.

ĸen
-- 
`I shall take my mountains', said Lu-Tze. `The climate will be good
for them.'     -- Small Gods


More information about the tlbuild mailing list