The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 09, 2024, 11:49:05 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Compile problems on Linux
« previous next »
Pages: [1] Print
Author Topic: Compile problems on Linux  (Read 2948 times)
Nameless One
Guest


Email
Compile problems on Linux
« on: September 23, 2005, 10:49:26 pm »

I'm trying to compile Ur-Quan Masters v0.4.0 on my SUSE linux. I already have all the required libraries installed. I unpacked the source files into /root/uqm-0.4.0. I cannot use rpm to install the game because I want to compile it without OpenGL. I downloaded the contents package into /root/uqm-0.4.0/content/packages. When I tried to compile the source with "build.sh uqm" it said that it cannot find SDL_image, which I was sure I had installed. After some time, I found out that compilation is looking for libSDL_image.o file and the file I had installed was libSDL_image-1.2.o. After renaming the file, the SDL_image check passed, but compilation now couldn't find SDL_image.h file. That's when I realized that I also need the source of SDL_image. Downloaded the source and unpacked it to /usr/lib, but it didn't work. It worked when I unpacked it to /root/uqm-0.4.0/src, but I have a new error, and this one I don't understand:

/usr/lib/libSDL.a(SDL_aavideo.o)(.text+0x426): In function 'AA_VideoQuit':
: undefined reference to 'aa_uninitkbd'

Then it goes on for the following functions and undefined references:
AA_VideoQuit references to aa_uninitmouse
AA_VideoQuit references to aa_close
AA_DirectUpdate references to aa_renderpalette
AA_DirectUpdate references to aa_flush
AA_VideoInit references to aa_parseoptions
AA_VideoInit references to aa_defparams
AA_VideoInit references to aa_autoinit
AA_VideoInit references to aa_autoinitkbd
AA_VideoInit references to aa_autoinitmouse
AA_VideoInit references to aa_getrenderparams
AA_VideoInit references to aa_resizehandler
AA_ResizeHandler references to aa_resize
AA_ResizeHandler references to aa_renderpalette
AA_ResizeHandler references to aa_flush
AA_PumpEvents references to aa_getmouse
AA_PumpEvents references to aa_getevents

Then it says:
collect 2: ld returned 1 exit status
make: *** [target-uqm-debug] Error 1

What do I do now? Did I do anything wrong?

Thanks in advance.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Compile problems on Linux
« Reply #1 on: September 23, 2005, 10:59:40 pm »

While trial and error is usually a good way to learn about things, you're going to make a mess of your system.
There are separate packages of SDL and SDL_image for development. If you install the development packages, you don't have to worry about the SDL and SDL_image source.
I also suspect you're talking about libSDL_image-1.2.a, not libSDL_image-1.2.o. There's no need to rename it. You just need a symbolic link. These are automatically created when you run 'ldconfig' as root. rpm should have done this for you when it installed SDL_image.
As for the errors, it appears that SDL is compiled with AAlib support, but AAlib isn't installed. rpm should have had it listed as a dependency and installed it along with SDL. Now you'll have to install it explicitely.

A final hint: you usually don't need to compile programs as root. You can build them as a normal user, and then only run the install command as root.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Compile problems on Linux
« Reply #2 on: September 23, 2005, 11:21:03 pm »

The easy way to get the required development environment to compile UQM on SuSE Linux is to use YaST to install both the runtime and development (-devel) versions of the libraries listed in the UQM documentation (OpenGL headers, SDL, SDL_image, zlib, libogg and libvorbis and the libraries required to use these should be enough) and the C development environment (gcc, make, etc.). Everything UQM needs has been part of SuSE for many versions now, so you don't even need to download anything unless you have a really old SuSE version. If you just tell YaST which libraries you need to compile UQM, it'll make sure all the libraries required by the libraries you want are also installed.

If you need to fiddle with names of libraries, you are doing something wrong.

BTW, why do you want to eliminate OpenGL support from UQM? Does your system completely lack OpenGL support, even Mesa software rendering, or do you just like your binaries small?
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Nameless One
Guest


Email
Re: Compile problems on Linux
« Reply #3 on: September 24, 2005, 12:59:54 am »

While trial and error is usually a good way to learn about things, you're going to make a mess of your system.
There are separate packages of SDL and SDL_image for development. If you install the development packages, you don't have to worry about the SDL and SDL_image source.
I also suspect you're talking about libSDL_image-1.2.a, not libSDL_image-1.2.o. There's no need to rename it. You just need a symbolic link. These are automatically created when you run 'ldconfig' as root. rpm should have done this for you when it installed SDL_image.
As for the errors, it appears that SDL is compiled with AAlib support, but AAlib isn't installed. rpm should have had it listed as a dependency and installed it along with SDL. Now you'll have to install it explicitely.

