"R. Bernstein" wrote:
>
> Ran into this thing in building Mesa 3.1 shared libraries with gcc.
>
> At runtime (in using from xmms) I'd get a message like this
>
> ld.so.1: xmms: fatal: relocation error: file /opt/platform/X11/lib/libGL.so: symbol
>__eprintf: referenced symbol not found
>
> The hacker fix is to notice that __eprintf is defined in libgcc.a
> (because of the double underscore convention) and extract that
> (it is in eprintf.o) then add it when building:
>
> /usr/ccs/bin/ld -G -h libGL.so.1 -o .libs/libGL.so.1.2.0 accum.lo alpha.lo
>alphabuf.lo api1.lo api2.lo apiext.lo attrib.lo bbox.lo bitmap.lo blend.lo clip.lo
>colortab.lo config.lo context.lo copypix.lo cva.lo debug_xform.lo depth.lo dlist.lo
>drawpix.lo enable.lo enums.lo eval.lo extensions.lo feedback.lo fog.lo get.lo
>glmisc.lo hash.lo image.lo light.lo lines.lo logic.lo masking.lo matrix.lo mmath.lo
>mthreads.lo pb.lo pipeline.lo pixel.lo pointers.lo points.lo polygon.lo quads.lo
>rastpos.lo readpix.lo rect.lo scissor.lo shade.lo span.lo stages.lo stencil.lo
>teximage.lo texobj.lo texstate.lo texture.lo translate.lo triangle.lo varray.lo vb.lo
>vbcull.lo vbfill.lo vbindirect.lo vbrender.lo vbxform.lo vector.lo vertices.lo
>winpos.lo xform.lo zoom.lo \
> _eprintf.o \
> ^^^^^^^^^^^ (or libgcc.a might have worked as well)
> -z allextract OSmesa/.libs/libMesaOS.al X/.libs/libMesaX11.al -z defaultextract
>-L/opt/platform/X11/lib -lSM -lICE -lXmu -lXext -lXi -lX11 -lc
>
> But what's really going on? __eprintf gets added when a program uses
> C's assert(). My problem was really that I don't have a shared
> libgcc. In fact (as I'm rebuilding the latest gcc right now), I notice
> that shared libraries are *not* built by default.
>
> Have a couple of suggestions.
>
> First is maybe adding a test of shared libraries when they are built
> -- it's really bad to discover GL doesn't work sometime down the line
> when some program uses it as a shared library. (And even worse to
> learn that gcc wasn't compiled for this kind of use eons ago.)
>
> Second, one might put a check in configure for shared gcc if gcc is
> used or maybe a test of a program (e.g. such as using assert).
>
> If you want me to try my hand at changing configure, I'd perhaps do.
Go for it. I don't think anyone else will fix it otherwise. I'm
still not up to speed on the autoconfig stuff.
-Brian
_______________________________________________
Mesa-bug maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-bug
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev