GCC header issue with __builtin_va_alist

GCC header issue with __builtin_va_alist

Post by vkd » Wed, 11 Dec 2002 07:50:18



Hi. I am compiling Apache 1.3.27 with modssl on Solaris 7 and am getting
this error. I was told this has something to do with header file
incompatibility... How do I fix this?

SunOS 5.7 Generic_106541-23 (latest patches from november)
I got the binary for gcc 3.2 from sunfreeware.org.... Any ideas?

gcc -c  -I../../os/unix -I../../include   -DSOLARIS2=270
-DMOD_SSL=208112 -DEAPI `../../apaci` -DSSL_COMPAT -I/usr/include
-DMOD_SSL_VERSION=\"2.8.12\" ssl_engine_log.c
cc1: warning: changing search order for system directory "/usr/include"
cc1: warning:   as it has already been specified as a non-system directory
ssl_engine_log.c: In function `ssl_log':
ssl_engine_log.c:205: `__builtin_va_alist' undeclared (first use in this
function)
ssl_engine_log.c:205: (Each undeclared identifier is reported only once
ssl_engine_log.c:205: for each function it appears in.)
make[4]: *** [ssl_engine_log.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/opt/test/apache_1.3.27/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/opt/test/apache_1.3.27'
make: *** [build] Error 2

I read about this problem on solaris FAQ, but how do I FIX this?

 
 
 

GCC header issue with __builtin_va_alist

Post by Robin KA » Wed, 11 Dec 2002 08:03:44



> -I/usr/include

The Solaris include files aren't compatible with gcc. gcc depends on
specially modified versions of some includes which it keeps hidden elsewhere.
If you explicitly include the Solaris includes then this system breaks and
gcc will fail.

--
Wishing you good fortune,
--Robin Kay-- (komadori)

 
 
 

GCC header issue with __builtin_va_alist

Post by vkd » Wed, 11 Dec 2002 08:15:53




>>-I/usr/include

> The Solaris include files aren't compatible with gcc. gcc depends on
> specially modified versions of some includes which it keeps hidden elsewhere.
> If you explicitly include the Solaris includes then this system breaks and
> gcc will fail.

> --
> Wishing you good fortune,
> --Robin Kay-- (komadori)

Thanks for replying.
So how can I fix this?
 
 
 

GCC header issue with __builtin_va_alist

Post by Dave Uhrin » Wed, 11 Dec 2002 08:34:51





>>>-I/usr/include

>> The Solaris include files aren't compatible with gcc. gcc depends on
>> specially modified versions of some includes which it keeps hidden elsewhere.
>> If you explicitly include the Solaris includes then this system breaks and
>> gcc will fail.

>> --
>> Wishing you good fortune,
>> --Robin Kay-- (komadori)

> Thanks for replying.
> So how can I fix this?

Make a copy of /usr/include/sys/varargs.h as a backup.  Then edit the
original file and comment out everything to do with va_alist.

You may also have to do that with /usr/include/varargs.h.

At one time the header files made it clear that the __va_alist defs were
in there only for xpg compatibility and it was pretty easy to see what had
to be removed with /* ... */

 
 
 

GCC header issue with __builtin_va_alist

Post by Casper H.S. Di » Wed, 11 Dec 2002 08:37:46



>Hi. I am compiling Apache 1.3.27 with modssl on Solaris 7 and am getting
>this error. I was told this has something to do with header file
>incompatibility... How do I fix this?
>SunOS 5.7 Generic_106541-23 (latest patches from november)
>I got the binary for gcc 3.2 from sunfreeware.org.... Any ideas?
>gcc -c  -I../../os/unix -I../../include   -DSOLARIS2=270
>-DMOD_SSL=208112 -DEAPI `../../apaci` -DSSL_COMPAT -I/usr/include
>-DMOD_SSL_VERSION=\"2.8.12\" ssl_engine_log.c
>cc1: warning: changing search order for system directory "/usr/include"
>cc1: warning:   as it has already been specified as a non-system directory
>ssl_engine_log.c: In function `ssl_log':
>ssl_engine_log.c:205: `__builtin_va_alist' undeclared (first use in this
>function)

Drop the -I/usr/include per the FAQ:

5.9) Why do I get __builtin_va_alist or __builtin_va_arg_incr undefined?

    You're using gcc without properly installing the gcc fixed
    include files.  Or you ran fixincludes after installing gcc
    w/o moving the gcc supplied varargs.h and stdarg.h files
    out of the way and moving them back again later.  This often
    happens when people install gcc from a binary distribution.
    If there's a tmp directory in gcc's include directory, fixincludes
    didn't complete.  You should have run "just-fixinc" instead.

    Another possible cause is that you're using ``gcc -I/usr/include.''

    Reinstall gcc or upgrade to gcc 2.8.0 or later, which doesn't
    require a reinstallation after every OS upgrade, if you
    run Solaris 2.5 or later.

    --- end of excerpt from the FAQ

The most recently posted version of the FAQ is available from
<http://www.science.uva.nl/pub/solaris/solaris2/>
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. gcc on Solaris 8 (__builtin_va_alist missing)

I'm attempting to compile some code using gcc 2.95.2 that
uses variable arg lists. (va_start(), va_arg(), and va_end())

This all works fine and dandy under Linux and AIX but it seems
the Solaris headers are not correctly mapping va_start() to
something valid. The symbol above gets referenced in <sys/varargs.h>
like so:

#define va_start(list, name)    (void) (list = (va_list) &__builtin_va_alist)

Then since gcc knows nothing about this variable, the compile
barfs saying undefined variable.

Anyone know how to straighten this out?

Any info appreciated.

Wes

2. PPP over telnet; it IS possible! :)

3. gcc error : `__builtin_va_alist' undeclared '

4. mnttab corrupted

5. GCC va_start syntax error __builtin_va_alist undeclared

6. LILO uninstallation

7. GCC help -- __builtin_va_alist error??

8. ErrorDocument in Apache

9. problems with gcc 2.95.2 ('__builtin_va_alist' undeclared)

10. gcc error : `__builtin_va_alist' undeclared

11. problems with gcc and __builtin_va_alist

12. gcc and __builtin_va_alist undeclared, and the FAQ

13. gcc-2.96/RH7,3 .vs gcc-3.2/RH8.0 portability issues