Nvidia and OpenGL compile problems

I wanted to compile gtkglarea on a slack 8.0 system using the latest nvidia drivers and I recieived a error during the ./configure phase that OpenGL could not be found nor could Mesa. I expected the latter and nothing I tried would produce a positive result for the OpenGL.

My system is setup (AFAIK) properly according to the NVIDIA faq and all the other information I read on the web. I ran the nvidia_test script and they came back ok.

This is not the first OpenGL app I had problems with. I tried adding -lGLU and -lglut, but this did not solve the issue. The config.log would report problems with glbase.h and similar files.

Finally I took a stab at linking /usr/lib/libMesa.so with /usr/lib/libGL.so (libMesa.so did not exist on my system before doing this) and the compile went through saying it found Mesa. Running make produced errors because everything was being compiled with -lMesaGL and -lMesaGLU. I went to each Makefile I could find and changed the -lMesaGL to -lGL and -lMesaGLU to -lGLU and this seemed to work.

Where is the problem here? I’m kind of baffled. How can I make sure everything is configured correctly and where do I look to configuring this information?

Could it be that glut needs to be compiled on my machine (I used a pre-compiled package). Or maybe GTK should be compiled also?

Thanks for any advice.

The problem seems to be that the configure script is assuming that Mesa is used. The best would of course be if the authors had supported the nvidia alternative. If you first install Mesa before the nvidia drivers and then create som symlinks to the nvidia libs would it also work.

I compiled mesa 4 last night but have yet to install it. I figured I would do this, re-install the nvidia driver and create the symlinks. Would this then resolve the issue with -lMesaGL and -lMesaGLU being called?

What about the header files? xmesa.h (and a few others) would be left. Is this okay? Will it interfere with Nvidia GL?

Mesa and nvidia does not implements exactly the same functions. The symlinks should work if no such extension is used. GLUT in Mesa 4 is using some SGI extensions that nvidia does not have. Use Mesa 3.4.2 instead.
You have some other libraries in Mesa that I think can be used with the nvidia libraries. Create the symlinks but also save the original Mesa libraries under different names if you want to compile programs that requires the Mesa extensions.

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