Everything was working fine, then one day "relocation error: /usr/lib/libglut.so.3: "

Hi, I have spent most of the summer doing some minor OpenGL stuff. I managed to complete the summers tasks (which just involved making a basic plotting program) and just when I was going to show my supervisor all my work (that was tested and working) I suddenly got this error:

./integral: relocation error: /usr/lib/libglut.so.3: undefined symbol: XmuLookupStandardColormap

I tried doing alot of stuff, like re-installing glut, and installing mesa, but none of it worked.

When I tried to recompile my code i got the following errors.

My compile command was:
gcc -lm -lGL -lGLU -lglut -o integral graph.o integral.o expint.o fluence.o

(pretty simple)

and the errors I got where:

[aaron@magus fluencetoaaron]$ make
gcc -c graph.c
gcc -lm -lGL -lGLU -lglut -o integral graph.o integral.o expint.o fluence.o
/usr/lib/gcc-lib/i386-redhat-linux/3.2/…/…/…/libglut.so: undefined reference
to XGetExtensionVersion' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libglut.so: undefined reference toXFreeDeviceList’
/usr/lib/gcc-lib/i386-redhat-linux/3.2/…/…/…/libglut.so: undefined reference
to XQueryDeviceState' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libglut.so: undefined reference toXListInputDevices’
/usr/lib/gcc-lib/i386-redhat-linux/3.2/…/…/…/libglut.so: undefined reference
to XFreeDeviceState' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libglut.so: undefined reference toXOpenDevice’
/usr/lib/gcc-lib/i386-redhat-linux/3.2/…/…/…/libglut.so: undefined reference
to XmuLookupStandardColormap' /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libglut.so: undefined reference toXSelectExtensionEvent’
collect2: ld returned 1 exit status
make: *** [integral] Error 1

Am I not linking something?

thanks for your help!


ps - I am running this on a red hat 8.0 machine with an nvidia video card.

There are some known problems with the glut that comes with Redhat 8.0. I think you need to get the libraries from 7.0. Search the Linux boards for info on this.

I use Slackware 9.0, and that also had similar problems. To fix my problem I had to comment out a #define and recompile the glut source. I don’t remember the exact #define, but I had found information for that on the Linux forums of this site too, if I recall.

Hmm, interesting, thanks for your reply.

Unfortunatley my co-worker got the same error on a redhat 9.0 machine. Is it possible this problem is unique to redhat distro’s up from 8? or is this only known in 8?

again, thanks!

Not sure. Seems like a fair assumption that the problem could be from 8.0 up. Like I said, I use Slackware and haven’t used RedHat since probably about 6.0.

No one else has had this problem?

Have you tried searching the Linux boards yet? And have you tried taking the advice of getting the glut package from Redhat 7.0?

There are also some Xlib libraries you may need include for the linker. A search of the Linux board should show you this too. I myself don’t remember what Xlib libraries I included offhand.

GLUT from Mesa does some nice thing so you dont have to link to all the X libraries. This library does not work with NVidias OpenGL implementation anymore.

The errors is linking errors because some libraries are missing from the command line. Try to add
-lXext -lX11 -lXmu
and perhaps some more. They are all listed in the makefiles from the original GLUT package.

This question should have been posted in the linux forum as Deiussum wrote.