This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

using assert (__eprintf) in shared libraries


A number of packages, like MesaGL and audiofile want to build 
with shared libraries and at run time I often get a message like

ld.so.1: xmms: fatal: relocation error: file /opt/platform/X11/lib/libGL.so: symbol __eprintf: referenced symbol not found

(Note the error is pretty far from the source of the problem: xmms uses
libGL and that uses gcc's __eprintf.)

What is going on is that the source code to say libGL.so uses assert(), and 
under gcc this uses in __eprintf from libgcc.a. 

I've been able to fix such problems by extracting _eprintf.o from libgcc.a 
and linking this in explicitly into the shared objects.

But I'm not sure where the real problem lies -- should there be a shared
libgcc? Are the builds for such programs at fault? 
And what the best way to fix? 

Any thoughts? 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]