Game Development Community

Compiling in FreeBSD

by Jon Uhal · in Torque Game Engine · 08/25/2003 (9:11 pm) · 24 replies

I understand that FreeBSD isn't techically supported by GG, but I guess this could be a Linux related question. When I do a "make dedicated" I get this as output:

www# make dedicated
"Makefile", line 1: Need an operator
"Makefile", line 3: Need an operator
"Makefile", line 7: Need an operator
"Makefile", line 8: Missing dependency operator
"Makefile", line 10: warning: duplicate script for target "doConfigure" ignored
"Makefile", line 11: warning: duplicate script for target "doConfigure" ignored
"Makefile", line 12: Need an operator
"Makefile", line 13: Need an operator
make: fatal errors encountered -- cannot continue

I haven't modified the Makefile at all, so I'm a little confused as to what's going on?

to make matters worse:

www# make -f mk/configure.mk
"mk/configure.mk", line 9: Need an operator
"mk/configure.mk", line 12: Missing dependency operator
"mk/configure.mk", line 15: Need an operator
Error expanding embedded variable.

Help?
Page «Previous 1 2
#1
08/25/2003 (10:48 pm)
Ummm...I don't know how you downloaded the source...but it looks like you have extra blanks in your makefiles. Either try redownloading them, or clean up the files yourself.
#2
08/25/2003 (11:02 pm)
Might wanna make sure the files haven't been windowized by running them thru the dos2unix command. Just a thought.
#3
08/26/2003 (12:04 am)
That looks to me like the Makefiles dont like BSD make and in which case you need gmake.

T.
#4
08/26/2003 (3:53 am)
More adventures in Unixland! Tom B, using gmake got me a little farther than I had gotten before.

gmake -f mk/configure.mk

worked (once I added the arguments it needed), but I'm still getting errors.

www# gmake dedicated
"Makefile", line 5: Need an operator
"Makefile", line 7: Need an operator
"Makefile", line 11: Need an operator
"Makefile", line 12: Missing dependency operator
"Makefile", line 14: warning: duplicate script for target "doConfigure" ignored
"Makefile", line 15: warning: duplicate script for target "doConfigure" ignored
"Makefile", line 16: Need an operator
"Makefile", line 19: Need an operator
"Makefile", line 20: Need an operator
"Makefile", line 36: Need an operator
"Makefile", line 38: Need an operator
"Makefile", line 41: Need an operator
"Makefile", line 43: Need an operator
"Makefile", line 46: Need an operator
"Makefile", line 51: Need an operator
"Makefile", line 52: Could not find targets.opengl2d3d.mk
"Makefile", line 53: Need an operator
"Makefile", line 55: Could not find targets.lpng.mk
"Makefile", line 56: Could not find targets.zlib.mk
"Makefile", line 57: Could not find targets.ljpeg.mk
"Makefile", line 58: Could not find targets.lungif.mk
"../mk/conf.common.mk", line 19: warning: duplicate script for target "/%" ignored
"../mk/conf.common.mk", line 22: warning: duplicate script for target "/%" ignored
Error expanding embedded variable.
gmake: *** [dedicated] Error 2
#5
08/26/2003 (5:47 am)
Odd. I didn't know 'dedicated' was a make script parameter, I thought you were suppose to configure which one to compile by setting up the make script. :P
#6
08/26/2003 (6:33 am)
Dedicated Server Build

You may want to do a dedicated server only build. This build does not include any of the client code and therefore has fewer dependencies. The dedicated server is not required, however, since the client can also be run with the -dedicated command. To build the dedicated server:

make clean
make dedicated

Taken directly from the SDK. So unless I'm not understanding something, dedicated is a script parameter. Look in the Makefile.


dedicated:
@make -s -C lib
@make -s -C engine dedicated
#7
08/26/2003 (10:10 am)
Jon,

You just kinda answered your own question ... search thru the makefiles etc for where it calls another instance of make and change it to gmake ;-)

You could also rename your current make to something like bsdmake and link make to gmake. There's a few things that might not compile if you do this (e.g. kernel may be a problem, but im not 100% sure) but most things should do.

T.
#8
08/26/2003 (10:29 am)
Wow, good call. I didn't even blink when I typed that! Crossing my fingers!
#9
08/26/2003 (7:07 pm)
Latest errors:

