Subject: pkg/8417: xforms on i386/ELF broken due to undefined references
To: None <gnats-bugs@gnats.netbsd.org>
From: None <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 09/15/1999 14:50:59
>Number: 8417
>Category: pkg
>Synopsis: xforms on i386/ELF broken due to undefined references
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 15 14:50:00 1999
>Last-Modified:
>Originator: John Darrow
>Organization:
Computing Services
Wheaton College, Wheaton, IL
>Release: NetBSD i386/ELF (current-19990705+) using pkgsrc-19990913+
>Environment:
System: NetBSD jdarrowp5.wheaton.edu 1.4K NetBSD 1.4K (JDARROWP5) #0: Tue Sep 14 13:00:02 CDT 1999 jdarrow@jdarrowpiii.wheaton.edu:/var/src/sys/arch/i386/compile/JDARROWP5 i386
>Description:
The xforms ELF library for i386 includes a few undefined
references to glX functions. This causes compiles which use it
to fail as follows (example from math/xldlas package, fixed for
xpkgwedge):
cc -O2 -DXFORMS86 -DPREFIX=\"/usr/pkg\" -I/usr/X11R6/include -I/usr/pkg/include/X11 xldlas.o frontend.o setstate.o files.o data.o log.o graph.o analysis.o help.o generate.o tips.o tests.o filters.o -o xldlas -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -lX11 -lm -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lxforms
graph.o: In function `do_logo_plot':
graph.o(.text+0xc71): warning: tmpnam() possibly used unsafely, use mkstemp() or mkdtemp()
/usr/pkg/lib/libxforms.so: undefined reference to `glXQueryExtension'
/usr/pkg/lib/libxforms.so: undefined reference to `glXMakeCurrent'
/usr/pkg/lib/libxforms.so: undefined reference to `glXChooseVisual'
/usr/pkg/lib/libxforms.so: undefined reference to `glXDestroyContext'
/usr/pkg/lib/libxforms.so: undefined reference to `glXCreateContext'
collect2: ld returned 1 exit status
*** Error code 1
Stop.
nm -A /usr/X11R6/lib/*.so |grep glX yields nothing. (This is with
xsrc 19990909, including XFree86 3.3.5)
Remembering a recent thread in port-i386 about GLX, I installed
the graphics/Mesa package. nm then found the symbols in question
in libGL.so (aka libMesaGL.so). Adding "-lGL -lXext" to the
cc command in question allowed the program to compile and run.
However, even if the xforms pkg is made to depend on Mesa if on
i386/ELF, having to add conditional patches to all packages which
depend on xforms (currently comms/xisp, databases/xmysql{,admin},
mail/{xfmail,xldlas}, and print/lyx) to include the necessary
Mesa libraries (-lGL and its own -lXext dependency) if on i386/ELF
is both difficult (for example, math/xldlas would need two
patch-aa's, one without -lGL -lXext for non-ELF, one with them for
ELF) and, seemingly, a Gross Hack.
Also, if any of these packages use some sort of configure method to
detect xforms (as does audio/rplay, which, though not currently
forced to do so by our pkgsrc, will build an xrplay module if it
finds xforms ( *** WEAK DEPENDENCY ALERT *** )), getting things
right will be even harder.
>How-To-Repeat:
Attempt to compile an xforms-using package on i386/ELF.
>Fix:
For now, probably disable xforms for batch builds on i386/ELF
until either 1. the xforms binary is fixed to not reference glx,
or 2. conditional patches for Mesa can be added to all the
xforms-using packages.
>Audit-Trail:
>Unformatted: