This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: BUG!! gcc-2.95.3 (`__builtin_va_alist' undeclared in snprintf()) on Solaris-2.5.1
- To: Carlo Wood <carlo at alinoe dot com>
- Subject: Re: BUG!! gcc-2.95.3 (`__builtin_va_alist' undeclared in snprintf()) on Solaris-2.5.1
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Sat, 26 May 2001 12:49:16 -0600
- CC: "Auteria Wally Winzer Jr." <wally dot winzer at ChampUSA dot COM>, gcc-bugs at gcc dot gnu dot org
- Organization: Rogue Wave Software, Inc.
- References: <3B0F7A1E.435DDA5B@ChampUSA.COM> <20010526150646.A8861@alinoe.com>
Carlo Wood wrote:
>
> On Sat, May 26, 2001 at 02:40:46AM -0700, Auteria Wally Winzer Jr. wrote:
> > I finally got gcc-2.95.3 compiled on Solaris-2.5.1 (fully-patched).
> > When trying to compile sendmail and BerkeleyDB I get errors from
> > snprintf(). Here's the errors:
> >
> > sendmail-8.11.3:
> >
> > gcc -O6 -I. -I../../sendmail -I../../include -I/usr/local/include -DNEWDB
> > -DNIS -DNISPLUS -DMAP_REGEX -DAUTO_NIS_ALIASES -DTCPWRAPPERS -DSOLARIS=20501
> > -DNOT_SENDMAIL -c -o snprintf.o snprintf.c
> > snprintf.c: In function `snprintf':
> > snprintf.c:70: `__builtin_va_alist' undeclared (first use in this function)
>
> Is sendmail accidently including varargs.h? Or is it using va_list without
> including <stdarg.h>? The best way to check this is by editting those files
> (as root) and adding a line #warning "We get here!" to them (or #error
> in the case of <varargs.h> to the top. Be sure to use the correct header
> files, they should be in a directory like <prefix>/lib/gcc-lib/<triplet>/2.95.3/include/
That's hardly the best way if you don't have root privileges or if you
are on a multiuser system. A better approach would be to use -c -H and
grep the result for the files you're looking for. -E is also an option
if you're using a compiler other than gcc.
Regards
Martin