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

Bug 510926

Summary: sys-devel/gcc-4.9.0 - collect2: error: ld returned 1 exit status -//- .../work/gcc-4.9.0/gcc/cp/Make-lang.in:99: recipe for target 'cc1plus' failed
Product: Gentoo Linux Reporter: Conrad Kostecki <conikost>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gcc-build-logs.tar.bz2

Description Conrad Kostecki gentoo-dev 2014-05-21 11:37:13 UTC
Hi!
I want to try the new gcc 4.9.0. I am unable to compile it:

      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/e
xcept.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-
cilkplus.o cp/cp-gimplify.o cp/cp-array-notation.o cp/lambda.o cp/vtable-class-hierarchy.o attribs.o incpath.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-famil
y/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o i386-c.o glibc-c.o cc1plus-checksum.o libbackend.a main.o  libcommon-target.a libcommo
n.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lm
pfr -lgmp -rdynamic -ldl  -lz
echo | /var/tmp/portage/sys-devel/gcc-4.9.0/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.9.0/work/build/./gcc/ -E -dM - | \
  sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
         -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
  sort -u > tmp-macro_list
/bin/sh /var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/gcc/../move-if-change tmp-macro_list macro_list
echo timestamp > s-macro_list
rm -rf include-fixed; mkdir include-fixed
chmod a+rx include-fixed
if [ -d ../prev-gcc ]; then \
  cd ../prev-gcc && \
  make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \
    libsubdir=. ; \
else \
  set -e; for ml in `cat fixinc_list`; do \
    sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \
    multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \
    fix_dir=include-fixed${multi_dir}; \
    if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \
      echo The directory that should contain system headers does not exist: >&2 ; \
      echo "  `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \
      tooldir_sysinc=`echo "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../../x86_64-pc-linux-gnu/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
      if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \
      then sleep 1; else exit 1; fi; \
    fi; \
    /bin/sh /var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/gcc/../mkinstalldirs ${fix_dir}; \
    chmod a+rx ${fix_dir} || true; \
    (TARGET_MACHINE='x86_64-pc-linux-gnu'; srcdir=`cd /var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/gcc; ${PWDCMD-pwd}`; \
      SHELL='/bin/sh'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \
      gcc_dir=`${PWDCMD-pwd}` ; \
      export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
      cd ../build-x86_64-pc-linux-gnu/fixincludes && \
      /bin/sh ./fixinc.sh "${gcc_dir}/${fix_dir}" \
        `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`  ); \
    rm -f ${fix_dir}/syslimits.h; \
    if [ -f ${fix_dir}/limits.h ]; then \
      mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \
    else \
      cp /var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \
    fi; \
    chmod a+r ${fix_dir}/syslimits.h; \
  done; \
fi
make[4]: Entering directory '/var/tmp/portage/sys-devel/gcc-4.9.0/work/build/prev-gcc'
collect2: error: ld returned 1 exit status
/var/tmp/portage/sys-devel/gcc-4.9.0/work/gcc-4.9.0/gcc/cp/Make-lang.in:99: recipe for target 'cc1plus' failed
make[3]: *** [cc1plus] Error 1
make[3]: *** Waiting for unfinished jobs....


Reproducible: Always




Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.19, 3.14.3-gentoo x86_64)
=================================================================
System uname: Linux-3.14.3-gentoo-x86_64-Genuine_Intel-R-_CPU_@_1.60GHz-with-gentoo-2.2
KiB Mem:     2057504 total,    530252 free
KiB Swap:    2621436 total,   2594632 free
Timestamp of tree: Tue, 20 May 2014 11:00:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p47
dev-lang/python:          2.7.6-r1, 3.3.5, 3.4.0
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo galactica
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache 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 userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.halifax.rwth-aachen.de/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="gzip"
PORTAGE_COMPRESS_FLAGS="-f9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/usr/local/portage"
USE="amd64 bash-completion berkdb bzip2 cracklib crypt curl cvs cxx fontconfig ftp gd gmp gnutls hddtemp iconv icu idn ipv6 javascript jit jpeg ldap ldns lm_sensors lzma lzo mysql mysqli ncurses nls nntp nptl offensive openmp pam pcre perl png python readline samba session slang spell sse2 ssl subversion suid svg symlink tcpd threads truetype udev unicode usb vhosts vim-syntax xml zlib" ABI_X86="64" COLLECTD_PLUGINS="apcups conntrack contextswitch cpu df disk dns entropy ethstat exec filecount hddtemp interface iptables irq load logfile memory nfs nginx ntpd ping processes rrdcached rrdtool sensors swap table tcpconns unixsock uptime users" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" KERNEL="linux" LCD_DEVICES="lcd2usb" LINGUAS="de" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi gzip rewrite spdy stub_status" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Conrad Kostecki gentoo-dev 2014-05-21 11:38:01 UTC
Created attachment 377362 [details]
gcc-build-logs.tar.bz2
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2014-05-21 21:33:09 UTC
I can't reproduce with those CFLAGS/LDFLAGS.  Please try rebuilding @system with CFLAGS="-O2 -march=atom".
Comment 3 Conrad Kostecki gentoo-dev 2014-05-24 09:47:32 UTC
It seems, that there wasn't enough space in /var/tmp/portage. During the build, there was according to df about 100mb free.

Switching to another location with PORTAGE_TMPDIR allowed me to build gcc. I can reproduce this. Thats pretty strange, because I don't the any messages about space full?