Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322561 - gcc-4.5.0: internal compiler error with -flto on dev-libs/boost-1.42.0-r1
Summary: gcc-4.5.0: internal compiler error with -flto on dev-libs/boost-1.42.0-r1
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 10:23 UTC by Piotrek Juzwiak
Modified: 2010-08-24 00:35 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotrek Juzwiak 2010-06-03 10:23:18 UTC
Unable to compile dev-libs/boost-1.42.0-r1

Reproducible: Always

Steps to Reproduce:
1.Compile boost-1.42.0-r1 with GCC-4.5.0
2.
3.

Actual Results:  
Compilation fails with message 

internal compiler error: tree code 'template_type_parm' is not supported in gimple streams

Expected Results:  
Boost compiles just fine
Comment 1 Piotrek Juzwiak 2010-06-03 10:25:31 UTC
tail -n 50 /dev/shm/portage/dev-libs/boost-1.42.0-r1/temp/build.log

gcc.compile.c++ bin.v2/libs/serialization/build/gcc-4.5/gentoorelease/pch-off/binary_oarchive.o

    "i686-pc-linux-gnu-g++"  -ftemplate-depth-128 -O2 -march=atom -mtune=atom -mfpmath=sse -mmovbe -msahf -flto -fomit-frame-pointer -pipe -fno-strict-aliasing -finline-functions -Wno-inline -Wall -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_SERIALIZATION_DYN_LINK=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/serialization/build/gcc-4.5/gentoorelease/pch-off/binary_oarchive.o" "libs/serialization/src/binary_oarchive.cpp"

libs/serialization/src/binary_oarchive.cpp:39:1: internal compiler error: tree code 'template_type_parm' is not supported in gimple streams
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
gcc.compile.c++ bin.v2/libs/serialization/build/gcc-4.5/gentoorelease/pch-off/binary_iarchive.o

    "i686-pc-linux-gnu-g++"  -ftemplate-depth-128 -O2 -march=atom -mtune=atom -mfpmath=sse -mmovbe -msahf -flto -fomit-frame-pointer -pipe -fno-strict-aliasing -finline-functions -Wno-inline -Wall -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_SERIALIZATION_DYN_LINK=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/serialization/build/gcc-4.5/gentoorelease/pch-off/binary_iarchive.o" "libs/serialization/src/binary_iarchive.cpp"

libs/serialization/src/binary_iarchive.cpp:53:1: internal compiler error: tree code 'template_type_parm' is not supported in gimple streams
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
...failed updating 1 target...
 * ERROR: dev-libs/boost-1.42.0-r1 failed:
 *   building boost failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 5125:  Called die
 * The specific snippet of code:
 *       ${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared || die "building boost failed";
 * 
 * If you need support, post the output of 'emerge --info =dev-libs/boost-1.42.0-r1',
 * the complete build log and the output of 'emerge -pqv =dev-libs/boost-1.42.0-r1'.
 * The complete build log is located at '/dev/shm/portage/dev-libs/boost-1.42.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/dev/shm/portage/dev-libs/boost-1.42.0-r1/temp/environment'.
 * S: '/dev/shm/portage/dev-libs/boost-1.42.0-r1/work/boost_1_42_0'
Comment 2 Piotrek Juzwiak 2010-06-03 10:26:10 UTC
emerge --info
Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.5.0, glibc-2.11.1-r0, 2.6.34-gentoo i686)
=================================================================
System uname: Linux-2.6.34-gentoo-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 03 Jun 2010 07:35:02 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.0
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.7b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=atom -mtune=atom -mfpmath=sse -mmovbe -msahf -flto -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=atom -mtune=atom -mfpmath=sse -mmovbe -msahf -flto -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1,--as-needed"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="32bit X a52 aac accessibility acl acpi akonadi alsa archive aspell bash-completion bindist branding bzip2 cairo cli consolekit cracklib cups cxx dbus dhcpcd dri dts emboss encode exceptions exif fam ffmpeg firefox fortran gif glib gnutls graphite hyperestraier iconv inotify ipod jpeg kde kipi laptop lcms libnotify lzma lzo mad matroska metalink mikmod minimal mmap mmx mng modules mp3 mp4 mpeg mudflap mysql ncurses networkmanager nls nptl nptlonly nsplugin nss ogg opengl openmp optimized-qmake pam pango pcre pdf perl phonon plasma png policykit ppds python qt3support qt4 readline rss samba scanner sdl semantic-desktop session smp solid spell sse sse2 ssl ssse3 startup-notification svg svga symlink sysfs taglib tcpd theora threads tiff truetype udev unicode usb v4l2 virtuoso vorbis wifi wpd wv2 x264 x86 xattr xcb xcomposite xine xinerama xml xorg xulrunner xv xvid xvmc zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Piotrek Juzwiak 2010-06-03 10:26:54 UTC
Stripping CFLAGS to bare minimum (-march=atom -mtune=atom -pipe) doesn't help at all.
Comment 4 Matt Turner gentoo-dev 2010-08-22 18:03:06 UTC
This is a bug known on 4.5.0 and 4.5.1. Added the upstream URL.

You might want to ping that bug report and see if they can backport the change to the 4.5 branch.
Comment 5 Matt Turner gentoo-dev 2010-08-23 15:13:25 UTC
(In reply to comment #3)
> Stripping CFLAGS to bare minimum (-march=atom -mtune=atom -pipe) doesn't help
> at all.

Uh, really? I thought this was related to -flto, and the bug I linked is due to LTO. Please reconfirm. I'll try to do so as well.
Comment 6 Matt Turner gentoo-dev 2010-08-23 19:05:53 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Stripping CFLAGS to bare minimum (-march=atom -mtune=atom -pipe) doesn't help
> > at all.
> 
> Uh, really? I thought this was related to -flto, and the bug I linked is due to
> LTO. Please reconfirm. I'll try to do so as well.

Yes, this is definitely related to LTO (-flto flag). boost compiles cleanly for me without this flag, and with it, I get the same ICE you do.

I don't know what toolchain's policy on LTO related bugs is, but I'll reassign to them.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2010-08-24 00:35:50 UTC
Unsupported.