Subject: Re: teTeX problem with libwww
To: Ruibiao Qiu <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 12/12/2001 19:55:13
On Wed, 12 Dec 2001, Ruibiao Qiu wrote:

> gcc -o oxdvi.bin -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib xdvi.o dvi-draw.o dvi-init.o events.o font-open.o gf.o pk.o psdps.o psgs.o psheader.o psnews.o special.o util.o vf.o sfDir.o sfDraw.o sfPath.o sfSelFile.o hypertex.o
> mime.o wwwfetch.o alloca.o -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -l
> wwwcore -lwwwutils -lmd5 -lz -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lz ../kpathsea/STATIC/libkpathsea.a -lm
> /usr/pkg/lib/libwwwcore.a(HTWWWStr.o): In function `HTMessageIdStr':
> HTWWWStr.o(.text+0x645): warning: tmpnam() possibly used unsafely, use mkstemp() or mkdtemp()
> xdvi.o: In function `make_temporary_dir':
> xdvi.o(.text+0x7ec): warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
> /usr/pkg/lib/libwwwapp.a(HTInit.o): In function `HTConverterInit':

> HTInit.o(.text+0x21c): undefined reference to `HTXML_new'
> HTInit.o(.text+0x243): undefined reference to `HTXML_new'
> /usr/pkg/lib/libwwwapp.a(HTInit.o): In function `HTTransferEncoderInit':
> HTInit.o(.text+0x437): undefined reference to `HTZLib_inflate'
> /usr/pkg/lib/libwwwapp.a(HTInit.o): In function `HTContentEncoderInit':
> HTInit.o(.text+0x477): undefined reference to `HTZLib_inflate'
> collect2: ld returned 1 exit status
> gmake[2]: *** [oxdvi.bin] Error 1
> gmake[2]: Leaving directory `/usr/pkgsrc/print/teTeX-bin/work/teTeX-1.0/texk/oxdvik'
> gmake[1]: *** [all] Error 1

Wonder why "gcc" is trying to link static. What platform
(machine/version) is this?

In any case, it looks like "-lxmltok" or "-lwwwxml" needs to follow
"-lwwwapp" on the command line. It's probably getting the order from
"/usr/pkg/bin/libwww-config". You could edit that file directly, to
see if you can come up with the right magic formula, and if you can,
it should be changed in the "libwww" package. Some of the libraries
may need to appear on the command line twice to eliminate all circular
references. You can fully test any change to libwww-config with, "cd
print/teTeX-bin && rm work/.configure_done && make", which may be a
little less work than rebuilding teTeX-bin from scratch.