Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146210 - gcc 4.1.1 emerge fails while building libstdc++-v3
Summary: gcc 4.1.1 emerge fails while building libstdc++-v3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 147051 147340 147389 160555 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-03 22:31 UTC by Robert Clark
Modified: 2007-01-07 15:13 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
header file that is causing the gcc emerge to fail. (limits,41.33 KB, text/plain)
2006-09-03 22:33 UTC, Robert Clark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clark 2006-09-03 22:31:39 UTC
User-Agent:       Opera/9.01 (X11; Linux i686; U; en)
Build Identifier: 

While upgrading from i686-pc-linux-gnu-3.4.6 to gcc 4.1.1, the emerge fails
when gcc attempts to build the included libstdc++v3. This happens on 2 of my 4 
systems.

As far as I can tell, the only difference between the system that work and those
that fail is the "hardened" flag, but I tried emerging gcc with and without the 
USE=hardened flag and it failed in the same place both times.

I'll attach the file that is failing after filing the bug.

Reproducible: Always

Steps to Reproduce:
emerge gcc

Actual Results:  
/var/tmp/portage/gcc-4.1.1/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/
portage/gcc-4.1.1/work/build/./gcc -nostdinc++ -L/var/tmp/portage/gcc-4.1.1/
work/build/i686-pc-linux-gnu/libstdc++-v3/src -L/var/tmp/portage/gcc-4.1.1/work/
build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/i686-pc-linux-gnu/bin/ -B/
usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /
usr/i686-pc-linux-gnu/sys-include -I/var/tmp/portage/gcc-4.1.1/work/build/i686-
pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/var/tmp/portage/gcc-
4.1.1/work/build/i686-pc-linux-gnu/libstdc++-v3/include -I/var/tmp/portage/gcc-
4.1.1/work/gcc-4.1.1/libstdc++-v3/libsupc++ -O2 -march=pentium4 -pipe -
D_GNU_SOURCE -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -
fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /var/tmp/
portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/src/codecvt.cc  -fPIC -DPIC -o
 .libs/codecvt.o
In file included from /var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/
libstdc++-v3/include/memory:61,
                 from /var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/
libstdc++-v3/include/string:48,
                 from /var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/
libstdc++-v3/include/bits/locale_classes.h:47,
                 from /var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/
libstdc++-v3/include/locale:46,
                 from /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/libstdc++-v3/
