PDA

View Full Version : Installing OpenGl under Redhat 9



03-18-2004, 09:25 AM
I have problems with installin OpenGL under RedHat 9. I have no idea what to do. maybe somone could describe step by step how to install OpenGL under Red Hat 9.0. I will be very grateful. Also how to compile anything. I am doing something like this:

gcc -o -Wall opengl opengl opengl.cpp -L/usr/X11/lib -L/usr/X11R6/lib -lglut -lMesaGLU -lMesaGL -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm

errors says that there are no libraries, for example:
/usr/bin/ld: cannot find -lMesaGLU

HELP !

jackhollow
03-19-2004, 04:49 AM
One way is to find on the web the glut rpm packages:
glut-3.7-8.rpm
glut-devel-3.7-8.rpm
and install them (with rpm -ivh ...)

Then compile your code with something like:

gcc file.c -o file -lGL -lm -lGLU -lglut


The newer glut-3.7-12 packages didn't seem to work very well; other ppl suggested using the -7 versions.

03-20-2004, 07:38 AM
durring installing packages:
-------------------------------------------
# rpm -ivh glut-3.7-8.src.rpm
warning: glut-3.7-8.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
1:glut ########################################### [100%]
--------------------------------------------

and when I try compile program:
--------------------------------------------
gcc opengl.cpp -o opengl -lGL -lm -lGLU -lglut
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XGetExtensionVersion'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XFreeDeviceList'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XQueryDeviceState'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XListInputDevices'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XFreeDeviceState'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XOpenDevice'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XmuLookupStandardColormap'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XSelectExtensionEvent'
collect2: ld returned 1 exit status

--------------------------------------------
Maybe somone know what to do.
Thanks!

jide
03-20-2004, 06:53 PM
Originally posted by Tomi:
durring installing packages:
and when I try compile program:
gcc opengl.cpp -o opengl -lGL -lm -lGLU -lglut
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libglut.so: undefined reference to `XGetExtensionVersion'
...
Maybe somone know what to do.
Thanks!


But you did seem to know how to achieve that !!!

Hope this helps.

nexusone
03-29-2004, 06:13 AM
OpenGL is already installed on RH 9.0 and I think as far back as RH 7.0 or earlier.

When compiling use the library's files located in usr\lib

Use the following library's: -lGL -lGLU -lglut

Note glut runtime and libraries must be installed since only the core openGL library are installed normally.

Note to avoid a little bug in the later builds of glut, use the glut-3.7-8.src.rpm to rebuild both librarys.

From a console window:
rpmbuild --rebuild glut-3.7-8.src.rpm

This will place new rebuilt glut rpms in /usr/src/redhat/RPMS/i386/

Then chage to that directory and install them:
If you had already installed the glut-3.7-10 or 12 build, you will need to over write them.

rpm --install --oldpackage --force glut-3.7-8.rpm

rpm --install --oldpackage --force glut-devel-3.7-8.rpm

Then the glut compile error on the x-window stuff should no longer come up.




Originally posted by Tomi:
I have problems with installin OpenGL under RedHat 9. I have no idea what to do. maybe somone could describe step by step how to install OpenGL under Red Hat 9.0. I will be very grateful. Also how to compile anything. I am doing something like this:

gcc -o -Wall opengl opengl opengl.cpp -L/usr/X11/lib -L/usr/X11R6/lib -lglut -lMesaGLU -lMesaGL -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm

errors says that there are no libraries, for example:
/usr/bin/ld: cannot find -lMesaGLU

HELP !

03-30-2004, 07:36 PM
I'm running RedHat9 on an ATI 9800 Pro. I have not bothered using Mesa or with rebuilding the glut rpms. But this seemed to work for me:

gcc file.c -lGL -lGLU -lglut -L/usr/X11R6/lib -lX11 -lXi -lXmu -lm -L/usr/lib

Try it!

03-30-2004, 07:38 PM
Oh, I forgot to mention one thing, and probably really important: don't forget to download the latest Linux drivers from ATI. Perhaps that is why I didn't have to rebuild glut.

04-14-2004, 11:10 AM
ATI website only provides linux OpenGL driver for Radon 8500 and upper.

nexusone
04-15-2004, 03:14 PM
I don't manually make my MAKE files, but use Kdevelope GUI.

I know I got the same type error and from the glut build 10, but some time back someone at RedHat put the problem on the build.

And loading the older build 8, over the newer build got rid of the x-windows errors.

Not to say that rebuilding is the only solution.


Originally posted by <Jason K>:
I'm running RedHat9 on an ATI 9800 Pro. I have not bothered using Mesa or with rebuilding the glut rpms. But this seemed to work for me:

gcc file.c -lGL -lGLU -lglut -L/usr/X11R6/lib -lX11 -lXi -lXmu -lm -L/usr/lib

Try it!