James Paige | 2 Jun 2009 17:20
Favicon

Re: fb2cpp

On Tue, Jun 02, 2009 at 11:46:58PM +1200, Ralph Versteegen wrote:
> 2009/6/2 James Paige <Bob <at> hamsterrepublic.com>:
> > On Tue, Jun 02, 2009 at 09:39:46AM +1200, Ralph Versteegen wrote:
> >> 2009/6/2 James Paige <Bob <at> hamsterrepublic.com>:
> >> > I have been trying out fb2cpp from subversion, and I'm having a little
> >> > difficulty getting it compiled.
> >> >
> >> > One minor problem is that I think the Makefile should have:
> >> >
> >> > -LEG = leg.exe
> >> > +LEG = leg$(EXE)
> >> >
> >> > Then, I always get a warning that says:
> >> >
> >> > make: Circular fb.leg <- fb.leg.c dependency dropped.
> >> >
> >> > And finally, I get this error:
> >> >
> >> > gcc -g -Wall -Wno-unused-label  -o fb fb.leg.c
> >> > /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o: In function
> >> > `_start':
> >> > /build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined
> >> > reference to `main'
> >> > collect2: ld returned 1 exit status
> >> > make: *** [fb2cpp] Error 1
> >> >
> >> > ---
> >> > James
> >>
> >> I have no idea why I'm getting the circular dependency warning. Make
> >> must be interpreting the makefile differently from me. I really hate
> >> Make now. The makefile for peg/leg is a terrible mess. Someone
> >> recommended SCons.
> >>
> >> That's a strange error. Doesn't fb.leg.c contain the main function? It
> >> should be at the very bottom.
> >>
> >> And, apologies for the messiness of the code. Too many sins involving
> >> pointers :P
> >
> > I got past that error by doing "make clean && make" directly in the peg
> > directory, but now when I try to compile fb2cpp I get:
> >
> > james <at> doomtrain:~/src/fb2cpp$ make
> > make: Circular fb.leg <- fb.leg.c dependency dropped.
> > cp ../peg/leg .
> > leg -o fb.leg.c fb.leg primitives.leg expressions.leg
> > primitives.leg:20: syntax error before text "%{"
> > make: *** [fb.leg.c] Error 1
> >
> > ---
> > James
> 
> I checked out a fresh copy, and fixed the makefile. It compiled fine
> for me. Funny, I thought I'd compiled it under linux just recently. I
> changed LEG to ./leg${EXE}. Maybe you have . in your PATH, or maybe
> you've previously compiled peg and installed it and so are using the
> wrong version?

Aha! That was exactly it. I did

  which leg

which revealed to me that it was using /usr/local/bin/leg which I had 
installed and forgotten about a month ago while experimenting with 
creating a debian/ubuntu package of peg/leg

I can compile it now

> I'm about to check in the new complete type system (types, not UDTs),
> after which I'll finally have all the pieces to start on the serious
> fun.

Groovy.

So what should I be looking at to try it out? Which files are the 
converter, and which are test files? what toes the generated fb 
executable do?

---
James

Gmane