I cannot compile Context Free under my FreeBSD box. Using gmake it gives :
--
fredn:~/tmp/ContextFree> gmake
g++ -Isrc-common -Isrc-unix -Iobjs -Isrc-agg/include -O3 -c -o objs/cfdg.o src-common/cfdg.cpp
src-common/cfdg.cpp: In method `Renderer::~Renderer()':
src-common/cfdg.cpp:241: implicit declaration of function `int unlink(...)'
gmake: *** [objs/cfdg.o] Erreur 1
--
So i has #include <unistd.h> in cfdg.cpp. And now :
--
fredn:~/tmp/ContextFree> gmake
g++ -Isrc-common -Isrc-unix -Iobjs -Isrc-agg/include -O3 -c -o objs/cfdg.o src-common/cfdg.cpp
g++ -Isrc-common -Isrc-unix -Iobjs -Isrc-agg/include -O3 -c -o objs/yglue.o src-common/yglue.cpp
src-common/yglue.cpp:21: `FILE' was not declared in this scope
src-common/yglue.cpp:21: `new_file' was not declared in this scope
src-common/yglue.cpp:21: variable or field `yyrestart' declared void
src-common/yglue.cpp: In function `void yg_Reset(...)':
src-common/yglue.cpp:106: `yyrestart' cannot be used as a function
gmake: *** [objs/yglue.o] Erreur 1
--
So before I dive into the code, has someone ever compiled under FreeBSD ?
Fred
Cannot compile under FreeBSD
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
FreeBSD, make fails
make is complaining under FreeBSD
Anyone seen this one?
mordred.punk.net>uname -a
FreeBSD mordred.punk.net 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #0: Fri Jun 25 14:54:12 PDT 2004
root@mordred.punk.net:/usr/obj/usr/src/sys/MORDRED i386
mordred.punk.net>make
"Makefile", line 17: Need an operator
"Makefile", line 18: Need an operator
Error expanding embedded variable.
mordred.punk.net>
Anyone seen this one?
mordred.punk.net>uname -a
FreeBSD mordred.punk.net 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #0: Fri Jun 25 14:54:12 PDT 2004
root@mordred.punk.net:/usr/obj/usr/src/sys/MORDRED i386
mordred.punk.net>make
"Makefile", line 17: Need an operator
"Makefile", line 18: Need an operator
Error expanding embedded variable.
mordred.punk.net>
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Does the version of make that you are running support the vpath directive? Lines 17 and 18 are the vpath directive lines. Your version of make seems to want VPATH variables instead. Try commenting them out and replacing them with:
Code: Select all
VPATH = $(SRC_DIRS)
Re: Cannot compile under FreeBSD
The problem that gjunell was having is easily solved: you must use gmake, not make. FreeBSD's default make is called pmake, and is less commonly used, so if you see a bunch of "Need an operator" errors when trying to compile something, try using gmake