In file included from ljpeg/jcapimin.c:21:
ljpeg/jpeglib.h:720: error: parse error before "jpeg_size_t"
ljpeg/jpeglib.h:720: warning: no semicolon at end of struct or union
ljpeg/jpeglib.h:725: error: parse error before '}' token
ljpeg/jpeglib.h:732: error: parse error before "jpeg_size_t"
ljpeg/jpeglib.h:732: warning: no semicolon at end of struct or union
ljpeg/jpeglib.h:739: error: parse error before '}' token
ljpeg/jcapimin.c:30: error: parse error before "jpeg_size_t"
ljpeg/jcapimin.c: In function 'jpeg_CreateCompress':
ljpeg/jcapimin.c:35: error: 'cinfo' undeclared (first use in this function)
ljpeg/jcapimin.c:35: error: (Each undeclared identifier is reported only once
ljpeg/jcapimin.c:35: error: for each function it appears in.)
ljpeg/jcapimin.c:36: error: 'version' undeclared (first use in this function)
ljpeg/jcapimin.c:38: error: 'structsize' undeclared (first use in this function)
ljpeg/jcapimin.c:38: error: 'jpeg_size_t' undeclared (first use in this function)
ljpeg/jcapimin.c:38: error: parse error before "sizeof"
ljpeg/jcapimin.c:51: error: parse error before "sizeof"
ljpeg/jcapimin.c:51: error: parse error before ')' token
ljpeg/jcapimin.c: In function 'jpeg_finish_compress':
ljpeg/jcapimin.c:178: error: dereferencing pointer to incomplete type
ljpeg/jcapimin.c: In function 'jpeg_write_tables':
ljpeg/jcapimin.c:261: error: dereferencing pointer to incomplete type
ljpeg/jcapimin.c:267: error: dereferencing pointer to incomplete type
gmake[1]: *** [out.GCC3.DEBUG/ljpeg/jcapimin.obj] Error 1
gmake: *** [dedicated] Error 2
#10
08/27/2003 (3:34 am)
Thats compile problems with libjpeg. Check you have run configure correctly. You may need to do some more hacking to get it to compile, but libjpeg (at least the official dist. of it) compiles/runs fine on BSD.

T.
#11
11/14/2003 (7:55 pm)
Did you get any further?
#12
11/16/2003 (1:02 pm)
6-12 months ago, the last time I tried it, TGE compiled fine on FreeBSD with zero modifications using the OpenBSD configuration target.

I haven't tried in a while, it's possible that it's been broken in the meantime.
#13
11/21/2003 (5:20 am)
Looks like the source code was copied from a windows box?
#14
11/25/2003 (8:58 pm)
I guess I might give it a go and see what happens.. I use FreeBSD 4.x-STABLE, not the adventureous type.. ;-)
#15
11/27/2003 (11:13 pm)
@Jeremy : What version did you compile that had no problems?
#16
11/28/2003 (3:06 pm)
Was HEAD sometime between 1.1 and 1.2

As I'm settling into my new home, my servers will get unpacked again. I'll run another compile test at that point.

J
#17
11/04/2007 (12:05 am)
Looking for any help on this with FreeBSD 6.x. Was there ever a resolution to this issue? I am getting the same sort of errors.

Trial an error has gotten me somewhat closer with gmake instead of make.. but, still getting directory creation errors now as well.
#18
11/07/2007 (6:37 am)
Hi garth i'am using freebsd 6.2 as a dedicated server.


packages:
=======
shell/bash
devel/gmake
devel/nasm
devel/sdl-1.2.x
audio/openal
audio/libvorbis
multimedia/libtheora

modify:
=======
check bash in lib/xiph/linux/checklinks.sh

ln -s /usr/local/include/ft2build.h  /usr/include/ft2build.h
ln -s /usr/local/include/SDL/ /usr/include/SDL
ln -s /usr/local/include/iconv.h /usr/include/iconv.h

using the following conf.GCC3.4.FreeBSD.mk :

include ../mk/conf.UNIX.mk

# override defaults

CFLAGS.GENERAL    = -DUSE_FILE_REDIRECT -I/usr/X11R6/include/ -march=i586 \
		    -mcpu=i686 -ffast-math #-fno-exceptions #-fno-check-new

# GLU must be statically linked, otherwise torque will crash.
LINK.LIBS.GENERAL = -Wl,-static -Wl,-lGLU -Wl,-dy -L/usr/X11R6/lib -L/usr/local/lib -lSDL -pthread # -lefence

LINK.LIBS.SERVER  = -pthread
LINK.LIBS.DEBUG =  -logg -lvorbis -ltheora -lpthread -lSDL -L/usr/X11R6/lib -L /usr/local/lib
LINK.LIBS.RELEASE =  -logg -lvorbis -ltheora -lpthread -lSDL -L/usr/X11R6/lib -L /usr/local/lib
#19
11/07/2007 (10:14 am)
Awesome! thank you - I will give this a try later tomorrow (after work schedules are complete) - we finally loaded it on Win2003 and Ubuntu systems as a temporary solution - but the intended server _is_ FreeBSD.
#20
11/07/2007 (11:17 am)
Thomas; ew :-)

Instead of symlinking stuff from /usr/local/include into /usr/include, you could just add -I/usr/local/include to CFLAGS.GENERAL. Same effect with less filesystem crud

Gary (-;
Page «Previous 1 2