[linux-audio-dev] Needing help in resolving the Pd-Gem package linker problem (and hopefully learn something in the process :-)

Ivica Bukvic ico at fuse.net
Tue Apr 1 04:35:01 UTC 2003

Hi all,

This is the issue I've been dealing with for the past couple of hours. I am 
using mostly vanilla Mdk 9.0.

I am trying to compile Gem from source (for Pd), and while it does compile 
without any problems at runtime (pd -lib Gem) I get the following issue:

/usr/lib/pd/extra/Gem.pd_linux: /usr/lib/pd/extra/Gem.pd_linux: undefined 
symbol: __ctype_toupper_loc
/usr/lib/pd/extra/Gem: can't load library

I've tracked this one to the gcc library (please correct me if I am wrong). 
However, there are no errors at compile time:

g++  -o Gem.pd_linux -L/usr/X11R6/lib -L../../../GemLibs/liborb  ../Manips/*.o 
../Particles/*.o ../Base/*.o ../MarkEx/*.o ../Pixes/*.o ../Controls/*.o 
../Nongeos/*.o ../Geos/*.o ../openGL/*.o  -shared -lquicktime -lmpeg3 -lorb 
-lglib -lgltt -lttf -ljpeg -ltiff -lpng -lglut -lGLU -lGL -lz -lm -Wl,-shared 
-Wl,-export-dynamic -lXxf86vm -lXext -lX11

I also tried adding all over the place -lgcc like this:

g++  -o Gem.pd_linux -L/usr/X11R6/lib -L../../../GemLibs/liborb  ../Manips/*.o 
../Particles/*.o ../Base/*.o ../MarkEx/*.o ../Pixes/*.o ../Controls/*.o 
../Nongeos/*.o ../Geos/*.o ../openGL/*.o  -shared  -lgcc -lquicktime -lmpeg3 
-lorb -lglib -lgltt -lttf -ljpeg -ltiff -lpng -lglut -lGLU -lGL -lz -lm 
-Wl,-shared -lgcc -Wl,-export-dynamic -lgcc -lXxf86vm -lXext -lX11

and the compile is successful, but I still keep getting the same error.

I tried building the static version, but then I get the following error:
g++  -o Gem.pd_linux -L/usr/X11R6/lib -L../../../GemLibs/liborb  ../Manips/*.o 
../Particles/*.o ../Base/*.o ../MarkEx/*.o ../Pixes/*.o ../Controls/*.o 
../Nongeos/*.o ../Geos/*.o ../openGL/*.o  -shared -lquicktime -lmpeg3 -lorb 
-lglib -lgltt -lttf -ljpeg -ltiff -lpng -lglut -lGLU -lGL -Wl,-Bstatic -lz 
-lm -Wl,-shared -Wl,-export-dynamic -lXxf86vm -lXext -lX11
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make: *** [Gem.pd_linux] Error 1

I then checked
ld -lgcc_s

And the only thing I got was:
ld: warning: cannot find entry symbol _start; not setting start address
Now, could someone please tell me what the heck does this mean???

ldd /usr/lib/libgcc_s.so gives:
        libc.so.6 => /lib/i686/libc.so.6 (0x4001a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

At this point, I am confused and do not know what to do. I tried upgrading 
ldconfig, ld, and am currently recompiling gcc from a cooker source (which is 
taking a lot of time). So, I would greatly appreciate any help I can get on 
this issue, since the whole idea of linking is not so clear to me.

Finally, I would appreciate the explanation of -Bstatic flag which seems to 
invoke -lgcc_s that is subsequently not found for whatever reason, despite 
the fact the ld otherwise finds it (with the aforementioned warning though).

Any help on this issue is greatly appreciated! Sincerely,


More information about the Linux-audio-dev mailing list