[lsb-discuss] forcing symbol versions

Mike Hearn mike at theoretic.com
Tue Apr 15 13:55:10 PDT 2003


Hi again,

I'm trying to make gcc use only the LSB symbol versions for a hello
world GTK app, so I but I get a load of link errors like:

mike at linux:~/tmp> gcc -L/opt/lsbdev-base/lib `gtk-config --cflags
--libs` -o hello hello.c
/usr/lib/libglib.so: undefined reference to `getpwuid_r at GLIBC_2.1.2'
/usr/lib/libgdk.so: undefined reference to `shmctl at GLIBC_2.2'
/usr/X11R6/lib/libXi.so: undefined reference to `XextAddDisplay'
/usr/X11R6/lib/libXi.so: undefined reference to `_XUnknownNativeEvent'
/usr/lib/libgtk.so: undefined reference to `getresgid at GLIBC_2.0'
/usr/lib/libgtk.so: undefined reference to `getresuid at GLIBC_2.0'
/usr/X11R6/lib/libXi.so: undefined reference to `_XReadPad'

I only vaguely understand why I'm getting these errors, it seems to be
trying to resolve *every* symbol in *every* library to the LSB stub
libs. I only wanted it to do that for the file it was actually
compiling. All those libraries are already linked against the system
libc, so I don't understand why now their symbols have to resolve to the
LSB libc just because I'm trying to use them from my app.

Is this problem due to the lack of grouped fixup (again)? If so, as we
might not be getting that for a while, is there any other way to force
ld to only use a certain set of symbol versions other than using stub
libraries?

thanks -mike





More information about the lsb-discuss mailing list