Poll

What platform would you run Quetoo on if it was on Steam?:

compile error on debian etch

May 18, 2009 - 08:03am

I'm having problems compiling q2w on my debian etch server, never had that before. Any ideas?

This happens when I execute make:

q2w@airrocket:~/builds/quake2world$ make
// many lines omitted here...
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -Werror -Wdeclaration-after-statement -g -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/include -g -O2 -MT quake2world-r_model_bsp.o -MD -MP -MF ".deps/quake2world-r_model_bsp.Tpo" -c -o quake2world-r_model_bsp.o `test -f 'r_model_bsp.c' || echo './'`r_model_bsp.c; \
then mv -f ".deps/quake2world-r_model_bsp.Tpo" ".deps/quake2world-r_model_bsp.Po"; else rm -f ".deps/quake2world-r_model_bsp.Tpo"; exit 1; fi
cc1: warnings being treated as errors
r_model_bsp.c: In function 'R_LoadLeafsurfaces':
r_model_bsp.c:532: warning: comparison is always false due to limited range of data type
make[3]: *** [quake2world-r_model_bsp.o] Error 1
make[3]: Leaving directory `/home/q2w/builds/quake2world/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/q2w/builds/quake2world/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/q2w/builds/quake2world'
make: *** [all] Error 2

Some system info:

q2w@airrocket:~/builds/quake2world$ svn up
At revision 483.
q2w@airrocket:~/builds/quake2world$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
q2w@airrocket:~/builds/quake2world$ uname -a
Linux lvps87-230-7-150.dedicated.hosteurope.de 2.6.9-023stab048.6-enterprise #1 SMP Mon Nov 17 19:09:18 MSK 2008 i686 GNU/Linux
q2w@airrocket:~/builds/quake2world$ cat /etc/debian_version
4.0

May 18, 2009 - 11:03am

http://jdolan.dyndns.org/trac/changeset/485 should fix this.

May 18, 2009 - 11:12am

Thanks a lot, this fixed the error. Another one shows up later during compilation though:


// many lines omitted here
cc1: warnings being treated as errors
s_music.c: In function 'S_LoadMusic':
s_music.c:63: warning: implicit declaration of function 'Mix_LoadMUS_RW'
s_music.c:63: warning: assignment makes pointer from integer without a cast
make[3]: *** [quake2world-s_music.o] Error 1
make[3]: Leaving directory `/home/q2w/builds/quake2world/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/q2w/builds/quake2world/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/q2w/builds/quake2world'
make: *** [all] Error 2

May 18, 2009 - 11:29am

Older SDL_mixer :(

Try this to shut it up for now:
http://jdolan.dyndns.org/tmp/hush_debian.patch

May 18, 2009 - 11:52am

Adding #define USE_RWOPS 1 near the very top of src/sound.h fixed the error.