Friday, September 10, 2010

making sure opengl is available

This troubleshooting is listed in this post:

But I thought I'd repost here so that I always have this information at hand:

I have a GeForce 8800GT card installed in my box. I see glxinfo says I have OpenGL:
[sfr...@ogre my_cinelerra]$ glxinfo | head -20
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4

I see glxgears points to the in /usr/lib64/nvidia:
[sfr...@ogre my_cinelerra]$ ldd `which glxgears` => (0x00007fff85dff000) => /usr/lib64/nvidia/ (0x00007f791fa75000) => /lib64/ (0x0000003f1bc00000) => /usr/lib64/ (0x0000003f1e800000) => /lib64/ (0x0000003f1c400000) => /lib64/ (0x0000003f1b800000) => /usr/lib64/nvidia/ (0x00007f791e5a3000) => /usr/lib64/nvidia/tls/ (0x00007f791e4a1000) => /usr/lib64/ (0x0000003f1ec00000) => /lib64/ (0x0000003f1c000000) => /usr/lib64/ (0x0000003f1e400000)
/lib64/ (0x0000003f1b400000) => /usr/lib64/ (0x0000003f1e000000

I see that the in that directory has the appropriate OpenGL hooks:
[sfr...@ogre usr]$ strings -a /usr/lib64/nvidia/ | grep glDeleteShader
[sfr...@ogre usr]$ strings -a /usr/lib64/nvidia/ | grep glUseProgram

I've tried manually pointing to the /usr/lib64/nvidia directory:
AC_CHECK_LIB([GL], [glUseProgram],
[OPENGL_LIBS="-lGL"; libGL=yes],
# On SUSE/OpenSUSE, NVidia places the OpenGL 2.0 capable library in
# but it doesn't place a there, so the linker won't pick it up
# we have to use the explicit path.
for l in /usr/lib64/nvidia /usr/X11R6/lib /usr/X11R6/lib64; do
AC_MSG_CHECKING(for glUseProgram in $l/
AC_TRY_LINK([],[extern int glUseProgram();
test $libGL = yes && break

In the end, even though ./configure did not recognize that I had openGL properly installed, I had to explicitly enable opengl on my ./configure line:
./configure --enable-opengl

Who knew?
da mule


Daryl Williams said...

Hey... The Mule. I stumbled on your blog through:

I have been using Ubuntu for a few months now and using Cinelerra. I'm having problems playing Mp4 720p files. I will check your suggestion on dependencies and Monty's patches for ffmpeg.

Keep up the good work. I will spread the word about your blog.

Cacasodo said...

Thanks Daryl.
Enjoy the represents a lot of hours down in the boiler room of Linux trying to get this stuff to work right.

the mule