Re: static build of latex

George White <[email protected]> Sat, 01 Oct 2005 09:57:11 -0300
Newsgroups gmane.comp.tex.tetex.general
Message-ID <[email protected]>
Quoting ir <[email protected]>:

> hi, 
>  i have been trying to build teTex statically...
> but with no success...:(
> have tried the : make LDFLAGS=static world ...
> but the build is still not static...
>   
>  can someone suggest something??

Which platform and which version of teTeX are you using?  Where did you find 
the "make LDFLAGS=static" recommendation?  Normally this would be controlled
using flags passed to the configure script (e.g., before make is used), but
teTeX-3 configure only offers the option:

 --without-cxx-runtime-hack do not link C++ runtime statically

I suspect you may be fighting an uphill battle.  For linux and teTeX-3.0, the
default (e.g., with cxx-runtime-hack) leads to link commands of the form:

c++ -o pdfetex  pdfetexini.o pdfetex0.o pdfetex1.o pdfetex2.o pdfetex3.o
pdfetexextra.o  pdftexdir/libpdf.a -lpng -lz ../../libs/xpdf/xpdf/libxpdf.a
../../libs/xpdf/goo/libGoo.a ../../libs/xpdf/fofi/libfofi.a
../../libs/md5/md5.o  lib/lib.a ../kpathsea/.libs/libkpathsea.a -lm  
-nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm -lgcc_eh -lgcc -lc
-lgcc_eh -lgcc

All this is totally system-dependent and not well supported by autoconf, so 
departing from the defaults is likely to be hard.

Have you considered:

1) putting the required shared libraries with teTeX and configuring the
search path via the link command (e.g., adding "-rpath <path to libs>"
to the link commands)?

2) build using the defaults, copy the link commands out of the logs and
edit them into a relink script to do things your way?


-- 
George N. White III
Head of St. Margarets Bay, Nova Scotia