Date: Sat, 12 Dec 1998 16:24:23 +0100 From: "José Mª Alcaide" <jose@we.lc.ehu.es> To: freebsd-ports@FreeBSD.ORG Subject: teTeX-beta fails to link with shared libwww (ELF) Message-ID: <36728AA7.3BD75E5D@we.lc.ehu.es>
next in thread | raw e-mail | index | archive | help
I was trying to build the teTeX-beta port (tetex-0.9-981113) under FreeBSD 3.0-ELF, when ld failed showing the following messages: cc -o oxdvi.bin 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 -L/usr/local/lib -lwww -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 ../kpathsea/STATIC/libkpathsea.a -lm /usr/local/lib/libwww.so: undefined reference to `HText_endAnchor' /usr/local/lib/libwww.so: undefined reference to `HText_appendParagraph' /usr/local/lib/libwww.so: undefined reference to `HText_appendLink' /usr/local/lib/libwww.so: undefined reference to `HText_appendObject' /usr/local/lib/libwww.so: undefined reference to `HText_appendText' /usr/local/lib/libwww.so: undefined reference to `HText_endAppend' /usr/local/lib/libwww.so: undefined reference to `HText_beginAnchor' /usr/local/lib/libwww.so: undefined reference to `HText_beginAppend' /usr/local/lib/libwww.so: undefined reference to `HText_setStyle' /usr/local/lib/libwww.so: undefined reference to `HText_appendImage' /usr/local/lib/libwww.so: undefined reference to `HText_appendCharacter' /usr/local/lib/libwww.so: undefined reference to `HText_new2' gmake[2]: *** [oxdvi.bin] Error 1 Previously I had built the libwww-5.2 port without any problems. A few days ago, I built the same teTeX port succesfully on another machine, this time running 2.2.8-STABLE (obviously a.out). If I move libwww.so to another place, and then I build teTeX again, everything works fine (i.e., linking with the libwww static library works). I made a little test, compiling and linking a tiny "Hello, world" program with libwww, and I also got the same error messages; but when compiled using the -static flag, the program was linked fine. Then I switched to examine the libwww sources. Under the "Library/src" subdirectory I found a file named "HTextImp.h" which defines all the functions which cause the linking errors. At the beginning of this file there is a very interesting comment: If you are not using the libwww HTML parser but you are compiling libwww as a shared library then you need to include this dummy implementation of the HText interface in order to link succesfully. In order to compile it in, you can do something like this #ifdef LIBWWW_SHARED #include "HTextImp.h" #endif It seems that this comment is clearly related to the teTeX's linking problem. However, I don't fully understand it. Is it saying that every program that will be linked with the shared libwww needs to include the "HTextImp.h" header file? If this is indeed the case, then the teTeX sources need to be modified... But then, why does the same teTeX port link fine with the same libwww-5.2 under 2.2.8 (a.out)? -- JM ----------------------------------------------------------------------- José Mª Alcaide | mailto:jose@we.lc.ehu.es Universidad del País Vasco | http://www.we.lc.ehu.es/~jose Dpto. de Electricidad y Electrónica | Facultad de Ciencias - Campus de Lejona | Tel.: +34-946012479 48940 Lejona (Vizcaya) - SPAIN | Fax: +34-944858139 ----------------------------------------------------------------------- "Go ahead... make my day." - H. Callahan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36728AA7.3BD75E5D>