[GRASS5] compiling on solaris

Eric G. Miller egm2 at jps.net
Tue Mar 20 21:04:01 EST 2001


On Tue, Mar 20, 2001 at 02:00:32PM -0600, Helena wrote:
> gcc -g -O2 -I/home2/usr/local/grass/src/include  -I/usr/include  -c error.c -o
> OBJ.sparc-sun-solaris2.8/error.o
> error.c: In function `G_fatal_error':
> error.c:72: `__builtin_va_alist' undeclared (first use in this function)
> error.c:72: (Each undeclared identifier is reported only once
> error.c:72: for each function it appears in.)
> error.c: In function `G_warning':
> error.c:87: `__builtin_va_alist' undeclared (first use in this function)
> *** Error code 1
> make: Fatal error: Command failed for target `OBJ.sparc-sun-solaris2.8/error.o'

Maybe a mismatch between the libc being linked and the headers of
<stdarg.h>?  I don't see this note in libc documentation (though I don't
know if it matters here):

   *Portability note:* For some C compilers, the last required argument
must not be declared `register' in the function definition.
Furthermore, this argument's type must be "self-promoting": that is,
the default promotions must not change its type.  This rules out array
and function types, as well as `float', `char' (whether signed or not)
and `short int' (whether signed or not).  This is actually an ISO C
requirement.


However, G_fatal_error and G_warning are declared and defined as
functions that take  (char *, ...).  Apparently functions like printf()
are declared like "printf(char *)", but defined like 
"printf(char *, ...)" -- a little trickery...

I'd suspect some kind of mismatch, do you need a special -L path for
Solaris?

-- 
Eric G. Miller <egm2 at jps.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list