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?
os x compile problems
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Re: os x compile problems
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
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$
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
Re: os x compile problems
It seems that lines 51 through 61 of yglue.h are superfluous. Try commenting them out.
Re: os x compile problems
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.
I went for the cheapest fix and changed the type at src-common/yglue.h:54 from size_t to int.
Ah good. I can stop worrying about side-effects.MtnViewJohn wrote:It seems that lines 51 through 61 of yglue.h are superfluous. Try commenting them out.