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

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-11-03, 05:34 PM   #1
Galahad
Registered User
 
Join Date: Apr 2003
Posts: 11
Default Redhat 9, glut, and nvidia driver 4349

I installed Redhat 9 and the nvidia 4349 driver. It installed fine, all of my opengl / glut applications that were pre-built ran nicely. However, when I tried to compile the glut projects I've done, I got several linker errors. Here is my compile command:
Code:
g++ -ansi -Wall -Werror -O -o ./Pirates ./source/main.cpp ./source/player.o ./source/terrain.o ./source/waves.o ./source/normals.o -lGL -lGLU -lglut -lgd -lXi -lXmu -L/usr/X11R6/lib
Here are my errors:
Code:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSyncSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelRectSGIX'
collect2: ld returned 1 exit status
I just reinstalled Redhat 8 and the 4349 drivers and that works just fine. Have any of you gotten Redhat 9, the 4349 drivers, and glut to compile or have ideas about what's going on? I appreciate the help, thanks.
Galahad is offline   Reply With Quote
Old 04-11-03, 06:14 PM   #2
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

Try adding -lX11 to the end of the library list.

If that fails, then recompile glut. In my experience, Mesa's glut sometimes pulls in references to SGI GLX extensions that don't exist anywhere on the system -- recompiling glut should help with that.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 04-11-03, 06:38 PM   #3
Galahad
Registered User
 
Join Date: Apr 2003
Posts: 11
Default

Thanks for the reply. I'll try the -lX11. I thought I had done that, but it may have been before I added the -L directory at the end. If that doesn't work, how would I go about recompiling glut? I'm afraid I don't have much experience with recompiling libraries. Thanks again for the suggestions.

I guess this is sort of headed off topic for a nvidia driver forum. Sorry about that, I was thinking it was more driver related.
Galahad is offline   Reply With Quote
Old 04-11-03, 07:45 PM   #4
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

glut isn't extremely hard to compile. The sources are in the MesaDemos package from here (and you need MesaLib as well):

http://sourceforge.net/project/showf...ease_id=149762

Unbzip2 and untar them, then cd into Mesa-5.0.1, and if you're using gcc 3, open up the configure script. If you're not using gcc 3, then you don't have to do anything, but if you are (and AFAIK RH 9 does), then you have to edit line 7126, changing -malign- to -falign- (in all 3 instances).

Save and exit, then run ./configure --prefix=/usr --enable-sse (or omit the --enable-sse if your processor or kernel doesn't support it; most recent kernels do). Then, cd into src-glut and run make, then change to root and make install. Then rerun /sbin/ldconfig, and try recompiling your program (again ). You can delete the Mesa-5.0.1 directory if you need the space for whatever reason.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 04-11-03, 10:47 PM   #5
bahamot
Registered User
 
Join Date: Apr 2003
Posts: 161
Default Re: Redhat 9, glut, and nvidia driver 4349

Quote:
Originally posted by Galahad
I installed Redhat 9 and the nvidia 4349 driver. It installed fine, all of my opengl / glut applications that were pre-built ran nicely. However, when I tried to compile the glut projects I've done, I got several linker errors. Here is my compile command:
Code:
g++ -ansi -Wall -Werror -O -o ./Pirates ./source/main.cpp ./source/player.o ./source/terrain.o ./source/waves.o ./source/normals.o -lGL -lGLU -lglut -lgd -lXi -lXmu -L/usr/X11R6/lib
Here are my errors:
Code:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSyncSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXChannelRectSGIX'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `glXQueryChannelRectSGIX'
collect2: ld returned 1 exit status
I just reinstalled Redhat 8 and the 4349 drivers and that works just fine. Have any of you gotten Redhat 9, the 4349 drivers, and glut to compile or have ideas about what's going on? I appreciate the help, thanks.
just grab the srpm of glut from rpmfind.net
and re-compile and install both glut and glut-devel,
that solved the prob
bahamot is offline   Reply With Quote
Old 04-14-03, 10:12 AM   #6
andyross
Registered User
 
Join Date: Apr 2003
Posts: 7
Default

This is a Red Hat bug, essentially. They ship
a glut with static links to symbols from the SGIX_video_resize extension, which won't work against libGL's that don't implement that extension.

Sadly they aren't interested in fixing it. Bug Mike Harris at:

https://bugzilla.redhat.com/bugzilla...g.cgi?id=88323
andyross is offline   Reply With Quote
Old 04-14-03, 06:48 PM   #7
Andy Mecham
l33t master
 
Join Date: Jul 2002
Location: Santa Clara, CA
Posts: 1,163
Default

How does one become authorized to view that bug?

--andy
__________________
Andy Mecham
NVIDIA Corporation
Andy Mecham is offline   Reply With Quote
Old 04-14-03, 06:55 PM   #8
andyross
Registered User
 
Join Date: Apr 2003
Posts: 7
Default

Um... I don't think you can. Some terse words were exchanged (I
wasn't happy that he wouldn't look at it, and he *really* wasn't happy
that I reopenned the bug once he marked it deferred), and I think Mike
locked the bug out from the outside world. Here's the final summary
that I posted, sanitized for public viewing:

