View Full Version : Redhat 9, glut, and nvidia driver 4349
Galahad
04-11-03, 05:34 PM
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:
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:
/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.
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.
Galahad
04-11-03, 06:38 PM
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.
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/showfiles.php?group_id=3&release_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.
bahamot
04-11-03, 10:47 PM
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:
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:
/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
andyross
04-14-03, 10:12 AM
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/show_bug.cgi?id=88323
Andy Mecham
04-14-03, 06:48 PM
How does one become authorized to view that bug?
--andy
andyross
04-14-03, 06:55 PM
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.
Heh. Yay, people that assume the libraries on their system are what everyone in the world uses... :rolleyes:
Strike umpteen-million against RedHat... ;)
andyross
04-15-03, 12:20 AM
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.
Ah, so it's SGI's fault then.
OK, I take that back. Umpteen million minus one strikes against RedHat. :p
andyross
04-15-03, 11:36 AM
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.
Hmm... I see.
So why hasn't SGI redone their glut library to implement the newer extension mechanism? Whether or not it was supported back in '98, 5 full years ago, shouldn't have any bearing on what's being written now... right?
OpenGL 1.4 is out now, and 1.5 is being decided on by the ARB (at least, I assume it is, since they won't just sit on their hands after releasing a version of the spec...), so arguments about it not working with 1.2 (when 1.2 did something wrong; in this case, extensions) are really irrelevant, IMHO.
They could even autodetect (perhaps even at runtime, through the use of GNU libltdl) which version of the GL lib is being used, and use the extension mechanism if needed, otherwise use ltdlsym() (which is the libtool equivalent of the extension mechanism).
andyross
04-15-03, 12:07 PM
GLUT is a sample code toolkit, it isn't under development currently, and probably won't be in the future. SGI still distributed their version unchanged, but the Mesa project has apparently taken over de-facto responsibility for GLUT maintenance.
There is also a FreeGLUT toolkit available, although I haven't tried it.
Ah, OK. So the Mesa version is the current.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.