[GRASS5] r.mapcalc compile error on Solaris

Glynn Clements glynn.clements at virgin.net
Mon Oct 11 08:10:16 EDT 2004

Paul Kelly wrote:

> I've been doing a few test builds on different platforms (IRIX, Cygwin, 
> Solaris and MacOSX) to try and get 5.3 ready for a 5.3.1 release in a few
> days, then we can have a week or so of testing and get 5.4.0 out quite 
> soon. Things are going well and the shared library build is now working on 
> MacOSX and Solaris, and r.terraflow can be compiled with the Alternate 
> Build system (which will be the default for 5.3.1 onwards).
> However I'm having a problem with src/raster/r.mapcalc3 (and 
> src.contrib/GMSL/r3.mapcalc, although that isn't used any more so doesn't 
> matter) and yacc/lex that I don't have a clue about:
> Using GNU bison 1.875d:
> [pkelly at jebediah]/home/pkelly/grass/gbld(53): ./gmake53 src/raster/r.mapcalc3
> 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'
> bison -y -b /home/pkelly/grass/gbld/src/raster/r.mapcalc3/y -d mapcalc.y
> make[1]: *** [/home/pkelly/grass/gbld/src/raster/r.mapcalc3/y.tab.c] Broken Pipe

No idea. Can you run the command via strace or gdb to obtain more

> lex -t mapcalc.l > /home/pkelly/grass/gbld/src/raster/r.mapcalc3/lex.yy.c
> "mapcalc.l":line 126: Warning: Non-portable Character Class

No idea here; does the lex documentation explain this message?

> 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

to the top of mapcalc.l (anywhere between the %{ and get_input_string()).

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list