A final hint: you usually don't need to compile programs as root. You can build them as a normal user, and then only run the install command as root.


Devel version of SDL_image is not included in SUSE distro, and I didn't notice it on download page of the project, but now I see its there :-(

You are right that I'm not talking about libSDL_image-1.2.o. It's libSDL_image-1.2.so.0.1.2, and RPM created a link to it called libSDL_image-1.2.so.0. I copied the file to libSDL_image-1.2.so but it didn't work. It only worked when I copied it to libSDL_image.so.

I'm running as root because I logged in as root to configure my wireless card and now I don't want to restart it because it takes too long on my P166 machine with 64MB RAM.

As for the solution to my problem, I'll try to delete the SDL_image files I created and run ldconfig. If it doesn't work, how do I create a new symbolic link?
Logged
Nameless One
Guest


Email
Re: Compile problems on Linux
« Reply #4 on: September 24, 2005, 01:02:10 am »

The easy way to get the required development environment to compile UQM on SuSE Linux is to use YaST to install both the runtime and development (-devel) versions of the libraries listed in the UQM documentation (OpenGL headers, SDL, SDL_image, zlib, libogg and libvorbis and the libraries required to use these should be enough) and the C development environment (gcc, make, etc.). Everything UQM needs has been part of SuSE for many versions now, so you don't even need to download anything unless you have a really old SuSE version. If you just tell YaST which libraries you need to compile UQM, it'll make sure all the libraries required by the libraries you want are also installed.

If you need to fiddle with names of libraries, you are doing something wrong.

BTW, why do you want to eliminate OpenGL support from UQM? Does your system completely lack OpenGL support, even Mesa software rendering, or do you just like your binaries small?

SDL_image-devel is not included in distro. I have version 9.3 Professional. About OpenGL, my linux computer is P166 with 64MB RAM and S3 3D Virge card.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Compile problems on Linux
« Reply #5 on: September 24, 2005, 02:14:19 am »

I'm running as root because I logged in as root to configure my wireless card and now I don't want to restart it because it takes too long on my P166 machine with 64MB RAM.
See 'man su'.

Quote
As for the solution to my problem, I'll try to delete the SDL_image files I created and run ldconfig. If it doesn't work, how do I create a new symbolic link?
See 'man ln'.

Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Nameless One
Guest


Email
Re: Compile problems on Linux
« Reply #6 on: September 24, 2005, 08:58:30 am »

Did everything from the beginning and everything works ok now until AAlib problem. I have AAlib installed. It is version 1.4.0-285.  I saw on the AAlib homepage that version 1.4 is still in RC phase so I'm not sure if I have the correct version intalled. Should I install version 1.2 or the latest 1.4 RC?
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Compile problems on Linux
« Reply #7 on: September 24, 2005, 10:56:37 am »

Everything you need is included in SuSE 9.3 Professional. However, if you've downloaded the ISO images from SuSE or installed from the CDs, you do not have the full distribution (which is only available on DVD and FTP). You need to tell YaST to use the SuSE FTP version (which contains all the files) as an installation source to get the rest of the system. To do so, go to "Change Source of Installation" in the "Software" section in YaST and add FTP (or HTTP) server ftp.sunet.se, directory pub/Linux/distributions/suse/suse/i386/9.3/ (or your local SuSE mirror), anonymous access. The "Install and Remove Software" feature will then be able to download packages from SuSE's FTP server as well.

Using this technique, installing all the libraries and include files and so on to compile UQM is a matter of checking the right boxes in YaST. There is no need to set up symlinks manually unless you are recompiling the libraries yourself.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Nameless One
Guest


Email
Re: Compile problems on Linux
« Reply #8 on: September 24, 2005, 06:57:49 pm »

Thanks, everyone!
Logged
Nameless One
Guest


Email
Re: Compile problems on Linux
« Reply #9 on: September 26, 2005, 12:15:48 am »

Novus, is your YaST able to find developer versions of AAlib and GPM on the ftp server?
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Compile problems on Linux
« Reply #10 on: September 26, 2005, 09:27:27 am »

On the server I mentioned, YaST finds aalib-devel 1.4.0-285 in group Development/Libraries/C and C++. I don't remember installing it, but SDL-devel seems to require it, so YaST must have done that for me. GPM doesn't have a developer version as such (most software seems to use GPM through the GPM daemon), but you can install the source code if you need it (which I doubt).

As a rule, you don't need to worry about installing development versions of libraries that you aren't using directly. If you need to do so, YaST will figure out the dependency and install it automatically. All you need to do is install the libraries (runtime and devel) that UQM uses; YaST will install the libraries that the libraries use and so on.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!