[tlbuild] linking against expat ... why

Norbert Preining preining at logic.at
Fri Aug 28 10:18:25 CEST 2009


On Do, 27 Aug 2009, Karl Berry wrote:
> Regarding the xetex .so problems.  If anyone can develop an
> understandable recipe for eliminating the unwanted secondary .so
> dependencies, then by all means let us do so.

With Martin we have worked something out:

My explanations would be:
- build as usual with Build
- cd Work/texk/web2c
- rm xetex
- make
- look at the output which lists the linking command. It should be 
  something like
  CXXLD.sh: g++ -g -O2 -o xetex xetex-xetexini.o ....
- Copy the g++ command line, it is long and finishes with -lgcc
  (probably)
- remove all references to:
  . ..../libexpat.so or -lexpat
  . ..../libz.so or -lz  (but not the TL internal libz.a!)
  . ..../libfreetype.so or -lfreetype
- run the command
- if the load run succeeds call strings -a xetex | grep '\.so' and 
  check for needed libs


This way I got a xetex binary from Martin for x86_64-linux that I will
commit in a minute that is only linked against
	/lib64/ld-linux-x86-64.so.2
	libfontconfig.so.1
	libm.so.6
	libc.so.6
	ld-linux-x86-64.so.2
which is fine.

In principle using this method we could even compile libfontconfig
statically into the binary.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>        Vienna University of Technology
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
CROMARTY (n.)
The brittle sludge which clings to the top of ketchup bottles and
plastic tomatoes in nasty cafes.
			--- Douglas Adams, The Meaning of Liff


More information about the tlbuild mailing list