Discussion:
Build help with Quake2 dedicated server on FreeBSD
m0gely
2005-02-16 18:51:37 UTC
Permalink
I downloaded the quake2-r0.16.1.tar.gz file from http://icculus.org but
I can't build it on my FreeBSD (4.11) machine. I'm not experienced with
solving these sorts of issues so bear with me. I edited the Makefile and
set everything to NO except:

BUILD_DEDICATED=YES

But I still can't get it to compile without getting lots of this spammed
in the console:
Code:
"Makefile", line 329: Need an operator
"Makefile", line 330: Need an operator
"Makefile", line 331: Need an operator
"Makefile", line 333: Missing dependency operator
"Makefile", line 334: Missing dependency operator
"Makefile", line 336: Need an operator
"Makefile", line 338: Missing dependency operator
Unknown modifier ' '


All I have tried is just 'make'. I didn't see anything in the README
that stuck out to me as a solution. Would love to fire up some Q2 action
again. Any direction would be great.

Also I didn't see a FAQ on the icculus.org site, but I assume this
release is compatible with the default 3.20 client from id?
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Thomas J Fogal
2005-02-16 19:54:40 UTC
Permalink
<42139639.5060400 at telestream.com>m0gely writes:
<snip>
Post by m0gely
"Makefile", line 329: Need an operator
"Makefile", line 330: Need an operator
"Makefile", line 331: Need an operator
"Makefile", line 333: Missing dependency operator
"Makefile", line 334: Missing dependency operator
"Makefile", line 336: Need an operator
"Makefile", line 338: Missing dependency operator
Unknown modifier ' '
you should not have to disable any options to compile quake2.
you simply need to use 'gmake' on BSD systems, instead of 'make'.
'make' on a BSD system is BSD make and icculus quake2 uses GNU style
makefiles, thus requiring the GNU make program.

If you don't have gmake, it is in ports somewhere. Off the top of my
head, I would bet its in /usr/ports/devel/gmake.

HTH,

-tom
m0gely
2005-02-16 20:20:55 UTC
Permalink
Post by Thomas J Fogal
you should not have to disable any options to compile quake2.
you simply need to use 'gmake' on BSD systems, instead of 'make'.
Thanks yeah I had that on my system but didn't think to try it. It
compiles for some time but then error's out with this:

gmake[1]: *** [debugi386/client/cd_sdl.o] Error 1
gmake[1]: Leaving directory `/home/m0gely/temp/quake2-r0.16.1'
gmake: *** [build_debug] Error 2

I did this gmake with a fresh tarball. So the Makefile and everything
else is now default. (it failed on my modified version too)
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Nick Warne
2005-02-16 20:23:29 UTC
Permalink
Hi,

Nick here from q2src forums :)
Post by m0gely
gmake[1]: *** [debugi386/client/cd_sdl.o] Error 1
gmake[1]: Leaving directory `/home/m0gely/temp/quake2-r0.16.1'
gmake: *** [build_debug] Error 2
What is the few lines before that error? That will show what it is failing
on.

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
m0gely
2005-02-16 20:27:18 UTC
Permalink
Post by Nick Warne
What is the few lines before that error? That will show what it is failing
on.
Pardon the amount of text that follows. I copied after I saw the first
warning:

