Game Development Community

OpenGLDLLInit(): cannot handle TLS data; A: NO

by David Jung · in Torque Game Engine · 09/27/2003 (5:09 pm) · 4 replies

Update: I found the problem - see my own reply if interested.
----

I'm having trouble initializing OpenGL. All other GL apps work fine.
I've tracked it down to an error return from dlopen in SDL_GL_LoadLibrary,
but I don't know what it means...

Under Redhat 9, TGE Release_1_1_2, executing torqueDemo_DEBUG.exe
I get an error Unable to initialize OpenGL. (Error: Could not load OpenGL library)
(a dialog)
I tracked that to a call to SDL_GL_LoadLibrary() around line 106 of
engine/platformX86UNIX/x86UNIXGL.cc (in OpenGLDLLInit() )

However, after getting the source to SDL and placing some extra
debug printfs in there, I can see that after a call
to dlopen("libGL.so", RTLD_LAZY | RTLD_GLOBAL) on line 426 of video/x11/SDL_x11gl.c
(SDL.1.2.6)
the dlerror() function returns the string "cannot handle TLS data".

I have libGL.so and friends (from NVidia) in /usr/lib as usual, and
that dir is in the ld.so.conf file (and dlopen() looks there specifically
anyway).

Any ideas what is going on?
What is TLS (Thread Local Storage?? - only think I can think of)

If I make a quicke test.c program that just calls dlopen("libGL.so",TLD_LAZY | RTLD_GLOBAL)
it returns a valid handle without problems.

Any help getting the TGE going would be greatly appreciated.
If it is a bug I'll submit a patch/report (somewhere - SDL maybe, NVidia possibly??)
Cheers,
-David.

#1
09/27/2003 (5:45 pm)
Solved: I had defined LD_ASSUME_KERNEL=2.2.5 in my environment. After unsetting that is works fine.
Sorry.
#2
09/27/2003 (6:58 pm)
That's what you get for using a distro who's package manager doesn't work with kernel 2.6 :)

PS. There's a Linux forum too, better ask there since it wasn't a bug it was a problem in your box.
#3
09/28/2003 (9:48 am)
>That's what you get for using a distro who's package manager doesn't work with kernel 2.6 :)

I'm using kernel 2.4.20-8

>PS. There's a Linux forum too, better ask there since it wasn't a bug it was a problem in your box.

I didn't know that before I found the problem.
#4
09/28/2003 (6:28 pm)
Using 2.4.20? And why do you have that LD_ASSUME thing?