Compiling and running Quake2 on AMD64 Linux

Richard Barrell mycatverbs at
Sun Jul 27 13:26:30 EDT 2008

Hello there. It seems that the sources, as checked out from
subversion, will build but won't run on AMD64 Linux (not sure about
other targets, I've only tried this on my own (amd64 Ubuntu) machine).
Combing through the warnings emitted by gcc (I love -Wall, by the way)
showed up a whole bunch of incorrect pointer arithmetic - specifically
casts from pointer types to (int), which isn't necessarily wide enough
to avoid truncating the pointer. I've gone through the sources and
replaced all of these instances - at least, the ones I ran into - with
the appropriate integer type from C99. I've also squished a few other
unimportant compiler warnings along the way too (nothing serious, it's
just that in order to track down the bad casts I was compiling with
-Werror) as well as one stack mangling bug in ref_candygl that I'm
sure no one on the planet has ever managed to actually trigger. I've
attached a patch against the current SVN sources (as of 2008-07-27)
which fixes these, and runs quite nicely.

Single player Quake2, Quake2max, the SDL GL client, on Linux.

- Dedicated server
- Multiplayer (including CTF)
- Xatrix, Rogue
- ARTS support
- ALSA support (I'm using SDL here)
- AAlib renderer
- IPv6.
- any machine on the planet other than my own (e.g. I'm not certain
that this patch won't break the build for, say, win32 users with MinGW
or MSVC++, or FreeBSD users, etc).

I'll probably have a go at making sure dedicated servers,
multiplayer+CTF, AAlib and IPv6 support all work later, but for the
moment, I'd appreciate any feedback I can get on this one (in
particular: did I break the build system for anyone, does this work
for anyone else? etc).
Oh, and if I've sent this to the wrong mailing address? Please yell at
me, then tell me where to forward it to instead.

Thanks in advance,
-- Richard Barrell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amd64_compat_hopethisworks.patch.gz
Type: application/x-gzip
Size: 3379 bytes
Desc: not available
URL: <>

More information about the quake2 mailing list