Hi,

I'm trying to bulid libstdc++.so.5 (which comes with gcc-3.3.6) using gcc-4.0.1
and a gcc-4.1.0 snapshot from 20050730, but it fails. This is Gentoo/PPC64.

Version output from gcc-4.0.1:
# gcc -v
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
Configured with: /var/tmp/portage/gcc-4.0.1/work/gcc-4.0.1/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.0.1
--includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.0.1/include
--datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.0.1
--mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.0.1/man
--infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.0.1/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.0.1/include/g++-v4
--host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu
--enable-altivec --enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--disable-multilib --disable-libgcj --enable-languages=c,c++,objc,f95
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-clocale=gnu
Thread model: posix
gcc version 4.0.1 (Gentoo 4.0.1, pie-8.7.8)


Version output from gcc-4.1.0:
# gcc -v
Using built-in specs.
Target: powerpc64-unknown-linux-gnu
Configured with:
/var/tmp/portage/gcc-4.1.0_beta20050730/work/gcc-4.1-20050730/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0-beta20050730
--includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/include
--datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730
--mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/man
--infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0-beta20050730/include/g++-v4
--host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu
--enable-altivec --enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--disable-multilib --disable-libgcj --enable-languages=c,c++,objc,f95
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-clocale=gnu
Thread model: posix
gcc version 4.1.0 20050730 (experimental)


I've glibc-2.3.5 installed:
# /lib64/libc.so.6 
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8).
Compiled on a Linux 2.6.11 system on 2005-07-21.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        Native POSIX Threads Library by Ulrich Drepper et al
        The C stubs add-on version 2.1.2.
        GNU Libidn by Simon Josefsson
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


And here comes the error message which compiling libstc++ (gcc-4.1.0 snapshot,
but gcc-4.0.1 looks almost the same):

/var/tmp/portage/libstdc++-v3-3.3.6/work/build/gcc/xgcc
-B/var/tmp/portage/libstdc++-v3-3.3.6/work/build/gcc/
-B/usr/powerpc64-unknown-linux-gnu/bin/ -B/usr/powerpc64-unknown-linux-gnu/lib/
-isystem /usr/powerpc64-unknown-linux-gnu/include -O2 -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -I.
-I. -I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc
-I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/.
-I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/config
-I/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/../include  -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss  \
   -c /var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c
-DCRT_END -DCRTSTUFFS_O \
  -o crtendS.o
In file included from /usr/include/stdio.h:828,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h: In function `getchar':
/usr/include/bits/stdio.h:43: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h:59: confused by earlier errors, bailing out
In file included from /usr/include/stdio.h:828,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h: In function `getchar':
/usr/include/bits/stdio.h:43: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h:59: confused by earlier errors, bailing out
make[1]: *** [crtbeginS.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crtbeginT.o] Error 1
In file included from /usr/include/stdio.h:828,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h: In function `getchar':
/usr/include/bits/stdio.h:43: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h:59: confused by earlier errors, bailing out
In file included from /usr/include/stdio.h:828,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h: In function `getchar':
/usr/include/bits/stdio.h:43: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h:59: confused by earlier errors, bailing out
make[1]: *** [crtbegin.o] Error 1
In file included from /usr/include/stdio.h:828,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/tsystem.h:72,
                 from
/var/tmp/portage/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/crtstuff.c:62:
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h: In function `getchar':
/usr/include/bits/stdio.h:43: error: syntax error before "__restrict__"
/usr/include/bits/stdio.h:59: confused by earlier errors, bailing out
make: *** [all-gcc] Error 2

!!! ERROR: sys-libs/libstdc++-v3-3.3.6 failed.
!!! Function src_compile, Line 232, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


I'm no expert, but the error is triggert by a file, that is installed by glibc
(/usr/include/bits/stdio.h) and using exactly the same versions of
glibc/gcc/libstdc++ works on i686-pc-linux-gnu, so I assume this is a problem in
gcc.

Regards,

Markus

-- 
           Summary: building libstdc++.so.5 fails on ppc64 with gcc4 and
                    gcc4.1
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: markus at unixforces dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc64-unknown-linux-gnu
  GCC host triplet: powerpc64-unknown-linux-gnu
GCC target triplet: powerpc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158

Reply via email to