Game Development Community

Problem linking Torque against libGLU.so on Mandrake 8.2

by Mike Stoddart · in Technical Issues · 05/03/2002 (10:32 am) · 9 replies

I can't link the Torque engine against libGLU.so.

[mike@dobber torque]$ make
Creating library out.GCC2.RELEASE/lpng.a
Creating library out.GCC2.RELEASE/zlib.a
Creating library out.GCC2.RELEASE/ljpeg.a
Creating library out.GCC2.RELEASE/lungif.a
--> Linking out.GCC2.RELEASE/torqueDemo.exe
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make[1]: *** [out.GCC2.RELEASE/torqueDemo.exe] Error 1
make: *** [default] Error 2

I thought (rightly or wrongly) that libGLU.so was part of the Mesa distribution, so I made sure that they're all installed using RPM:

[root@dobber RPMS2]# rpm -qa | grep Mesa
libMesaGL1-4.0.1-4mdk
libMesaGLU1-4.0.1-4mdk
libMesaGLU1-devel-4.0.1-4mdk
libMesaglut3-4.0.1-4mdk

And using locate I get:

[root@dobber RPMS2]# locate libGLU.so
/usr/X11R6/lib/libGLU.so.1.3.401
/usr/X11R6/lib/libGLU.so.1

I know I'm missing something simple, but I can't for the life of me think what it is!!! Any suggestions appreciated!

Thanks

#1
05/03/2002 (10:57 am)
All I can think of off the top of my head is that your /etc/ld.so.conf file does not contain the path /usr/X11R6/lib/

Check if that line is in that file. Then run ldconfig (as root), and try compiling again
#2
05/03/2002 (2:00 pm)
Does your system have a _static_ libGLU available? (i.e.: /usr/lib/libGLU.a). If not, you won't be able to link. You can fix this in two ways:

1) Change LINK.LIBS.CLIENT.DYNAMIC in conf.UNIX.mk:
-Wl,-static -Wl,-lGLU -Wl,-dy
to
-lGLU

or

2) Install the mesa source and recompile it, which will hopefully give you the static library.

Note that if you do 1) you may get crashes in the terrain editor. This is the original reason why I changed it to require a static GLU. I may revisit this...I don't like the fact that it now requires the static library.
#3
09/04/2002 (3:41 am)
Hello.

I encountered the same problem with my Mandrake 8.2 DLE. I hope the suggestion above will fix it ...

:)
#4
09/04/2002 (4:10 am)
I solved this problem by downloading the mesa sourcecode and recompiling it...

to configure it, i used :

./configure --enable-static

Then of course i compiled it :

make

Then Installed it :

su

make install

This made a libGLU.a file (which is needed)
=)

Hope that helps.
#5
09/04/2002 (4:35 am)
I hoped it does.

I'm downloading the Mesa3D files now but Im still in my day job (which doesn't have a Linux machine).

Hmmm. Cant wait to go home. :)

Alex
#6
09/04/2002 (7:18 am)
This is bad.

I got the Mesa3D library compiled and installed to my
IBM T23 Thinkpad. I compiled Torque with no problem but
when I ran torqueDemo.exe ... I get a (drum roll)
"segmentation fault". :((

My system specs is:
Mandrake Linux 8.2 DLE
16MB VRAM S3 SuperSavage
256MB RAM w/out a Swap Partition (It runs faster w
ithout one).
20GB HD
NOTE: This is my wife's computer and she's currently
using my Desktop playing Anarchy Online ... which would
take hour's before I can get it back. So as soon as I get
my PC back, I'll try it on that since its using a NVIDIA
GEForce4 420 MX. I hope it works there ... otherwise I'm
stuck with making my game in M$-Windows. :((

Alex
#7
09/07/2002 (2:55 am)
Ok. Finished testing on my desktop machine and it worked!!!

So my desktop machine is a:
Mandrake Linux 8.2 DLE
Pentium IV 1.4GHz 640MB RAM
NVidia GEForce4 MX 420 64MB VRAM

So what I did was:
1. Made sure that my wife wasn't in the house. ;P
2. Re-installed the Mandrake.
3. Install SDL Development Libraries.
4. Compiled OpenAL.
5. Compiled Mesa3D with the options described by Stuart Urquhart.
6. Compiled Torque.
7. Installed the LATEST NVIDIA glx drivers.
8. Have some fun with the FPS mod. :D

It works. :)

Hmmm. Theres a downside though. My problem now is that Torque is reporting that it cannot detect OpenAL. Also, how to explain to my wife why her ./mail directory is missing. ;D

Alex
#8
09/07/2002 (3:57 am)
Openal may be being installed in a directory which is not on your library path....

(make sure you have root access)
1)Find libopenal.so (or whatever its called) and note down where it is being stored.
2)Edit /etc/ld.so.conf and add that directory to the list.
3)Type ldconfig

Then run torque. It should now find OpenAl.

I noticed there was a slight delay in the sound with openal (creative's cvs version i got a while ago) - i am unsure why this is... only does it in mandrake.
Its probably just my system :p
#9
05/22/2003 (2:18 pm)
Alex,
I recommend you have your hard drive(s) partitioned so that /home is on a different partition/disk. That way you can reinstall your flavour of Lunix (or even a completely new on if you decide to change it) and keep all your personal stuff. In the installation process tell it to use your existing partition as /home and to not format it and there you go! How you would exactly do that depends on each different Lunix installer and distribution but it's available in just about every modern and sensibly written installer.

Since all your configuration stuff is kept under ~/.appname (or at least, should be) you can install a new distribution and nine times out of ten you'll barely have to even change settings around.

Incidentally, I ideally recommend having a setup akin to this:

/ - About 400M will do it comfortably, with some space to spare.
/home
/usr

Divide the last two up as you see fit. Unless you play a LOT of games you shouldn't need more than, say, 10gig for USR however. Maybe a couple more to be safe. Anything that can be considered to be your movements around the system (mail, work, mp3s etc.) you should keep on /home

My apologies if I'm just stating stuff you already know. If so, well, maybe someone else reading this might find it useful.

Just another advantage over Windows in my opinion. Being able to store individual program configuration details as well as your personal data between reinstalls :)