Compiling crossfire-server on OSX

Technical and coding related questions.

Moderator: Board moderators

Post Reply
xeno
Luser
Posts: 21
Joined: Thu May 01, 2003 7:26 am
Location: Norway

Compiling crossfire-server on OSX

Post by xeno »

Hi, I'm trying to compile the crossfire server on OS X 10.9 (Maverick)

So far I have managed to create the Makefile with the following commands:

brew install check (if you're using homebrew, guess people might also be using other package systems)
aclocal
autoconf
autoreconf -i
automake --add-missing
./configure --prefix=/usr/local/crossfire

it all gives a stream of warnings that I guess someone with good knowledge of autoconf/automake could clear away with relative ease.

However, when I run make, it fails with the following:

LIBDIR=\"/usr/local/jkr-crossfire/lib/crossfire\" -DLOCALDIR=\"/usr/local/jkr-crossfire/var/crossfire\" -g -O2 -fvisibility=hidden -MT loader.o -MD -MP -MF .deps/loader.Tpo -c -o loader.o loader.c
loader.c:2892:11: error: conflicting types for 'yyget_leng'
yy_size_t yyget_leng (void );
^
../include/libproto.h:446:12: note: previous declaration is here
extern int yyget_leng(void);
^
loader.c:5511:11: error: conflicting types for 'yyget_leng'
yy_size_t yyget_leng (void)
^
../include/libproto.h:446:12: note: previous declaration is here
extern int yyget_leng(void);
^
2 errors generated.

Versions:
$ libtool -V
Apple Inc. version cctools-846.2.4

$ aclocal --version
aclocal (GNU automake) 1.14

$ autoconf --version
autoconf (GNU Autoconf) 2.69

$ lex --version
flex 2.5.35 Apple(flex-31)

1)
jans-mbp:cff_server jan$ make --version
GNU Make 3.81

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
(yeah, this is shitty - pretending that clang is gcc...)
I speaken gutes English, does I nicht?
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

I guess you could try to run

make proto


in the server sources and then rebuild.


Those are functions automatically generated by flex, it seems their signature changes depending on the version being used...
xeno
Luser
Posts: 21
Joined: Thu May 01, 2003 7:26 am
Location: Norway

Post by xeno »

/bin/sh: cproto: command not found

it's also not available through homebrew :/
I speaken gutes English, does I nicht?
mwedel
Regular
Posts: 86
Joined: Tue Jul 17, 2007 5:23 am
Location: Santa Clara, CA, USA

Post by mwedel »

You could manually update the libproto.h file - find the conflicting definition and replace it with the new definition in the loader.c file.
Post Reply