src/linux/cd_sdl.c:30: SDL.h: No such file or directory
src/linux/cd_sdl.c:37: syntax error before `*'
src/linux/cd_sdl.c:37: warning: type defaults to `int' in declaration of
`cd_id'
src/linux/cd_sdl.c:37: warning: data definition has no type or storage class
src/linux/cd_sdl.c: In function `CDAudio_Eject':
src/linux/cd_sdl.c:51: warning: implicit declaration of function
`SDL_CDEject'
src/linux/cd_sdl.c: In function `CDAudio_Play':
src/linux/cd_sdl.c:57: syntax error before `cd_stat'
src/linux/cd_sdl.c:63: `cd_stat' undeclared (first use in this function)
src/linux/cd_sdl.c:63: (Each undeclared identifier is reported only once
src/linux/cd_sdl.c:63: for each function it appears in.)
src/linux/cd_sdl.c:63: warning: implicit declaration of function
`SDL_CDStatus'
src/linux/cd_sdl.c:67: warning: implicit declaration of function
`CD_INDRIVE'
src/linux/cd_sdl.c:67: request for member `numtracks' in something not a
structure or union
src/linux/cd_sdl.c:71: request for member `numtracks' in something not a
structure or union
src/linux/cd_sdl.c:77: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:79: request for member `cur_track' in something not a
structure or union
src/linux/cd_sdl.c:83: warning: implicit declaration of function
`SDL_CDPlay'
src/linux/cd_sdl.c:83: request for member `track' in something not a
structure or union
src/linux/cd_sdl.c:84: request for member `track' in something not a
structure or union
src/linux/cd_sdl.c:86: warning: implicit declaration of function
`SDL_GetError'
src/linux/cd_sdl.c: In function `CDAudio_RandomPlay':
src/linux/cd_sdl.c:96: syntax error before `cd_stat'
src/linux/cd_sdl.c:102: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c:109: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c:111: request for member `track' in something not a
structure or union
src/linux/cd_sdl.c:111: `SDL_AUDIO_TRACK' undeclared (first use in this
function)
src/linux/cd_sdl.c:127: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c:133: `cd_stat' undeclared (first use in this function)
src/linux/cd_sdl.c:137: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c:144: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:146: request for member `cur_track' in something not
a structure or union
src/linux/cd_sdl.c:153: request for member `track' in something not a
structure or union
src/linux/cd_sdl.c:154: request for member `track' in something not a
structure or union
src/linux/cd_sdl.c: In function `CDAudio_Stop':
src/linux/cd_sdl.c:176: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:176: `CD_PAUSED' undeclared (first use in this function)
src/linux/cd_sdl.c:178: warning: implicit declaration of function
`SDL_CDStop'
src/linux/cd_sdl.c: In function `CDAudio_Pause':
src/linux/cd_sdl.c:187: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:189: warning: implicit declaration of function
`SDL_CDPause'
src/linux/cd_sdl.c: In function `CDAudio_Resume':
src/linux/cd_sdl.c:197: `CD_PAUSED' undeclared (first use in this function)
src/linux/cd_sdl.c:199: warning: implicit declaration of function
`SDL_CDResume'
src/linux/cd_sdl.c: In function `CDAudio_Update':
src/linux/cd_sdl.c:229: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:230: `CD_PAUSED' undeclared (first use in this function)
src/linux/cd_sdl.c: In function `CDAudio_Init':
src/linux/cd_sdl.c:253: warning: implicit declaration of function
`SDL_WasInit'
src/linux/cd_sdl.c:253: `SDL_INIT_EVERYTHING' undeclared (first use in
this function)
src/linux/cd_sdl.c:254: warning: implicit declaration of function `SDL_Init'
src/linux/cd_sdl.c:254: `SDL_INIT_CDROM' undeclared (first use in this
function)
src/linux/cd_sdl.c:259: warning: implicit declaration of function
`SDL_InitSubSystem'
src/linux/cd_sdl.c:265: warning: implicit declaration of function
`SDL_CDOpen'
src/linux/cd_sdl.c:265: warning: assignment makes pointer from integer
without a cast
src/linux/cd_sdl.c:282: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c: In function `CDAudio_Shutdown':
src/linux/cd_sdl.c:297: warning: implicit declaration of function
`SDL_CDClose'
src/linux/cd_sdl.c:300: `SDL_INIT_EVERYTHING' undeclared (first use in
this function)
src/linux/cd_sdl.c:300: `SDL_INIT_CDROM' undeclared (first use in this
function)
src/linux/cd_sdl.c:301: warning: implicit declaration of function `SDL_Quit'
src/linux/cd_sdl.c:303: warning: implicit declaration of function
`SDL_QuitSubSystem'
src/linux/cd_sdl.c: In function `CD_f':
src/linux/cd_sdl.c:323: `CD_PLAYING' undeclared (first use in this function)
src/linux/cd_sdl.c:323: `CD_PAUSED' undeclared (first use in this function)
src/linux/cd_sdl.c:362: request for member `numtracks' in something not
a structure or union
src/linux/cd_sdl.c:366: request for member `cur_track' in something not
a structure or union
src/linux/cd_sdl.c:371: request for member `cur_track' in something not
a structure or union
gmake[1]: *** [debugi386/client/cd_sdl.o] Error 1
gmake[1]: Leaving directory `/home/m0gely/temp/quake2-r0.16.1'
gmake: *** [build_debug] Error 2
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Nick Warne
2005-02-16 20:39:55 UTC
Permalink
OK, I have the same error on my FreeBSD box.
Post by m0gely
Pardon the amount of text that follows. I copied after I saw the first
The actual failure is:

gmake[1]: sdl-config: Command not found

So, you need the SDL deve package. I am looking now to see what one it is -
but there isn't a nice one named SDL-deve in the ports tree.

Maybe someone else knows what the sdl deve port is called.

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
Nick Warne
2005-02-16 20:46:13 UTC
Permalink
Post by Nick Warne
OK, I have the same error on my FreeBSD box.
Post by m0gely
Pardon the amount of text that follows. I copied after I saw the first
gmake[1]: sdl-config: Command not found
So, you need the SDL deve package. I am looking now to see what one it is
- but there isn't a nice one named SDL-deve in the ports tree.
Maybe someone else knows what the sdl deve port is called.
This one you need to get, I think - I can't test, as I have no Xfree:

BSoD# pwd
/usr/ports/devel/sdl_ldbad

BSoD# cat pkg-plist

bin/sdl-config
include/SDL
lib/libSDL.a
lib/libSDL.so
lib/libSDL.so.7
lib/libSDLmain.a
share/aclocal/sdl.m4

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
m0gely
2005-02-16 20:58:04 UTC
Permalink
Post by Nick Warne
BSoD# pwd
/usr/ports/devel/sdl_ldbad
Well wait a sec. Niether do I. This is just a dedicated server, so I
don't need to compile in any graphics support. Is there another way?
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Nick Warne
2005-02-16 21:17:27 UTC
Permalink
Post by m0gely
Post by Nick Warne
BSoD# pwd
/usr/ports/devel/sdl_ldbad
Well wait a sec. Niether do I. This is just a dedicated server, so I
don't need to compile in any graphics support. Is there another way?
Heh. Yep, here goes. You will need to edit the Makefile a little - on my box
there are some bad build options.

Select only the option in Makefile for BUILD_DEDICATED=YES

Then, locate the build line:

ifeq ($(ARCH),i386)
RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -falign-loops=2 \
-falign-jumps=2 -falign-functions=2 -fno-strict-aliasing

and change it too:

ifeq ($(ARCH),i386)
RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -malign-loops=2 \
-malign-jumps=2 -malign-functions=2 -fno-strict-aliasing

The changes are falign-loops == malign... falign-jumps == malign... and
falign-functions == malign...
Post by m0gely
gmake build_release
For some reason it builds client and game too... but let it build (ignore GCC
warnings), and after you will have a nice new shiny q2ded in /releasei386
directory.

My box is FreeBSD 4.10-RELEASE so if you have no joy, I have a q2ded binary
now if you want it.

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
m0gely
2005-02-16 22:15:48 UTC
Permalink
YES! You da man. :)

I had to move over the "gamei386.so" file also, but you already knew
that. ;P Cool. Gonna go grab the Lithium mod now and get some serious
blood flowing back through my fingers. ;)

Thanks!
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Alexey Dokuchaev
2005-02-17 09:25:35 UTC
Permalink
Post by Nick Warne
OK, I have the same error on my FreeBSD box.
Post by m0gely
Pardon the amount of text that follows. I copied after I saw the first
gmake[1]: sdl-config: Command not found
it is sdl11-config under freebsd.

please see my games/quake2lnx port. it has all freebsd-soecific issues
resolved. i'm still lag behind on updating it, damn real life(tm)
eating all my time. i hope to get back to quake2lnx hacking in some nrea
future.
Post by Nick Warne
So, you need the SDL deve package. I am looking now to see what one it is -
but there isn't a nice one named SDL-deve in the ports tree.
Maybe someone else knows what the sdl deve port is called.
./danfe
m0gely
2005-02-17 15:57:22 UTC
Permalink
Post by Alexey Dokuchaev
please see my games/quake2lnx port. it has all freebsd-soecific issues
resolved.
More X stuff. ;P I just wanted the server which I now have thanks for
Nick. Unfortunately, my favorite mods need recompiling as well and they
never released their source.
--
- m0gely
http://quake2.telestream.com/
Q2 | Q3A | Counter-strike
Nick Warne
2005-02-17 17:21:13 UTC
Permalink
Post by m0gely
Post by Alexey Dokuchaev
please see my games/quake2lnx port. it has all freebsd-soecific issues
resolved.
More X stuff. ;P I just wanted the server which I now have thanks for
Nick. Unfortunately, my favorite mods need recompiling as well and they
never released their source.
Do you play Xatrix? I have a special ded server build with all the monster
stuff removed. I have just finished my new super-dooper Makefile, which
builds like the 2.6.x Linux kernels now - nice quiet build lines :)

http://www.nick.ukfsn.org/xatrix_plus/

I haven't built it on FreeBSD, as that box is for other things. Builds clean
on Linux.

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
Nick Warne
2005-02-17 17:35:02 UTC
Permalink
Post by Nick Warne
I haven't built it on FreeBSD, as that box is for other things. Builds
clean on Linux.
OK, I have built on FreeBSD. It didn't, but I fixed it, so the new files
there now all build real nice.

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
Loading...