The GLUT library distributed in Red Hat 9 is compiled from the SGI
source version, which uses compile-time/preprocessor testing to
determine if the host system supports the GLX_SGIX_vidmode_resize
extension. The DRI/Mesa implementation of libGL in XFree86 4.3
supports this exention, therefore the GLUT library requires it to run.

The problem is that third partly OpenGL implementations (among them
NVidia and ATI) are not required to implement this extension, and do
not. The system glut library will not link correctly against these
OpenGLs. During compilation, you will receive missing symbol errors
like the following:

... libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
... libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
... libglut.so: undefined reference to `glXChannelRectSyncSGIX'
... libglut.so: undefined reference to `glXChannelRectSGIX'
... libglut.so: undefined reference to `glXQueryChannelRectSGIX'

There is no workaround. You must remove the glut package and install
the GLUT shipped with Mesa. The Mesa package has a GLUT that has been
fixed to use dynamic linkage to extension functions via
glXGetProcAddressARB(), and will therefore work correctly with all
libGL implementations.
andyross is offline   Reply With Quote

Old 04-14-03, 09:38 PM   #9
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

Heh. Yay, people that assume the libraries on their system are what everyone in the world uses...

Strike umpteen-million against RedHat...
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 04-15-03, 12:20 AM   #10
andyross
Registered User
 
Join Date: Apr 2003
Posts: 7
Default

bwkaz: No, that's not fair. The dependency is in SGI's glut code, and has been there for a very long time. It is just now, with the support of the extension in XFree 4.3, that it gets triggered during compilation.

Red Hat didn't find the dependency because, until the release of the 4349 NVidia drivers, there were no libGL's against which they could test that didn't support the extension.

It's an honest bug. I may not like the way that it was handled, but don't irrationally slam the whole distribution for this. There's nothing they could have done (short of shipping the "Mesa glut" instead of the "SGI glut") to avoid the issue, even had they known about it.
andyross is offline   Reply With Quote
Old 04-15-03, 08:46 AM   #11
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

Ah, so it's SGI's fault then.

OK, I take that back. Umpteen million minus one strikes against RedHat.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 04-15-03, 11:36 AM   #12
andyross
Registered User
 
Join Date: Apr 2003
Posts: 7
Default

No, it's not SGI's (well, Mark Kilgard's) fault either. When glut 3.7 was released in 1998, the dynamic extension mechanism didn't exist yet. The only way to use an extension was via compile time binding.

If you insist on assigning blame, then the culpability is with the original OpenGL extension specification, which treated only source-level compatibility. This was fixed (I think) with the 1.2 release.
andyross 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


All times are GMT -5. The time now is 09:34 AM.


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