Ambguities in the linux README

Hey i’m just trying to install the GLUT package, and I’m fairly new to linux (actually, that’s an understatement, i’m really new).

In any case, I can get to step 6 (of 7) in the README succesfully, however then I approach an ambiguity. Here it is:

STEP 3 READS:
Change into $GLUT_HOME/lib/glut/. and make a backup copy of
the Makefile. Now, take the Makefile out of the archive and
replace the old one.

I’m assuming the following:

archive == glut-3.7/linux/ (i’m installing this for redhate 8.somethingrather)

THEN STEP 6 READS

Now, back up to $GLUT_HOME/. and:

      make

    This will make all the example programs.

here i’m assuming that $GLUT_HOME/. == $GLUT_HOME/linux

if this is true, then wasn’t i suppose to remove the makefile from the linux directory and place it elsewhere, making step 6 impossible to do.

and even if i left the makefile there, i just get an error message saying i’m missing a particular .o file.

I had to make the second assumption to get to step 6 so I think i’m right there.

anyways, thanks for the help, post in here or email me at alevin@ualberta.ca thanks!

for ease, here is the steps in the README:

  1. Change into $GLUT_HOME/. and make a backup copy of the
    Glut.cf file. Then, take the copy from this archive and move it
    into $GLUT_HOME.

    1. Run the script to build all the makefiles:

      ./mkmkfiles.imake

    2. Change into $GLUT_HOME/lib/glut/. and make a backup copy of
      the Makefile. Now, take the Makefile out of the archive and
      replace the old one.

    3. WHILE STILL IN THE $GLUT_HOME/lib/glut/. DIRECTOR, RUN:

      make

      This should build the shared library ‘libglut.so.3.7’.

      IF YOU HAVE PROBLEMS WITH HEADER FILE DEPENDENCIES, try
      doing:

      make depend
      make

      This should rebuild the Makefile dependencies.

      If this does not work, remove all the lines in “Makefile” below
      the line saying “DO NOT DELETE” (yes, disregard what the line
      says). Then try “make depend; make”

    4. Make two symbolic links:

      ln -s libglut.so.3.7 libglut.so.3
      ln -s libglut.so.3.7 libglut.so

    5. Now, back up to $GLUT_HOME/. and:

      make

      This will make all the example programs.

    6. Add the line from archive file ‘path’ to your .profile, or
      better to your systemwide (/etc/profile). Then logout out and
      back in again (to refresh your path.)

If you are using Redhat why don’t you go the easy way and take the rpm?
It should be on one of the Redhat disks. There will also be a development package (glut-devel) which you need if you want to write your own OpenGL progs.

hih

the step you’re talking about (take the Makefile out of the archive etc…)
you have to take the makefile from $GLUTHOME/linux and put it to $GLUTHOME/lib/glut
then make in this directory and go to $GLUTHOME and make to build the examples

thanks satan, i’ll try looking for the disks (it’s a work computer, i don’t know where they are) or on the internet for the rpm.

m0rg, that is what I had thought, except when i go into GLUTHOME/ and do a make, i get errors.

gcc -o test1 -O2 -march=i386 -mcpu=i686 -pipe -L/usr/X11R6/lib test1.o
./lib/glut/libglut.so …/…/…/lib/libMesaGLU.so …/…/…/lib/libMesaGL.so - -lXt -lSM -lICE -lXext -lX11 -lXi -lXext -lX11 -lm
gcc: …/…/…/lib/libMesaGLU.so: No such file or directory
gcc: …/…/…/lib/libMesaGL.so: No such file or directory
make[2]: *** [test1] Error 1
make[2]: *** Waiting for unfinished jobs…

thanks!

the only rpm i could find was a .src.rpm type file which for some reason enevitally ended up with me having to do the make style again.

I really just wanna work through these simple examples in this text book i’m reading ;\

Originally posted by arc:
[b]the only rpm i could find was a .src.rpm type file which for some reason enevitally ended up with me having to do the make style again.

I really just wanna work through these simple examples in this text book i’m reading ;[/b]

Take a look here: http://rpmfind.net/

yeah that’s where i found the .src.rpm

maybe i’m not installing it right. but i downloaded it and typed

rpm -i yaddayadda.src.rpm

after that it did nothing. until i looked in /usr/src/redhat/SOURCES

and there i found a .gz file called “glut-3.7” which when untarred fantastically lead me back to the makefile issue!

Originally posted by arc:
[b]yeah that’s where i found the .src.rpm

maybe i’m not installing it right. but i downloaded it and typed

rpm -i yaddayadda.src.rpm

after that it did nothing. until i looked in /usr/src/redhat/SOURCES

and there i found a .gz file called “glut-3.7” which when untarred fantastically lead me back to the makefile issue![/b]

First, if I search for glut on rpmfind.net then I get lots of glut packages. Perhaps you missed the link to the binary rpm. It is this big headline on the rpm desciption page (not the one in the green box). So here are the ones you need for Redhat 8.0:
ftp://rpmfind.net/linux/redhat/8.0/en/os/i386/RedHat/RPMS/glut-3.7-8.i386.rpm
ftp://rpmfind.net/linux/redhat/8.0/en/os/i386/RedHat/RPMS/glut-devel-3.7-8.i386.rpm

Second, yes you installed it wrong.
If you install a source rpm this way (which is the recommended way for installing binary rpms) then it will only install the source on your system.
Source rpms are for building binary rpms and you have to use the rpm-build command to compile them.

So just grab the binary rpms, install them and there you go.

hih

[This message has been edited by satan (edited 06-20-2003).]

thank you very much for your help satan. Unfortunatley I couldn’t get those rpm’s to work, as soon as i would type “rpm -i lsjdf.rpm” the system would hang. I couldn’t even contr-C out of it.

However, I stumbled upon a page on the internet that had some instructions on removing some lines from the makefiles and what not. THis in the end worked.

basically, I think that glut assumes you have Mesa already installed (at least that’s what I figured). I had to replace a bunch of lMesa lines to just lGLU and lGL.

In any case, the install worked, but now I don’t understand the command line to compile my simple code to open a window. For includes i have

#include <stdio.h>
#include <stdlib.b>
#include <GL/glut.h>

and to compile i type

gcc -lm -lGLU -lGL -o test test.c

and i get errors on the glut functions.

I tried deciphering the makefiles for the test programs (which work) but that only made me more confused.

where are you supposed to find the linker information?

i feel so lost ;\

thanks!

i’ve also tried adding:

-lGLUT

and

-lX11

both of which cannot be found (said by the compiler).

here are some of the errors:

/tmp/ccy9gPYu.o(.text+0x3f): undefined reference to `glutInit’

and so forth.

whoopS!

problem solved I had to have

-lglut

insteda of

-lGLUT

thanks so much for all your help!!

hopefully I won’t have to see you in other threads!

-aaron

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.