Page 1 of 1

os x compile problems

Posted: Fri Dec 03, 2010 11:19 am
by seanth
Having problems compiling context free on os x. I'm not using xcode, just the command line. libpng is installed.

---------
MacBookPro running 10.6, 64bit intel.

Polymanos:ContextFreeSource2.2.2 seant$ make
cc -Isrc-common -Isrc-unix -Iobjs -Isrc-agg/include -Isrc-common/agg-extras -O3 -Wall -c -o objs/lex.yy.o objs/lex.yy.c
<stdout>:856: error: conflicting types for ‘yyget_leng’
src-common/yglue.h:54: error: previous declaration of ‘yyget_leng’ was here
<stdout>:2291: error: conflicting types for ‘yyget_leng’
src-common/yglue.h:54: error: previous declaration of ‘yyget_leng’ was here
make: *** [objs/lex.yy.o] Error 1
---------

Any help?

Re: os x compile problems

Posted: Sat Dec 04, 2010 10:25 pm
by MtnViewJohn
Maybe you are running a different version of flex or yacc than the standard ones that are installed with OSX 10.6. Find out what version of flex and yacc you have:

Code: Select all

[570] : flex -V
flex 2.5.35

john@John-Horigans-MacBook-Pro   ~/Projects/CF2.2
[571] : yacc -V
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

john@John-Horigans-MacBook-Pro   ~/Projects/CF2.2
[572] : 

Re: os x compile problems

Posted: Sun Dec 05, 2010 6:31 am
by seanth
Looks like I have what you have

Code: Select all

Polymanos:~ seant$ flex -V
flex 2.5.35

Polymanos:~ seant$ yacc -V
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Polymanos:~ seant$ 

Re: os x compile problems

Posted: Sun Dec 05, 2010 10:02 pm
by MtnViewJohn
It seems that lines 51 through 61 of yglue.h are superfluous. Try commenting them out.

Re: os x compile problems

Posted: Thu Jan 20, 2011 3:34 pm
by zol
Same error on 64-bit linux, bison 2.4.2, flex 2.5.35

I went for the cheapest fix and changed the type at src-common/yglue.h:54 from size_t to int.
MtnViewJohn wrote:It seems that lines 51 through 61 of yglue.h are superfluous. Try commenting them out.
Ah good. I can stop worrying about side-effects.