Page 1 of 1

Cannot compile under FreeBSD

Posted: Thu May 26, 2005 11:47 pm
by Fred Nicolier
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

RESOLVED

Posted: Fri May 27, 2005 1:23 am
by Fred Nicolier
Ok, after a few modification of the codes (essentially some #include), the compilation is ok

details

Posted: Fri Jul 08, 2005 11:08 am
by johan
Fred,

Which #includes did you need?

Posted: Fri Jul 08, 2005 11:19 am
by MtnViewJohn
Yes, please post your diffs so that this problem can be avoided in the future.

FreeBSD, make fails

Posted: Wed Nov 30, 2005 4:40 pm
by gjunell
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>

Posted: Thu Dec 01, 2005 12:07 pm
by MtnViewJohn
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

Posted: Mon Jun 19, 2017 7:01 pm
by goose121
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