View Full Version : Linking Problems with nvidia libs (ErrorF, LookupDrawable)
vertalio
03-19-03, 12:28 PM
Hi everybody,
I have a severe problem with the nvidia driver when linking my code against the nvidia native libs.
I am using RedHat 7.3 with XFree 4.3.0 and the current nvidia driver.
I am building a dynamic lib using the GLU GL and glx libraries from nvidia.
However when loading my dynamic library at runtime it always complained that the ErrorF symbol couldn't be found.
After searching the symbol tables of the system libs I found the symbol in the libfntstubs.so added it to my lib list.
O.k. ErrorF problem solved but now it can't resolve the symbol LookupDrawable and I cannot detect the lib this symbol belongs to.
I presume something basic is wrong because I cannot imagine that I have to add a couple of system libs to get the nvidia libs to work.
Any ideas, suggestions, help ?
Thanx in advance
merlin42
03-19-03, 01:56 PM
First this does not sound like an "nvidia problem"
Second please explain in more detail exactly what you are doing.
When you state
However when loading my dynamic library at runtime
Do you mean that you are using dlopen/dlsym/dlclose in your program or are you just linking against a .so file?
If you can provide explicit information about what you are doing (ie comand line listings and source code snippets) then there are several people in these formums that might be able to help.
ps nvidia does not produce a GLU library. In general GLU is layered on top of OpenGL and is independant of any specific OpenGL implementation.
vertalio
03-19-03, 03:46 PM
Yes I am using dlopen (sorry, I thought thi was obvious by saying loading at runtime).
Unfortunately I cannot provide code snippets since it it a major plugin based project and I am not sure about the crucial part which may be helpful to you.
It is a qt-3.0.3 based program using dynamic libraries for plugin-like extensions.
One of these plugins bases on OpenGL and causes the already mentioned problems.
The complete error message goes like this: /usr/X11/lib/modules/extensions/libglx.so:undefined symbol: LookupDrawable
However I managed to get things working by copying the static glx lib which is part of the XFree3.0.3 package back to the ....modules/extensions directory and linking my lib with that one which of course is no real solution.
Either way both static and dynamic glx libs have the LookupDrawable as undefined symbol (verifyable by nm) but the static lib seems to know where to find it.
Unfortunately I am no master of linking and system libs so I do not know how the linking is done in detail, but I am sure if I knew the library containing the unresolved symbol I could get the problem solved (if there are no further missing libs).
Your program should not link against libglx.so, and neither should it dlopen() it at runtime!
libglx.so is for the X server. It provides the server-side code for all the GLX functions. The client-side code for GLX is in libX11 instead.
Why are you trying to dlopen libglx?
vertalio
03-20-03, 12:36 AM
Hmh are you sure on that ?
First of all I am not dlopen-ing the
libglx.so but linking my dynamic lib
with it which then by itself is opened
by dlopen from the framework.
I tried it your way by linking with libX11
instead of glx but then the code exits
at the glXQueryExtension invocation
which fails as if there was no glx extension
available.
vertalio
03-20-03, 01:01 AM
Ok problem solved.
It really was the libX11 instead of libglx
problem. I re-installed the glx drivers since I
had made some experiments and rebuilt the whole stuff and the problem disappeared.
Thanks to all contributors
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.