[tex-live] pdftex on linux-alpha, libstdc++ problems

Thomas Esser te@informatik.uni-hannover.de
Wed, 6 Feb 2002 15:50:40 +0100

> binaries. These binaries work under linux, but the pdftex always
> has problems with libstdc++  ---  or the people have problems
> obtaining this library.

Hey, one of my most favorite problems... :-)

But, I think that I have a solution. In texk/web2c/Makefile, there are
three binaries that are linked by the C++ compiler: pdftosrc, pdftex
and pdfetex. At least for linux / gcc systems, I think that adding
  -nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lgcc
fixes the problems that we have with different libstdc++ versions by
linking just this library statically.

In the Makefile, I have changed e.g.
  $(kpathsea_cxx_link) pdftexdir/pdftosrc.o $(LDLIBXPDF) -lm
  $(kpathsea_cxx_link) pdftexdir/pdftosrc.o $(LDLIBXPDF) -lm -nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lgcc
and then called
  rm pdftosrc; make pdftosrc; ldd pdftosrc

The same has to be done for pdftex / pdfetex.

If we find that this is a reliable way to create better binaries, I can try
to add these flags automatically (on systems that support them).