[GRASS5] r.mapcalc compile error on Solaris
Glynn Clements
glynn.clements at virgin.net
Mon Oct 11 13:09:57 EDT 2004
Paul Kelly wrote:
> >> gcc -I/home/pkelly/grass/gbld/src/raster/r.mapcalc3 -I/home/pkelly/grass/grass/src/raster/r.mapcalc3 -I/home/pkelly/grass/grass/src/include -I/home/pkelly/grass/gbld/src/include -O2 -fPIC -c -o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.c
> >> /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.c: In function `get_input_string':
> >> /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.c:112: error: `YY_NULL' undeclared (first use in this function)
> >
> > This might be a flex extension; try adding:
> >
> > #ifndef YY_NULL
> > #define YY_NULL 0
> > #endif
> >
> > to the top of mapcalc.l (anywhere between the %{ and get_input_string()).
>
> Yes that worked. Got a lot further. Next error:
>
> make: Entering directory `/home/pkelly/grass/grass/src/raster/r.mapcalc3'
> mkdir -p /home/pkelly/grass/gbld/src/raster/r.mapcalc3
> make -f makefile
> make[1]: Entering directory `/home/pkelly/grass/grass/src/raster/r.mapcalc3'
> gcc -L/home/pkelly/grass/gbld/src/libes -s -Wl,-R,/home/pkelly/grass/gbld/src/libes -o /home/pkelly/grass/gbld/dist.sparc-sun-solaris2.8/etc/bin/cmd/r.mapcalc /home/pkelly/grass/gbld/src/raster/r.mapcalc3/y.tab.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/evaluate.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/expression.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/function.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/check.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/main.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xabs.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xadd.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xand.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xatan.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xcos.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xdiv.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xdouble.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xeq.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xeval.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xexp.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xfloat.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xge.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xgraph.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xgt.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xif.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xint.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xisnull.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xle.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xlog.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xlt.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmax.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmedian.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmin.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmod.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmode.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xmul.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xne.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xneg.o /ho
me/pkelly/grass/gbld/src/raster/r.mapcalc3/xnot.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xnull.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xor.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xpow.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xrand.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xround.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xrowcol.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xsin.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xsqrt.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xsub.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xtan.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/map.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xcoor.o /home/pkelly/grass/gbld/src/raster/r.mapcalc3/xres.o -lgrass_gis -lsocket -lgrass_btree -lgrass_rowio -lm -lnsl -lz
> Undefined first referenced
> symbol in file
> yyterminate /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.o
OK; that's a macro, defined as:
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
At least the flex manpage says that yyterminate() isn't in AT&T lex or
the POSIX specification; it doesn't mention YY_NULL.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list