Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 1998 09:32:21 -0800 (PST)
From:      jose@we.lc.ehu.es
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   ports/9116: teTeX-beta fails to link with shared libwww (ELF)
Message-ID:  <199812171732.JAA22221@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         9116
>Category:       ports
>Synopsis:       teTeX-beta fails to link with shared libwww (ELF)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 17 09:40:00 PST 1998
>Last-Modified:
>Originator:     Jose M. Alcaide
>Organization:
Universidad del Pais Vasco - Dept. de Electricidad y Electronica
>Release:        3.0 (ELF)
>Environment:
FreeBSD saturno.we.lc.ehu.es 3.0-CURRENT FreeBSD 3.0-CURRENT #1: Fri Dec 11 11:22:40 CET 1998     jose@saturno.we.lc.ehu.es:/usr/src/sys/compile/SATURNO  i386

>Description:
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)?
>How-To-Repeat:
On FreeBSD 3.0-ELF:
cd /usr/ports/print/teTeX-beta
make

>Fix:
No idea. There is a workaround as explained above, however.

>Audit-Trail:
>Unformatted:

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?199812171732.JAA22221>