[GRASS5] G57 compile errors in r.mapcalc
Funkmeister
funkmeister at lynxseismicdata.com
Fri May 21 12:17:21 EDT 2004
Hello,
I have had problems building r.mapcalc, seems to be related to the
y.tab.c target. I am not sure if this is related to G53 or G57? I am
compiling on a Mac G5.
Output from make:
bison -y -b OBJ.powerpc-apple-darwin7.3.0/y -d mapcalc.y
bison: OBJ.powerpc-apple-darwin7.3.0/y.tab.c: No such file or directory
bison: fclose: Bad file descriptor
bison: fclose: Bad file descriptor
bison: fclose: Bad file descriptor
<snip>
The line: bison: fclose: Bad file descriptor would go on for thousands
of lines, and then crash.
It appears that y.tab.c was to be placed into the OBJ dir, but the OBJ
dir was not yet created. Also, it doesn't seem like y.tab.c should be
place into the OBJ dir at all.
So I changed:
y.tab.c y.tab.h: mapcalc.y
$(YACC) -b $(OBJDIR)/y -d mapcalc.y
$(MKDIR) $(OBJDIR)
$(CC) $(LDFLAGS) $(INC) $(XTRA_LDFLAGS) -o $(OBJDIR)/$*.o -c
$*.c
to:
y.tab.c y.tab.h: mapcalc.y
$(MKDIR) $(OBJDIR)
$(YACC) -b y -d mapcalc.y
$(CC) $(LDFLAGS) $(INC) $(XTRA_LDFLAGS) -o $(OBJDIR)/$*.o -c
$*.c
And it works for me.
Craig
More information about the grass-dev
mailing list