it will compile fine up to: libtool: compile: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=athlon64 -msse3 -ggdb -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_ALLOW_XTHREAD_CONNECT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c opcodes.c -o opcodes.o >/dev/null 2>&1 where it will sit for hours and never move past that point $ sudo emerge --info Portage 2.2_rc8 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 x86_64) ================================================================= System uname: Linux-2.6.25-gentoo-r7-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-with-glibc2.2.5 Timestamp of tree: Tue, 16 Sep 2008 13:17:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.26 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=athlon64 -msse3 -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=athlon64 -msse3 -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="ccache cvs distlocks parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu" LINGUAS="en en_US" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" 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="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/gentopia /usr/local/portage/layman/desktop-effects /usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acpi alsa amd64 avahi bash-completion berkdb bluetooth branding bzip2 cairo ccache cdr cli cracklib crypt cups daap dbus dri dvd dvdr dvdread encode evo exif fam gdbm gif glitz gnome gnome-keyring gstreamer gtk hal iconv ipod ipv6 jpeg kdeenablefinal ldap libnotify mad midi mikmod mmx mmxext mp3 mpeg mudflap multilib nautilus ncurses network-cron nptl nptlonly ogg opengl openmp pam pcre pdf perl png python qt3support quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vhosts vim-syntax vorbis xcomposite xinerama xml xorg xulrunner xv xvmc zlib" ALSA_CARDS="intel8x0" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I have the same problem (stalling at compiling exactly the same file). In order to maybe pinpoint the problem further: This is my emerge --info: Portage 2.2_rc8 (default/linux/x86/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 i686) ================================================================= System uname: Linux-2.6.25-gentoo-r7-i686-Intel-R-_Pentium-R-_4_CPU_2.66GHz-with-glibc2.0 Timestamp of tree: Tue, 16 Sep 2008 08:00:02 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.26 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -pipe -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/shutdown /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/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=pentium4 -pipe -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" 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="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/kdesvn-portage /usr/local/overlays/local" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus debug dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gpm gstreamer hal iconv ipv6isdnlog jpeg kde kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap ncurses nepomuk nls nptl nptlonly ogg opengl openmp pam pcre pdf perl plasma png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xcomposite xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Currently at 13hrs on an AMD Athlon 64 X2 5000+. It's using 1 core to the max and almost no memory (0.7% of 2G)
Works fine from FreeBSD w/ gcc 4.2.1.
Probably this upstream gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36439
I just played some more and found out the following: If I switch from gcc-4.3.1 to gcc-3.4.6, it compiles on the machine I already posted (see comment #1). However, on my laptop (Core2Duo, mostly amd64 stable [see http://www.oliver-putz.de/bugreports/bug237839-Laptop-Working.txt]), it also compiles fine with gcc-4.3.1
@Petteri Räty: Hm, looks indeed very likely. My Laptop indeed uses -Os instead of -O2. Furthermore, if I change the optimizations to -O1, I can also compile it with gcc-4.3.1 on the computer that failes to compile it with -O2. Thanks for the hint!
Has anybody tried -O2 -fno-tree-pre to confirm it's actually _that_ GCC bug?
With "-fno-tree-pre" in CFLAGS, it still fails to compile. With MAKEOPTS="-j5" it stopped at where.c, with MAKEOPTS="-j1" it stopped at malloc.c, but the story's the same, it just sits there. A little further investigation seems to suggest it's the presence of "-ggdb" that's causing the issues. Without that present, it compiles fine, with that present, it hangs. Looking through this bug, all the other emerge --infos report "-ggdb" being present...
So we're hitting a different bug than the one from the one reported in GCC bugzilla, or #224611.
It compiles fine after upgrading gcc from 4.3.1-r1 to 4.3.2. Not sure if the same gcc bug or not as referenced, but it does succeed with compilation now.
Switching to gcc 4.3.2 fixes the build hang, too.
(In reply to comment #11) > Switching to gcc 4.3.2 fixes the build hang, too. > Let's say this is fixed then.