Linux - I want to use Valgrind with OpenGL applications, but my distribution uses ELF TLS, and Valgrind cannot yet deal with NVIDIA's ELF TLS OpenGL.

Answer ID 193
Published 12/03/2004 05:21 AM
Updated 02/25/2008 10:48 AM

I want to use Valgrind with OpenGL applications, but my
distribution uses ELF TLS, and Valgrind cannot yet deal with NVIDIA's
ELF TLS OpenGL.


You can set the environment variable LD_ASSUME_KERNEL to something
below "2.3.99" (for example: `export LD_ASSUME_KERNEL 2.3.98`).
 
NVIDIA's OpenGL libraries contain an OS ABI ELF note that indicates
the minimum kernel version that is required to use the library.
The ELF TLS OpenGL libraries have an OS ABI of 2.3.99 (the first
Linux kernel that contained the necessary LDT support for ELF TLS),
while the non ELF TLS OpenGL libraries contain an OS ABI of 2.2.5.

The run-time loader will not load libraries with an OS ABI greater
than the current kernel version.  The LD_ASSUME_KERNEL environment
variable can be used to override the kernel version that the run-time
loader uses in this test.

By setting LD_ASSUME_KERNEL to any kernel version below 2.3.99,
you can force the loader to not use the ELF TLS OpenGL libraries,
and fall back to the regular OpenGL libraries.

If, for some reason, you need to remove this OS ABI note from the
NVIDIA OpenGL libraries, you can do so by passing the .run file the
"--no-abi-note" option during installation.

Was this answer helpful?
Your rating has been submitted, please tell us how we can make this answer more useful.

LIVE CHAT

Chat online with one of our support agents

CHAT NOW

ASK US A QUESTION

Contact Support for assistance

CONTACT US