Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 450964

Summary: sys-devel/gcc-4.6.3 - make[3]: *** [jc1] Error 1
Product: Gentoo Linux Reporter: ta2002 <throw_away_2002>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: richard
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
Terminal results for gcc-4.6.3 build failure
gcc-4.6.2 build log file
gcc build log

Description ta2002 2013-01-09 02:16:41 UTC
Newly stable.

[...]

/var/tmp/portage/sys-devel/gcc-4.6.3/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.6.3/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include        -m64 -march=native -O2 -pipe -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o cc1 c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o \
  cc1-checksum.o main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lmpc -lmpfr -lgmp  -rdynamic -ldl  -lz
collect2: ld returned 1 exit status
make[3]: *** [jc1] Error 1
make[3]: *** Waiting for unfinished jobs....
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
make[3]: *** [cc1plus] Error 1
make[3]: *** [cc1] Error 1
collect2: ld returned 1 exit status
make[3]: *** [f951] Error 1
rm gcc.pod gfortran.pod
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):
 *   emake failed with bootstrap-lean
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 4082:  Called toolchain_src_compile
 *   environment, line 4742:  Called gcc_do_make
 *   environment, line 2393:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-4.6.3'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-4.6.3'`.
 * 
 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc-build-logs.tar.bz2 in your bug report
 * 
 * The complete build log is located at '/var/log/portage/sys-devel:gcc-4.6.3:20130109-015227.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'

>>> Failed to emerge sys-devel/gcc-4.6.3, Log file:

>>>  '/var/log/portage/sys-devel:gcc-4.6.3:20130109-015227.log'

 * Regenerating GNU info directory index...
 * Processed 109 info files.


# emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0/desktop, gcc-4.5.4, glibc-2.15-r3, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_750_@_2.67GHz-with-gentoo-2.1
Timestamp of tree: Wed, 09 Jan 2013 00:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X a52 aac aalib accessibility acpi additions aio alsa amd64 aspell audio audiofile bluray bookmarks bwscheduler bzip2 cairo caps cdio cdr chm chroot client consolekit cracklib crypt css cups cxx dbus device-mapper dga directfb djvu downloadorder dri dvd dvdnav dvdr ebook egl encode espeak exceptions exif expat fam fbcon ffmpeg flac fluidsynth fontconfig fortran gcj gcrypt gecko ggi gif git glib glibc-omitfp gmp gphoto2 gpm gsm gstreamer gtk handbook hardcoded-tables hddtemp holidays hpn iconv idea imap infowidget iostats ipc ipfilter ipv6 jabber javascript jbig jit joystick jpeg kde lame lcms less libass libkms libwww live lm_sensors logviewer lzma mad matroska mbox mdns-bundled memlimit midi minizip mmx mmxext mp3 mpeg mta mudflap multilib nas ncurses net netapi network nls no-old-linux nodrm nptl nptlonly ntfsprogs ntp ocamlopt offlinehelp ofx ogg opengl openmedia openmp oscar osdmenu pcre pdf perl pm-utils png policykit portmon ps qt3support quotes raptor readline recursion-limit redland rss rtc rtmp scanfolder scanner sdl search secure-delete sensord server shared-glapi shm silc smbclient smtp sndfile sound speex spell sse sse2 sse2check ssl ssse3 stats subversion svg sysfs tcpd theora threads threadsafe tiff tremor truetype udev udisks unicode upnp upower urandom usb userlocales utils v4l2 vdpau video vorbis wav webdav-neon webinterface win64 wps x264 xcb xinerama xml xorg xpdf-headers xv xvid yahoo zlib zrtp" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mike Gilbert gentoo-dev 2013-01-09 02:30:59 UTC
Attach the build log.
Comment 2 ta2002 2013-01-09 03:28:05 UTC
Created attachment 334862 [details]
build log
Comment 3 Rafał Mużyło 2013-01-09 03:52:48 UTC
The command that links jc1 is a line or two higher, but there's no explicit error there.

Therefore, try the trivial things first:
- you might be running out of disk space / memory ('-j5' may add significantly to the later)
- you've run into a parallel make bug
Comment 4 ta2002 2013-01-09 06:43:54 UTC
(In reply to comment #3)
> Therefore, try the trivial things first:
> - you might be running out of disk space / memory ('-j5' may add
> significantly to the later)

I have 12 CB of RAM with swap space basically untouched (and also plenty of disk space).

> - you've run into a parallel make bug

Do I test for that by using -j1?
Comment 5 SpanKY gentoo-dev 2013-01-12 05:36:31 UTC
(In reply to comment #4)

yes, try with -j1

look in `dmesg` and make sure there are no kill messages

are you using the gold linker ?
Comment 6 Richard Gray 2013-01-17 16:32:53 UTC
I seem to have the same problem, though only on my 32-bit platform. Normally my MAKEOPTS="-j3", and overriding this to -j1 doesn't seem to help.
Comment 7 Mark Knecht 2013-01-24 18:19:50 UTC
Unfortunately I have a machine which is failing this way also. I removed all the parallel make & link stuff but that didn't help. I'll paste in-line what I'm seeing in my terminal, along with the other stuff I think it's asking for, either in-line or as attachments after I post this.

k2 ~ # emerge --info '=sys-devel/gcc-4.6.3'                                                                        
Portage 2.2.0_alpha159 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)      
=================================================================                                                  
                        System Settings                                                                            
=================================================================                                                  
System uname: Linux-3.6.11-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.1                    
KiB Mem:     6105408 total,   3233284 free                                                                         
KiB Swap:   12602976 total,  12602976 free                                                                         
Timestamp of tree: Thu, 24 Jan 2013 01:45:01 +0000                                                                 
ld GNU ld (GNU Binutils) 2.22                                                                                      
app-shells/bash:          4.2_p37                                                                                  
dev-java/java-config:     2.1.12-r1                                                                                
dev-lang/python:          2.7.3-r2, 3.2.3                                                                          
dev-util/cmake:           2.8.9                                                                                    
dev-util/pkgconfig:       0.27.1                                                                                   
sys-apps/baselayout:      2.1-r1                                                                                   
sys-apps/openrc:          0.11.8                                                                                   
sys-apps/sandbox:         2.5                                                                                      
sys-devel/autoconf:       2.13, 2.69                                                                               
sys-devel/automake:       1.11.6                                                                                   
sys-devel/binutils:       2.22-r1                                                                                  
sys-devel/gcc:            4.5.4, 4.6.3                                                                             
sys-devel/gcc-config:     1.7.3                                                                                    
sys-devel/libtool:        2.4-r1                                                                                   
sys-devel/make:           3.82-r4                                                                                  
sys-kernel/linux-headers: 3.6 (virtual/os-headers)                                                                 
sys-libs/glibc:           2.15-r3                                                                                  
Repositories: gentoo x11
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 google-chrome"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gstreamer gtk iconv java jpeg jpeg2k kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl ssse3 startup-notification svg tcpd tiff truetype type1 udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid xvmc 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-4.6.3 was built with the following:
USE="cxx fortran gtk mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite (-hardened) (-libssp) -multislot -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

k2 ~ #


k2 ~ # emerge -pqv '=sys-devel/gcc-4.6.3'
[ebuild   R   ] sys-devel/gcc-4.6.3  USE="cxx fortran gtk mudflap (multilib) nls nptl openmp (-altivec) -doc (-fixed-point) -gcj -graphite (-hardened) (-libssp) -multislot -nopie -nossp -objc -objc++ -objc-gc {-test} -vanilla (-bootstrap%) (-build%)" 
k2 ~ #
Comment 8 Mark Knecht 2013-01-24 18:20:51 UTC
Created attachment 336748 [details]
Terminal results for gcc-4.6.3 build failure
Comment 9 Mark Knecht 2013-01-24 18:21:44 UTC
Created attachment 336750 [details]
gcc-4.6.2 build log file
Comment 10 Mark Knecht 2013-01-24 18:27:03 UTC
Created attachment 336754 [details]
gcc build log

Replacing previous build log
Comment 11 Serge Chirik 2013-01-27 11:06:32 UTC
I have the same problem.
Comment 12 SpanKY gentoo-dev 2013-01-27 16:49:28 UTC
you guys haven't answered my questions:

look in `dmesg` and make sure there are no kill messages

are you using the gold linker ?
Comment 13 Richard Gray 2013-01-28 02:17:49 UTC
dmesg is unremarkable. All I have in mine is residue from boot-up - there's hardly anything else running on this machine at the moment.
Comment 14 Richard Gray 2013-01-28 02:21:13 UTC
Sorry, I meant to add...

newton2 ~ # ld -v
GNU ld (GNU Binutils) 2.22
newton2 ~ # 

FWIW, the same package on an AMD64 system builds just fine.
Comment 15 Serge Chirik 2013-01-30 12:38:40 UTC
I was investigating the cause of the bug and possibly it linked to GCC Bugzilla – Bug 53728 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53728). See also https://forums.gentoo.org/viewtopic-p-7102706.html
Comment 16 Ryan Hill (RETIRED) gentoo-dev 2013-01-30 18:57:58 UTC
That's a completely different error.
Comment 17 Richard Gray 2013-01-30 23:31:20 UTC
(In reply to comment #16)
> That's a completely different error.

You're right. Believing as I do that one should give everyone a fair crack of the whip, so to speak, I've tried compiling with both omit-frame-pointer and without it - same error, no difference.
Comment 18 Richard Gray 2013-02-10 17:32:47 UTC
I've found a kind-of fix to this problem. Perhaps it's a workaround rather than a fix. My CFLAGS look like this on the system I'm having difficulty with:-

CFLAGS="-O2 -pipe -march=pentium3"

and this causes the compilation of gcc to flounder in the way described previously, and by others.

Change CFLAGS to this:-

CFLAGS="-O2 -pipe" ; # i.e. lose the -march directive

and gcc compiles fine. use gcc-config to set the new gcc version as the default compiler, log out and log in again (or source /etc/profile if you like), and you're good to go.

If one attempts to recompile the new compiler using the now successfully built latest version, the compilation fails (same problem) under the original CFLAGS, but succeeds when one drops -march=... So, not a fix, but a way ahead at least. I'm hoping that somebody with greater understanding of the compiler build process will now have a bit more information to work with and be able to fix it properly.
Comment 19 Ryan Hill (RETIRED) gentoo-dev 2013-02-10 23:17:24 UTC
Sounds like you're hitting bug #411333.
Comment 20 SpanKY gentoo-dev 2013-05-08 15:40:34 UTC

*** This bug has been marked as a duplicate of bug 411333 ***