os x compile problems

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
seanth
Posts: 12
Joined: Thu Feb 08, 2007 12:09 pm

os x compile problems

Post 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?

User avatar
MtnViewJohn
Site Admin
Posts: 875
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: os x compile problems

Post 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] : 

seanth
Posts: 12
Joined: Thu Feb 08, 2007 12:09 pm

Re: os x compile problems

Post 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$ 

User avatar
MtnViewJohn
Site Admin
Posts: 875
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: os x compile problems

Post by MtnViewJohn »

It seems that lines 51 through 61 of yglue.h are superfluous. Try commenting them out.

User avatar
zol
Posts: 40
Joined: Sun Mar 23, 2008 4:14 pm

Re: os x compile problems

Post 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.

Post Reply