src/codecvt.cc:30:
/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/libstdc++-v3/include/
limits:990: error: stray '\226' in program
/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/libstdc++-v3/include/
limits:1047: error: stray '\374' in program
/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-gnu/libstdc++-v3/include/
limits:1104: error: stray '\226' in program
make[5]: *** [codecvt.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-
gnu/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-
gnu/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build/i686-pc-linux-
gnu/libstdc++-v3'
make[2]: *** [all-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-4.1.1/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 1248:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1528:   Called gcc_do_make
  toolchain.eclass, line 1402:   Called die


Portage 2.1-r2 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-
gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -msse -msse2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/www/localhost/htdocs/mythweb/config /var/
www/localhost/htdocs/squirrelmail/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/
vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -msse -msse2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://
gentoo.mirrors.pair.com/ http://mirrors.tds.net/gentoo http://gentoo.seren.com/
gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress 
--force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/
distfiles' --exclud='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="x86 X509 apache2 bacula-console bacula-nosd berkdb bzip2 crypt ecc ftp gd 
geometry hardened imap innodb javascript jpeg lm_sensors logrotate logwatch mmx 
mysql nagios-dns naios-ntp nagios-ping nagios-ssh ncurses nptl pam pcre perl 
png posix readline session snmp sse sse2 ssl svga symlink zip zlib elibc_glibc 
input_devices_keyboard input_devices_mous input_devices_evdev kernel_linux 
userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips 
video_cards_cirrus video_cards_cyrix video_cards_dummy video_card_fbdev 
video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 
video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc 
video_cards_nv video_cards_rendtion video_cards_s3 video_cards_s3virge 
video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb 
video_cards_tdfx video_cards_tga video_cards_trident videocards_tseng 
video_cards_v4l video_cards_vesa video_cards_vga video_cards_via 
video_cards_vmware video_cards_voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, 
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

--------------------

# gcc-config -l 
 [1] i686-pc-linux-gnu-3.4.6 *
 [2] i686-pc-linux-gnu-3.4.6-hardenednopie
 [3] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [4] i686-pc-linux-gnu-3.4.6-hardenednossp
 [5] i686-pc-linux-gnu-3.4.6-vanilla
Comment 1 Robert Clark 2006-09-03 22:33:17 UTC
Created attachment 95911 [details]
header file that is causing the gcc emerge to fail.
Comment 2 Benjamin Smee (strerror) (RETIRED) gentoo-dev 2006-09-06 06:01:33 UTC
I have an identical problem. same flag, same hardware.

Portage 2.1-r2 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-hardened-r1 i686)
=================================================================
System uname: 2.6.16-hardened-r1 i686 Intel(R) Xeon(TM) CPU 3.06GHz
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -fomit-frame-pointer -fforce-addr -pipe -O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-march=pentium4 -fomit-frame-pointer -fforce-addr -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict userpriv"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.tiscali.nl/gentoo/ http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 alsa apache2 bash-completion berkdb bidi bitmap-fonts cap chroot cli crypt dlloader dri eds emboss esd evms2 fortran gdbm gif gmp gstreamer hardened idea ipv6 isdnlog jpeg libwww maildir mmx mp3 mpm-worker ncurses nls nptl ogg pam parse-clocks pcap pcre perl php png pppd pthreads pwdb python readline reflection regexp sasl session skey snmp spl ssl tcpd threads truetype-fonts type1-fonts udev unicode userlocales vorbis xml xorg zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 complich8 2006-09-06 10:37:19 UTC
Try re-emerging your current version of gcc without the "hardened" use flag, and then building the new gcc with that.

(ie:
 1. echo sys-devel/gcc -hardened >> /etc/portage/package.use
 2. emerge --oneshot =gcc-3.4.6-r1
 3. env-update && source /etc/profile (just seems like a good idea)
 4. emerge -u gcc
)

In my experiments, this (with a glibc current version rebuild tossed on for safety) resolved the problem.
Comment 4 complich8 2006-09-06 10:40:46 UTC
sorry for double-comment, but ...

>  1. echo sys-devel/gcc -hardened >> /etc/portage/package.use
maybe add glibc -hardened to package.use as well, or remove "hardened" in make.conf and only set it per-package in package.use.

Alternately, if you want hardened gcc and glibc, consider switching make.profile to the "hardened" profile over default-linux ...
Comment 5 Michal Suchanek 2006-09-07 07:19:27 UTC
Portage 2.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.12.4
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks maketest metadata-transfer nostrip sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"   
LC_ALL="en_US.UTF-8" 
LINGUAS="en cs cz ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac accessibility aim alsa apache2 berkdb browserplugin bzip2 cairo canna crypt cups debug dga dlloader dmx doc dri dts dvd dvi encode examples fbcon ffmpeg firefox flac foomaticdb fpx gif gimpprint glitz glut gnutls gpm gs gtk hardened iconv icq icu ipv6 irc jabber java jbig jpeg kerberos krb4 lcms ldap libclamav matroska mmx mng mono mozdevelop mozilla mp3 mpeg msn nas ncurses nls nodrm nptl nptlonly nsplugin offensive ogg opengl pam pic png ppds readline ruby samba sasl speex spell sse ssl svg tcpd test theora threads tiff truetype truetype-fonts unicode userlocales vcd vorbis win32codecs wmf x86 xml xml2 xorg xosd xv zlib elibc_glibc input_devices_evdev input_devices_mouse input_devices_keyboard input_devices_kbd input_devices_joystick kernel_linux linguas_en linguas_cs linguas_cz linguas_ja userland_GNU video_cards_mga video_cards_radeon video_cards_ati"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Comment 6 Michal Suchanek 2006-09-07 10:05:52 UTC
Builds when I switch to the vanilla gcc 3.4.6 profile, fails with 3.4.6.

Looks like 4.1.1 cannot be built with hardened 3.4.

Comment 7 Robert Clark 2006-09-07 15:31:09 UTC
(In reply to comment #3)
> Try re-emerging your current version of gcc without the "hardened" use flag,
> and then building the new gcc with that.

That did the trick for me, thanks. I would have thought that the orig compiler
could not have much effect on the build because GCC bootstraps its own interim
compiler. Looks like I was wrong about that.
Comment 8 SpanKY gentoo-dev 2006-09-07 15:58:47 UTC
sounds good
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-09-10 05:15:24 UTC
*** Bug 147051 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-09-12 09:36:39 UTC
*** Bug 147340 has been marked as a duplicate of this bug. ***
Comment 11 Ben XO 2006-09-12 09:39:32 UTC
can GCC-4.1.1 build itself hardened?
Comment 12 complich8 2006-09-12 15:20:54 UTC
(In reply to comment #11)
> can GCC-4.1.1 build itself hardened?
> 

According to my little bit of testing (which is a bit sloppy, not particularly thorough, and could be incorrect)

gcc-4.1.1 seems to be able to build gcc-4.1.1 with USE=hardened
gcc-4.1.1 with USE=hardened seems to be able to compile itself as well.

So apparently it's just 3.4.6 hardened that can't compile 4.1.1 at all.

I haven't checked, but I'd wager that 3.4.6-r1 non-hardened could _probably_ build 4.1.1-hardened, too.

I'd also bet that this isn't an officially supported route to hardening, and that the "correct" way is going to be just using the hardened profile from the get-go and letting the hardened gentoo team worry about it (which is probably why this bug got marked "resolved invalid").  But that's just a hunch.
Comment 13 Kevin F. Quinn (RETIRED) gentoo-dev 2006-09-13 00:11:12 UTC
(In reply to comment #11)
> can GCC-4.1.1 build itself hardened?

No.  Well, you can build it with USE=hardened but you don't get a hardened compiler.  If you were using a hardened profile, which you should be if you want USE=hardened, you'd find >=gcc-4 is masked.
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-09-13 00:13:55 UTC
*** Bug 147389 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-01-06 19:48:29 UTC
*** Bug 160555 has been marked as a duplicate of this bug. ***
Comment 16 Michal Suchanek 2007-01-07 15:10:30 UTC
is gcc 4 still masked? I do not see it masked anymore. 
Comment 17 Michal Suchanek 2007-01-07 15:13:01 UTC
sorry, it is masked. I was looking in the wrong file.