[GRASS5] Grass 5.1 compile error

Glynn Clements glynn.clements at virgin.net
Wed Feb 26 00:22:03 EST 2003

cheg01 at attbi.com wrote:

> I get the following error building the latest 5.1 source on Solaris 8
> Sparc:
> make[2]: Entering directory `/usr3/grass51_012403/lib/gis'
> gcc -g -Wall  -Wall  -I/usr3/grass51_012403/include -I/usr3/grass51_012403/
> dist.sparc-sun-solaris2.8/include     -I/usr3/grass51_012403/include -I/usr
> 3/grass51_012403/dist.sparc-sun-solaris2.8/include -I/usr/X11R6/include/ -I
> /usr/include/gr -I/usr/local/include -I/usr/include  -I/usr/local/pgsql/inc
> lude  -I/usr3/grass51_012403/include -I/usr3/grass51_012403/dist.sparc-sun-
> solaris2.8/include \
>         -o OBJ.sparc-sun-solaris2.8/debug.o -c debug.c
> debug.c: In function `G_debug':
> debug.c:44: `__builtin_va_alist' undeclared (first use in this function)
> Any suggestions?

My suspicion is that the presence of -I/usr/include is causing the
problem; it typically results in Solaris' stdarg.h (which isn't
compatible with gcc) being used instead of gcc's version.

This appears to be due to the following lines in

PNGINC = -I/usr/X11R6/include/ -I/usr/include/gr -I/usr/local/include -I/usr/include
PNGLIB = -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib

I suggest that you change these lines to:


then re-run configure and re-compile.

In turn, this gives rise to two questions for Radim:

1. Why are these paths hardcoded, instead of using the values from the
configure script?

2. Why is $(PNGINC) being used for compiling libgis?

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list