Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Trac3R on September 05, 2006, 03:40:51 pm

Title: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: Trac3R on September 05, 2006, 03:40:51 pm
Hi,

I have some difficulties to compile fs2_open on my SuSE system.
I did it exactly like it's recommended in the Mini-Howto here (http://www.hard-light.net/forums/index.php?topic=36778.0).
The ./configure script doesn't find any missing dependencies, so I run make:

--------

sadow@C3PO:~/Spiele/FS2_open/fs2_open-3.6.7> make
Making all in libjpeg
make[1]: Entering directory `/home/shared/FS2_open/fs2_open-3.6.7/libjpeg'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory `/home/shared/FS2_open/fs2_open-3.6.7/libjpeg'
Making all in code
make[1]: Entering directory `/home/shared/FS2_open/fs2_open-3.6.7/code'
g++ -g -O2 -Wall -I/usr/include/SDL -D_REENTRANT -fsigned-char -Wno-unknown-pragmas  -Wno-deprecated -Wno-char-subscripts  -g  -lGL -lGLU -lopenal -L/usr/lib -lSDL -lpthread -logg -lvorbis -lvorbisfile  -o fs2_open_r  freespace.o levelpaging.o libcode.a ../libjpeg/libjpeg.a
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_parseoptions'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_defparams'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_autoinit'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_autoinitkbd'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_autoinitmouse'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_getrenderparams'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoInit':
: undefined reference to `aa_resizehandler'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_ResizeHandler':
: undefined reference to `aa_resize'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_ResizeHandler':
: undefined reference to `aa_renderpalette'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_ResizeHandler':
: undefined reference to `aa_flush'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_DirectUpdate':
: undefined reference to `aa_renderpalette'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_DirectUpdate':
: undefined reference to `aa_flush'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoQuit':
: undefined reference to `aa_uninitkbd'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoQuit':
: undefined reference to `aa_uninitmouse'
/usr/lib/libSDL.a(SDL_aavideo.o): In function `AA_VideoQuit':
: undefined reference to `aa_close'
/usr/lib/libSDL.a(SDL_aaevents.o): In function `AA_PumpEvents':
: undefined reference to `aa_getmouse'
/usr/lib/libSDL.a(SDL_aaevents.o): In function `AA_PumpEvents':
: undefined reference to `aa_getevent'
collect2: ld returned 1 exit status
make[1]: *** [fs2_open_r] Fehler 1
make[1]: Leaving directory `/home/shared/FS2_open/fs2_open-3.6.7/code'
make: *** [all-recursive] Fehler 1
sadow@C3PO:~/Spiele/FS2_open/fs2_open-3.6.7>

-----------

I already asked the guys in the #fs2source IRC at irc.maxgaming.net, and they told me to deinstall AALIB and to compile again, but that doesn't work anyway.
In addition to this post, I will try to ask some SuSE staff as well. Maybe it's just a SuSE-internal problem. But if anyone knows something, please help.

AALIB & AALIB-DEVEL are installed, as well as all SDL packages.
My system:
*SuSE 10.0
*gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
*Linux 2.6.13-15.11-default
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: taylor on September 05, 2006, 03:54:04 pm
Looks to be an SDL install issue, since it's trying to link against the static lib and not the dynamic one.  Make sure that you have /usr/lib/libSDL.so available.  If not then verify that the SDL-devel package is installed and not corrupt (missing files, etc.).  If you don't have the .so file, but do have libSDL.so.* then you can just create the link yourself.  But run ldconfig afterwards though, just to be sure everything is cool before you try to build FS2_Open again.

The problem here is that since your linking against the static lib you have to manually link against libaa.a too because it won't find it automatically.  If it was linking against the .so version of the SDL lib then that wouldn't be a problem.
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: Trac3R on September 05, 2006, 04:21:09 pm

/usr/lib/libSDL.so exists and there is no such file as libSDL.so.*:


sadow@C3PO:~> ls /usr/lib | grep libSDL.so | grep -v sound
libSDL.so


I guess there is no need for a link, or did I get you wrong?
I've run ldconfig as root, but it stays the same.
/usr/lib/libaa.a also exist.
What else could it be?
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: taylor on September 05, 2006, 04:50:00 pm
Sorry, got the main filename wrong, it should be libSDL-1.2.so.*.  libSDL.so is supposed to be a link to the real file so check that it's actually valid (and doesn't point to libSDL.a).
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: Trac3R on September 05, 2006, 05:22:30 pm
I see.
Yeah, it was a dead link on libSDL-1.2.so.0.7.1 which not exists anymore (guess after the recent security-update).
I made a symbolic link to libSDL-1.2.so.0.7.2.

What should I say? It works!
Thanks a lot.
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: CaptJosh on September 06, 2006, 01:14:44 am
I would also note that under SuSE 10.0, not only is the new GCC 4 used, there's also a newer version of glibc in use. While the former doesn't mean much, the latter may create some issues. When I tried to compile FS2 Open under SuSE some time ago, it would compile but not run. I'm not sure if the SCP folks have done anything about this since then, and it has been a while, so feel free to take this warning with a grain of salt.
Title: Re: 'SDL: undefined reference to aalib' on Suse 10.0
Post by: Trac3R on September 06, 2006, 04:09:50 am
@CaptJosh:
I've no such problems.
The game starts: sound, graphic and control seem to work all good.
But into the first (training)mission it crashes always at the same point (after the Adviser tells me something about the booster)
with a memory-access-error.
I dont't think this depends on GCC but the code itself. I've already downloaded a newer version from CVS-directory.
This evening we'll see if this works.