This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Creation of precompiled headers fails for gcc-3.4.0 on i386-pc-solaris2.8
- From: Brad Spencer <spencer at infointeractive dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 26 Apr 2004 15:06:09 -0300
- Subject: Creation of precompiled headers fails for gcc-3.4.0 on i386-pc-solaris2.8
While building a cross compiler for i386-pc-solaris2.8 (on
i686-pc-linux-gnu) with gcc-3.4.0, I came across the following errors
when it came time to build precompiled headers. It looks like
<stdio.h> and <cstdio> have somehow selected different types for
va_list.
Is this a missing fix-includes rule? Has it got anything to do with
pre-compiled headers? Should I ask on the gcc list instead? Thanks.
The Solaris va_list.h, which is included indirectly, says:
+++ Start
#if defined(__STDC__) && !defined(__ia64)
typedef void *__va_list;
#else
typedef char *__va_list;
#endif
--- End
But if I look at the preprocessor output, I see:
+++ Start
# 1
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/cstdarg"
1
# 46
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/cstdarg"
# 47
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/cstdarg"
3
# 1
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h"
1 3 4
# 43
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h"
3 4
typedef __builtin_va_list __gnuc_va_list;
# 85
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h"
3 4
typedef __gnuc_va_list va_list;
# 49
"/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/cstdarg"
2 3
namespace std
{
using ::va_list;
}
--- End
Followed shortly by:
+++ Start
# 1
"/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/sys/va_list.h"
1 3 4
# 9
"/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/sys/va_list.h"
3 4
#pragma ident "@(#)va_list.h 1.12 99/05/04 SMI"
# 22
"/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/sys/va_list.h"
3 4
extern "C" {
typedef void *__va_list;
}
--- End
The command lines and errors follow.
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/xgcc
-shared-libgcc -B/hosts/bubbles/spencer/de
vel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/ -nostdinc++
-L/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-sol
aris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/src
-L/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build
-gcc/i386-pc-solaris2.8/libstdc++-v3/src/.libs
-B/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/bin/
-B/opt/gcc-3.
4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/lib/ -isystem
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/inclu
de -isystem
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include
-Winvalid-pch -Wno-deprecated -x c++-header
-g -O2
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/i
386-pc-solaris2.8
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3
/include
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/gcc-3.4.0/libstdc++-v3/libsupc++
/hosts/bubbles/spencer/devel/gcc340/
gcc-3.4.0/gcc-3.4.0/libstdc++-v3/include/stdc++.h -O0 -g -o
./i386-pc-solaris2.8/bits/stdc++.h.gch/O0g; \
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/xgcc
-shared-libgcc -B/hosts/bubbles/spencer/de
vel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/ -nostdinc++
-L/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-sol
aris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/src
-L/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build
-gcc/i386-pc-solaris2.8/libstdc++-v3/src/.libs
-B/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/bin/
-B/opt/gcc-3.
4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/lib/ -isystem
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/inclu
de -isystem
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include
-Winvalid-pch -Wno-deprecated -x c++-header
-g -O2
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3/include/i
386-pc-solaris2.8
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-v3
/include
-I/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/gcc-3.4.0/libstdc++-v3/libsupc++
/hosts/bubbles/spencer/devel/gcc340/
gcc-3.4.0/gcc-3.4.0/libstdc++-v3/include/stdc++.h -O2 -g -o
./i386-pc-solaris2.8/bits/stdc++.h.gch/O2g;
In file included from
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-
v3/include/cstdio:52,
from
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/gcc-3.4.0/libstdc++-v3/include/stdc++.h:45:
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: conflicting declaration 'typedef vo
id*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: 'va_list' has a previous declaration as `typedef char*va_list'
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: declaration of `typedef void*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: conflicts with previous declaration `typedef char*va_list'
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: declaration of `typedef void*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: conflicts with previous declaration `typedef char*va_list'
In file included from
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/i386-pc-solaris2.8/libstdc++-
v3/include/cstdio:52,
from
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/gcc-3.4.0/libstdc++-v3/include/stdc++.h:45:
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: conflicting declaration 'typedef void*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: 'va_list' has a pre
vious declaration as `typedef char*va_list'
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: declaration of `typedef void*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: conflicts with previous declaration `typedef char*va_list'
/opt/gcc-3.4.0-cross/i386-pc-solaris2.8/i386-pc-solaris2.8/sys-include/stdio.h:120:
error: declaration of `typedef void*va_list'
/hosts/bubbles/spencer/devel/gcc340/gcc-3.4.0/i386-pc-solaris2.8/build-gcc/gcc/include/stdarg.h:85:
error: conflicts with previous declaration `typedef char*va_list'
make[1]: *** [i386-pc-solaris2.8/bits/stdc++.h] Error 1
--
------------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company