The compilation of app-text/tetex-2.0.2 fails as follows: emerge app-text/tetex-2.0.2 [...] gcc -o oxdvi.bin xdvi.o dvi-draw.o dvi-init.o events.o font-open.o string-utils.o my-vsnprintf.o my-snprintf.o help-window.o message-window.o statusline.o xserver-info.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 dvips.o tfmload.o -L/usr/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwsql -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lz -L/usr/lib/mysql -lmysqlclient -L/usr/lib -lssl -lcrypto ../../libs/t1lib/libt1.a ../../libs/t1lib/../type1/libtype1.a -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 ../kpathsea/STATIC/libkpathsea.a -lm /usr/lib/libwwwcore.a(HTWWWStr.o)(.text+0x12b6): In function `HTMessageIdStr': : warning: the use of `tmpnam' is dangerous, better use `mkstemp' /usr/lib/libwwwcore.a(HTInet.o)(.text+0x8e9): In function `HTGetTmpFileName': : warning: the use of `tempnam' is dangerous, better use `mkstemp' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x7fd): In function `HTConverterInit': : undefined reference to `HTXML_new' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x84d): In function `HTConverterInit': : undefined reference to `HTXML_new' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x102a): In function `HTFormatInit': : undefined reference to `HTXML_new' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x107a): In function `HTFormatInit': : undefined reference to `HTXML_new' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x1403): In function `HTTransferEncoderInit': : undefined reference to `HTZLib_inflate' /usr/lib/libwwwapp.a(HTInit.o)(.text+0x147d): In function `HTContentEncoderInit': : undefined reference to `HTZLib_inflate' collect2: ld returned 1 exit status make[2]: *** [oxdvi.bin] Error 1 make[2]: Leaving directory `/var/tmp/portage/tetex-2.0.2-r1/work/tetex-src-2.0.2/texk/oxdvik' make[1]: *** [all] Error 1 make[1]: Leaving directory `/var/tmp/portage/tetex-2.0.2-r1/work/tetex-src-2.0.2/texk' make: *** [all] Error 1 !!! ERROR: app-text/tetex-2.0.2-r1 failed. !!! Function src_compile, Line 94, Exitcode 2 !!! (no error message) The version of net-libs/libwww I have installed is: * net-libs/libwww Latest version available: 5.4.0-r1 Latest version installed: 5.4.0-r1 Size of downloaded files: 1,102 kB Homepage: http://www.w3.org/Library/ Description: A general-purpose client side WEB API And the output from emerge info is: Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.19-4GB-SMP) ================================================================= System uname: 2.4.19-4GB-SMP i686 Intel(R) Xeon(TM) CPU 2.40GHz ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="ftp://ftp.rediris.es/pub/mirror/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 oss apm arts avi crypt cups encode foomaticdb gif gpm gtk imlib jpeg kde gnome libg++ mad mikmod mmx motif mpeg ncurses nls oggvorbis pdflib png qt quicktime sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline java X tcpd pam libwww ssl python opengl 3dfx cdr dga directfb doc dvd dvdr emacs fastcgi gd imap innodb jikes kerberos krb4 ldap leim maildir mbox mozilla mysql pda ppds perl plotutils postgres prelude samba sasl sse tcltk tetex tiff usb wmf wxwindows Xaw3d acl fax fbcon imagemagick mpi transcode xml xvid"
I can confirm this one too. The output of emerge is very same, ends barton root # emerge -s libwww [...] * net-libs/libwww Latest version available: 5.4.0-r1 Latest version installed: 5.4.0-r1 Size of downloaded files: 1,102 kB Homepage: http://www.w3.org/Library/ Description: A general-purpose client side WEB API And some info of mine system by emerge: barton root # emerge info Portage 2.0.49-r7 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.4.20-gentoo-r6) ================================================================= System uname: 2.4.20-gentoo-r6 i686 AMD Athlon(tm) prosussor ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ rsync://trumpetti.atm.tut.fi/gentoo/ http://www.ibiblio.org/gentoo http://gentoo.linux.no/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="cups foomaticdb libg++ mad mikmod spell gdbm berkdb slang gpm tcpd python -3dfx 3dnow aalib alsa apm arts avi cdr crypt dga directfb dvd encode fbcon gif -gnome gtk gtk2 imlib java jpeg kde libwww mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png qt quicktime readline samba sdl ssl svga tetex threads tiff truetype usb wxwindows X xinerama xosd xml xml2 xmms xv zlib x86"
Okay, somehow I can't produce this, but from what information I can gather it's possible the ordering of the libraries produced from libwww-config is what's causing the trouble. If you could backup your /usr/bin/libwww-config, save the attached script to there and try rebuilding tetex, that'd be great.
Created attachment 18717 [details] patched to change the ordering of the libraries
Thanks for the help. I've tried your patch and similar problems arises. I also think that the problem is in the (order of) sequence of libraries produced by libwww-config. I've tried blindly other orders but with no luck. I didn't say in my original post that I was installing from scratch the gentoo distribution; so the error is not due to an upgrade, I think that everyone who try tetex in a new installation will face this bug. A pair of weeks ago I installed another machine, with similar configuration, and this error didn't arise. libwww upgrade, perhaps? Indeed, there is an entry from 02 Oct 2003 in the changelog of my version and the last entry in the changelog of the other machine is 14 May 2003. I suppose that the bug can be reproduced reinstalling libwww prior to reinstalling tetex. The new output of emerge tetex, using your patch, is: gcc -o oxdvi.bin xdvi.o dvi-draw.o dvi-init.o events.o font-open.o string-utils.o my-vsnprintf.o my-snprintf.o help-window.o message-window.o statusline.o xserver-info.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 dvips.o tfmload.o -L/usr/lib -lxmlparse -lwwwsql -lwwwinit -lwwwapp -lwwwxml -lxmltok -lwwwzip -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lz -L/usr/lib/mysql -lmysqlclient -L/usr/lib -lssl -lcrypto ../../libs/t1lib/libt1.a ../../libs/t1lib/../type1/libtype1.a -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 ../kpathsea/STATIC/libkpathsea.a -lm /usr/lib/libwwwcore.a(HTWWWStr.o)(.text+0x12b6): In function `HTMessageIdStr': : warning: the use of `tmpnam' is dangerous, better use `mkstemp' /usr/lib/libwwwcore.a(HTInet.o)(.text+0x8e9): In function `HTGetTmpFileName': : warning: the use of `tempnam' is dangerous, better use `mkstemp' /usr/lib/libwwwxml.a(HTXML.o)(.text+0x76): In function `HTXML_new': : undefined reference to `XML_ParserCreate' /usr/lib/libwwwxml.a(HTXML.o)(.text+0x198): In function `HTXML_free': : undefined reference to `XML_ParserFree' /usr/lib/libwwwxml.a(HTXML.o)(.text+0x21c): In function `HTXML_abort': : undefined reference to `XML_ParserFree' and so on.
i cant reproduce it, no matter how many times and with what USE's i recompile libwww with at the moment. thanks for checking back on the libwww-config script, it's hard because I can't reproduce, I can't test locally, so I'm going to have one more go at this, if you try the next attachment and see if you have any luck, it'd be most appreciated.
Created attachment 18740 [details] another go at patching libwww-config
Hi Mike, Thank you for your help. Just before your last patch arrived I was able to find a sequence order that seemed to compile tetex gracefully. I have tried my version of libwww-config to emerge tetex and it worked. At least for me. Nevertheless, I unmerged tetex and tried your patch. Unfortunately I experienced similar errors to the ones I reported previously. I tried again my version and tetex emerged right. I will attach my version just in case it can be used to upgrade the original libwww-config (unfortunatelly I can not say anything as why it works or why the other combinations don't). Thank you very much!
Created attachment 18746 [details] working version (at least for me) of libwww-config
Great work, like I said, I couldnt test/reproduce locally so I was mostly trying my educated guesses. It's great that you found a solution, I wish we could pin down the cause some more, but I don't really know where we'd start. I've tested your fix locally with tetex-2, and it works fine, so my only concern now is that it might possibly break other applications in other ways :/ There are two solutions from here then. The first is to patch the main libwww ebuild to include these changes to the global libwww-config script. The second option is to include this patch in the tetex ebuild, and tell tetex to use this fixed libwww-config. I'd prefer to try patching libwww-config in the main archive, see if we get bugs in ~arch and then fall back to a tetex-specific solution. But then again, this bug does seem to be tetex-specific, and I'm not sure how many people it's affecting. Which doesnt mean it's unimportant, just that it's scope may be limited to tetex-2. Thoughts and suggestions ? And thanks for all your work here, it's been very good of you.
I think that the correct option is to patch the main libwww ebuild to include the changes. My guess is that it does not only involves tetex. Furthermore, by making it local to tetex it will be more difficult to track it in the future. By the way, tetex is a dependency of kde (at least, because I was emerging kde, it began to emerge tetex -perhaps due to my USE values-) Of course, prior to doing this or to unmask the new version it should be tested to see whether it breaks other applications or not. I'm new to Gentoo, is there any way to know which apps depend on the libwww package? (I mean, is there an application that can do this automatically?) If there is such an application the new version could be tested with the currently known applications. Lastly, it would be great if anyone knows exactly why it should be in this order (or in any other order that works). Thank you very much again for your help.
> I think that the correct option is to patch the main libwww ebuild to include > the changes. My guess is that it does not only involves tetex. I've seen reports with other applications yes. > By the way, tetex is a dependency of kde (at least, because I was > emerging kde, it began to emerge tetex -perhaps due to my USE values-) Yep, most likely. USE="-tetex" shouldnt require teTeX for kde. > Of course, prior to doing this or to unmask the new version it should be > tested to see whether it breaks other applications or not. What are the 'other applications' we should test? > I'm new to Gentoo, is there any way to know which apps depend on the libwww > package? (I mean, is there an application that can do this automatically?) > If there is such an application the new version could be tested with the > currently known applications. qpkg -q <app> can do this, but it's always difficult to tell as it's very hard to track USE dependant variables. eg, was USE="libwww" set when building a package ? > Lastly, it would be great if anyone knows exactly why it should be in > this order (or in any other order that works). Agreed, I don't know why at the moment. Okay, I'm fixing this in libwww and creating a testing revision to 5.4.0 which will be ~ for all archs. Thanks for your hard work here, it'd be great if you could test with libwww-5.4.0-r2. I want to make sure configure actually put everything in the right order. Thanks.
Sorry for my late response. I've made the followin emerges: # ACCEPT_KEYWORDS="~x86" emerge =net-libs/libwww-5.4.0-r2 # emerge tetex and all went fine. There was no problem compiling nor installing either of them. I think that the new version of the libwww ebuild is ok.
libwww-5.4.0-r2 breaks the tetex compile on my computer again. I had to reorder the -lxmlparse and -lxmltok settings in /usr/bin/libwww-config, just as the original poster suggested. I presume something is very broken with the libwww-build and the output the libwww-config config script produces. I'm running on ~x86 exclusively. I will open a bug for libwww.