PDA

View Full Version : Installed NVidia => Doesn't link anymore??



12-16-2001, 12:22 PM
I downloaded nehe tutorial19. It compiled, linked and ran ok, but very slow since NVidia drivers were not installed.
I installed nvidia drivers but now the tutorial doesn't link anymore, why??

Here are part of linking result:

gcc -Wall -pedantic -ansi lesson19.c -o lesson19 -L/usr/X11R6/lib -lGL -lGLU -lXxf86vm
/tmp/cc6ZuAGu.o: In function `killGLWindow':
/tmp/cc6ZuAGu.o(.text+0x15de): undefined reference to `XCloseDisplay'
/tmp/cc6ZuAGu.o: In function `createGLWindow':
/tmp/cc6ZuAGu.o(.text+0x1605): undefined reference to `XOpenDisplay'
/tmp/cc6ZuAGu.o(.text+0x17cf): undefined reference to `XCreateColormap'
/tmp/cc6ZuAGu.o(.text+0x1888): undefined reference to `XFree'
/tmp/cc6ZuAGu.o(.text+0x18f3): undefined reference to `XCreateWindow'
/tmp/cc6ZuAGu.o(.text+0x191f): undefined reference to `XWarpPointer'
/tmp/cc6ZuAGu.o(.text+0x1936): undefined reference to `XMapRaised'
/tmp/cc6ZuAGu.o(.text+0x1955): undefined reference to `XGrabKeyboard'
/tmp/cc6ZuAGu.o(.text+0x197e): undefined reference to `XGrabPointer'
/tmp/cc6ZuAGu.o(.text+0x19ea): undefined reference to `XCreateWindow'
/tmp/cc6ZuAGu.o(.text+0x1a09): undefined reference to `XInternAtom'
/tmp/cc6ZuAGu.o(.text+0x1a28): undefined reference to `XSetWMProtocols'
/tmp/cc6ZuAGu.o(.text+0x1a4c): undefined reference to `XSetStandardProperties'
/tmp/cc6ZuAGu.o(.text+0x1a63): undefined reference to `XMapRaised'
/tmp/cc6ZuAGu.o(.text+0x1ab8): undefined reference to `XGetGeometry'
It seems that every undefined references are to every X* function.
What do I need to install?

Spiral Man
12-16-2001, 12:57 PM
add, -lXll to the gcc call...

12-16-2001, 01:04 PM
didn't help http://www.opengl.org/discussion_boards/ubb/frown.gif
It linked and ran ok before I installed NVidia newest drivers. Everything is working well, but can't link?

What might it have removed?

12-16-2001, 01:24 PM
Hm, installed again the nvidia-glx part.
Now there are much less errors???
Maybe reboot helps... NOW!

12-16-2001, 01:37 PM
didn't help. Installed all nvidia-drivers again. but no http://www.opengl.org/discussion_boards/ubb/frown.gif

If someone knows what causes these linking errors, please help:

gcc -Wall -pedantic -ansi lesson19.c -o lesson19 -L/usr/X11R6/lib -lGL -lGLU -/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o)(.text+0x7d9): more undefined references to `XMissingExtension' follow
/usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In function `eh_context_free':
_eh.o(.text+0xe8): undefined reference to `pthread_setspecific'
/usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In function `eh_threads_initialize':
_eh.o(.text+0x169): undefined reference to `pthread_key_create'
/usr/lib/gcc-lib/i386-linux/2.95.4/libgcc.a(_eh.o): In function `eh_context_specific':
_eh.o(.text+0x276): undefined reference to `pthread_getspecific'
_eh.o(.text+0x295): undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [all] Error 1
lXxf86vm -lX11
/usr/X11R6/lib/libGL.a(glxext.o): In function `__glXGetCurrentContext':
glxext.o(.text+0x1a): undefined reference to `pthread_key_create'
glxext.o(.text+0x31): undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glxext.o): In function `__glXSetCurrentContext':
glxext.o(.text+0x5a): undefined reference to `pthread_key_create'
glxext.o(.text+0x75): undefined reference to `pthread_setspecific'
/usr/X11R6/lib/libGL.a(glxext.o): In function `__glXCloseDisplay':
glxext.o(.text+0xc7): undefined reference to `XextRemoveDisplay'
/usr/X11R6/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
glxext.o(.text+0x14c): undefined reference to `XextCreateExtension'
glxext.o(.text+0x16b): undefined reference to `XextFindDisplay'
glxext.o(.text+0x190): undefined reference to `XextAddDisplay'
/usr/X11R6/lib/libGL.a(glxext.o): In function `__glXInitialize':
glxext.o(.text+0x78b): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(dri_glx.o): In function `OpenDriver':
dri_glx.o(.text+0x297): undefined reference to `dlopen'
dri_glx.o(.text+0x2a6): undefined reference to `dlerror'
/usr/X11R6/lib/libGL.a(dri_glx.o): In function `Find_CreateScreenFuncs':
dri_glx.o(.text+0x3a5): undefined reference to `dlsym'
dri_glx.o(.text+0x3d2): undefined reference to `dlclose'
/usr/X11R6/lib/libGL.a(dri_glx.o): In function `driDestroyDisplay':
dri_glx.o(.text+0x41f): undefined reference to `dlclose'
/usr/X11R6/lib/libGL.a(dri_glx.o): In function `register_extensions_on_screen':
dri_glx.o(.text+0x64a): undefined reference to `dlsym'
dri_glx.o(.text+0x65c): undefined reference to `dlclose'
/usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_InitTSD':
glthread.o(.text+0x21): undefined reference to `pthread_key_create'
/usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_GetTSD':
glthread.o(.text+0x75): undefined reference to `pthread_getspecific'
/usr/X11R6/lib/libGL.a(glthread.o): In function `_glthread_SetTSD':
glthread.o(.text+0xa8): undefined reference to `pthread_setspecific'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `find_display':
XF86dri.o(.text+0x14): undefined reference to `XextCreateExtension'
XF86dri.o(.text+0x30): undefined reference to `XextFindDisplay'
XF86dri.o(.text+0x55): undefined reference to `XextAddDisplay'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `close_display':
XF86dri.o(.text+0x73): undefined reference to `XextRemoveDisplay'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryVersion':
XF86dri.o(.text+0xe6): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryDirectRenderingCapable':
XF86dri.o(.text+0x1fa): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `XF86DRIOpenConnection':
XF86dri.o(.text+0x30a): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `XF86DRIAuthConnection':
XF86dri.o(.text+0x496): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(XF86dri.o): In function `XF86DRICloseConnection':
XF86dri.o(.text+0x5ae): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libGL.a(XF86dri.o)(.text+0x66e): more undefined references to `XMissingExtension' follow
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `find_display':
XF86VMode.o(.text+0x14): undefined reference to `XextCreateExtension'
XF86VMode.o(.text+0x30): undefined reference to `XextFindDisplay'
XF86VMode.o(.text+0x55): undefined reference to `XextAddDisplay'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `close_display':
XF86VMode.o(.text+0x73): undefined reference to `XextRemoveDisplay'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `XF86VidModeQueryVersion':XF86VMode.o(.text+0xea): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `XF86VidModeSetClientVersion':
XF86VMode.o(.text+0x202): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `XF86VidModeSetGamma':
XF86VMode.o(.text+0x2ce): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `XF86VidModeGetGamma':
XF86VMode.o(.text+0x416): undefined reference to `XMissingExtension'
/usr/X11R6/lib/libXxf86vm.a(XF86VMode.o): In function `XF86VidModeGetModeLine':
XF86VMode.o(.text+0x55a): undefined reference to `XMissingExtension'

going to sleep now...

Spiral Man
12-16-2001, 02:53 PM
ahh... looks like you arent linking to pthread. add -lpthread before the gl libs.

zerodeux
12-16-2001, 10:29 PM
Run 'make' as root in the NVIDIA_GLX-1.0-2313 folder. This will clean up DRI and properly install nvidia's proprietary libs. You have stale files from DRI (you're linking against a GL static library from DRI).

12-16-2001, 10:45 PM
"Run 'make' as root in the NVIDIA_GLX-1.0-2313 folder."
Jeah, that helped. Working lika a charm http://www.opengl.org/discussion_boards/ubb/smile.gif

This is whatr it did:

Removing all old and conflicting files!
rm -f //usr/lib/libGL.*
rm -f //usr/lib/libGLcore.*
rm -f //usr/X11R6/lib/libGL.*
rm -f //usr/X11R6/lib/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libGLcore.*
rm -f //usr/X11R6/lib/modules/extensions/libglx.*
Installing new drivers
install usr/lib/libGL.so.1.0.2313 //usr/lib
install usr/lib/libGLcore.so.1.0.2313 //usr/lib
install usr/X11R6/lib/modules/drivers/nvidia_drv.o //usr/X11R6/lib/modules/drivers
install usr/X11R6/lib/modules/extensions/libglx.so.1.0.2313 //usr/X11R6/lib/modules/extensions
/sbin/ldconfig -n //usr/lib
cd //usr/lib/; ln -fs libGL.so.1.0.2313 libGL.so
cd //usr/X11R6/lib/modules/extensions; \
ln -fs libglx.so.1.0.2313 libglx.so
Installing documentation in //usr/share/doc/NVIDIA_GLX-1.0
mkdir -p //usr/share/doc/NVIDIA_GLX-1.0/usr/include
cp -r usr/include/* //usr/share/doc/NVIDIA_GLX-1.0/usr/include
cp -r usr/share/doc/* //usr/share/doc/NVIDIA_GLX-1.0