Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-14-03, 06:46 PM   #1
driehuis
Registered User
 
Join Date: Apr 2003
Posts: 5
Default Building GL apps [FreeBSD 4.8]

The shared libraries installed by the nvidia driver kit do not contain symbols (they are stripped). That results in link errors when building apps that require libGL.so.

I could work around it by linking to the /usr/X11R6/lib/XXX-libGL.so.1.%%.XFree86-libraries-4.3.0_1 shared library, but that ranks as one of the worst hacks I've had to do lately.

I feel I'm overlooking something obvious.

Here's the history for folks who may be in the know:

When upgrading from FreeBSD 4.7 to 4.8, the upgrade barfed on XFree86. I manually removed everything dealing with X with pkg_delete, and installed the 4.8 packages in this order:
- XFree86-4.3.0
- Mesa
- nvidia-driver (from /usr/ports)

Precompiled apps work fine, but recompiling them won't:

% make
gcc -pthread -g -O2 -pipe -L/usr/local/lib -L/usr/X11R6/lib -o gl-info gl-info.o -lglut -lGLU -lGL -lXmu -lXt -lSM -lICE -lXi -lXext -lX11 -lm -lm
/usr/X11R6/lib/libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
/usr/X11R6/lib/libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
/usr/X11R6/lib/libglut.so: undefined reference to `glXChannelRectSyncSGIX'
/usr/X11R6/lib/libglut.so: undefined reference to `glXChannelRectSGIX'
/usr/X11R6/lib/libglut.so: undefined reference to `glXQueryChannelRectSGIX'

Seeing that the nvidia drivers moved the libGL.so that came with XFree out if the way, and replacing them with a stripped library, I can understand the behavior. But it did this as well on FreeBSD 4.7, so I'm at a complete loss as to what is different.

I copied the original XFree86 libGL.so to a directory earlier in the (-L) link timepath but later in the (ldconfig) runtime path, which works but is jucky at best...
driehuis is offline   Reply With Quote
Old 04-14-03, 09:42 PM   #2
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

The problem isn't that libGL is stripped. If it was stripped, then it wouldn't work at all -- you'd be getting a LOT more undefined references, like to every single GL* function. Unless you mean that the debug data is stripped out of them? That affects linking in exactly zero ways.

There is another thread going, about problems with various glut implementations that do not properly query extensions (they just assume the SGI extensions will be there, when they in fact are not -- what they should do is use glXGetProcAddressARB() or whatever the function is, and bind at runtime), and just assume these SGI extensions exist.

The RedHat default libglut does the exact same thing. The fix is to recompile Mesa's glut -- search for your missing symbols to find the thread. I've explained in there how to do it (for Linux, but it should work with BSD as well). You'll then have to remove the X11R6 glut library.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 04-15-03, 05:30 PM   #3
driehuis
Registered User
 
Join Date: Apr 2003
Posts: 5
Default

Yeah, you're right, of course. I forgot that FreeBSD's .so's are a bit different from BSDi's ;-)

Thanks for taking the time to point out the errors of my ways, and for the pointer.
driehuis is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
NVIDIA 302.17 - missing apps: nvidia-settings, nvidia-installer, nvidia-xconfig zbiggy NVIDIA Linux 6 06-20-12 04:54 PM
Panel: Exascaling Your Apps News Archived News Items 0 06-10-12 02:30 AM
Great apps for Release Preview: third-party Metro apps in Windows 8 News Archived News Items 0 06-02-12 03:10 AM
Exascale Apps Pave Way To Supercomputing Greatness News Archived News Items 0 05-16-12 11:30 PM
NVIDIA 302.07 - missing apps: nvidia-settings, nvidia-installer, nvidia-xconfig zbiggy NVIDIA Linux 3 05-02-12 04:04 PM

All times are GMT -5. The time now is 03:30 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.