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

I posted this in the begginer forum, and some people suggested I try it in here.

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 to XFreeDeviceList’
/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 to XListInputDevices’
/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 to XOpenDevice’
/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 to XSelectExtensionEvent’
collect2: ld returned 1 exit status
make: *** [integral] Error 1

Am I not linking something? I have tried adding “-lXmu” but it couldn’t find that library, which is exactly what seems to be going wrong, but why is it doing this out of nowhere, the code was working just fine before.

thanks for your help!


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

seems that most of your missing symbols should be in libXi

Add the library path, something like this

Thanks for your replies.

I installed Redhat 9.0 and then Mesa 5.0

This got rid of the compilation errors, now all I get is:

[dwayne@elf program]$ ./slices
./slices: error while loading shared libraries: libglut.so.3: cannot open shared object file: No such file or directory

when I try to run the program.

Why does it always seem that randomly things stop to work? ;\

further more, I get that error with the Mesa demos, so I don’t think the error is contained within my code.

You havent installed Mesa correctly.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.