Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just done a fresh install of 11.10, + nvidia-current from xswat ppa (cause the current version shipped with ubuntu is broken for my gpu).

Please take time for understanding each steps. I don't know where to report this issue.

Installation of nvidia-current[-dev]

After installing nvidia-current and nvidia-current-dev, theses files are missing:

/usr/lib/libGL.so
/usr/include/GL/gl.h

Both are installed into:

/usr/lib/nvidia-current/libGL.so
/usr/include/nvidia-current/GL/gl.h

By default, theses are not accessible though standard path, and broke compilation to many software. (no gl.h found, then no -lGL found.)

Broken in design solution

To fix that, we need to install libgl1-dev. libgl1-dev install mesa gl.h in /usr/include/GL/gl.h and install mesa libGL.so in /usr/lib/libGL.so

With libgl1-dev, i'm able to compile gl related software. But after compilation, i can see that nvidia libGL is used:

$ ldd mysoftware
libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1 (0x00007f620d78c000)

Conclusion

  • we need libgl1-mesa-dev to be able to compile gl-related software by default
  • we don't use nvidia header at compilation, but mesa header
  • we don't use any mesa lib at runtime

Questions

  • Why should i install Mesa development since i already got everything on my computer ?
  • Should ubuntu need to install or symlink nvidia libs and header in standard location if mesa are not installed ?
share|improve this question
1  
This is exactly my problem, but what's under solution is unintelligible. What does "we need to install libgl1-dev. libgl1-dev install mesa gl.h in /usr/include/GL/gl.h and install mesa libGL.so in /usr/lib/libGL.so" mean? The first line is understandable to me. It should be: "Execute (from the console): sudo apt-get install libgl1-dev. The second sentence however, I cannot find verb nor subject in. Please restate this so that I can compile an application using openGL. –  user54311 Apr 10 '12 at 15:46
add comment

closed as too localized by Jorge Castro, LnxSlck, bodhi.zazen, Mik, qbi Feb 8 '13 at 20:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.