Can't Build glut-3.7

John Gay johngay at eircom.net
Fri Aug 27 05:48:29 PDT 2004


On Fri 27 Aug 2004 10:55, dienadel wrote:
> Hello,
>
> I can't build glut-3.7, but i don't know why, because there is no error
> messages. What i do:
>
First, a word of warning. Glut does not follow standard Linux build structure 
and does not install itself. It only compiles in it's local tree. You then 
need to copy it into your system manually. At least the last time I built it.

> cd glut-3.7
> cp linux/Glut.cf .
> ./mkmkfiles.imake
> cd lib/linux
> make
>
From the linux/README: 
<QUOTE>
     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.

     2) Run the script to build all the makefiles:

          ./mkmkfiles.imake

     3) 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.

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

          make

        This should build the shared library 'libglut.so.3.7'.
</QUOTE>

Based on your instructions, you've missed a few steps. That may be why you're 
missing libglut.so.3.7

> The build process finishes without errors or something similar, but, as
> said in the README: "This should build the shared library 'libglut.so.3.7'"
>
> But i haven't it. The most similar is "libglut.a", but as the next
> instructions are:
> ln -s libglut.so.3.7 libglut.so.3
> ln -s libglut.so.3.7 libglut.so
> i can't follow up
>
> Perhaps, the instructions says that before doing "make": ***Now, take the
> Makefile out of the archive and replace the old one.*** (when says this, is
> supposed that i'm in the directory lib/glut). I don't exactly understand
> this, so i've probed running "make" with the Makefile that appears when i
> enter in lib/linux, and with the Makefile.bak, that i suppose is the
> original but after running ./mkmkfiles.imake has changed. But the results
> are the same.
>
> Any idea?
>
glut is a very basic library, but is not written for Linux, and is written for 
people who know where to put shared and static libs on their system.

Since I don't fully understand either, I just followed the linux/README to the 
letter, and then copied the various libs and headers manually.

So, follow the directions correctly. Assuming /usr/src/glut-3.7:

cd /usr/src/glut-3.7
mv Glut.cf Glut.cf.bak
cp linux/Glut.cf .
./mkmkfiles.imake
cd lib/glut
mv Makefile Makefile.bak
cp ../../linux/Makefile .
make
ln -s libglut.so.3.7 libglut.so.3
ln -s libglut.so.3.7 libglut.so
cd ../..
make

Now is where things get tricky. If you read the end of the README, this has 
only been tried on Slackware 3.0

As I understand it, the glut libs belong in the same place as the GL and GLU 
libs and the headers are similar. So I copied them to 
/usr/X11R6/include/*
/usr/X11R6/lib/*

This may or may not be the smartest thing, but it works here. Maybe someone 
could look at a patch to fix glut properly? I'd be interested in contacting 
Mark Kilgard about improving linux support for glut.

> Thanks
>
HTH

Cheers,

	John Gay



More information about the lfs-chat mailing list