Created attachment 384878 [details] build.log I have unmasked dev-util/cmake and when portage is trying to update/upgrade the package, it rants about "collect2: error: ld returned 1 exit status gmake: *** [cmake] Error 1 --------------------------------------------- Error when bootstrapping CMake: Problem while running gmake --------------------------------------------- "
Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.9.1, glibc-2.19-r1, 3.16.1-gentoo x86_64) ================================================================= System uname: Linux-3.16.1-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2 KiB Mem: 3917984 total, 804176 free KiB Swap: 0 total, 0 free Timestamp of tree: Tue, 16 Sep 2014 12:30:01 +0000 ld GNU gold (Gentoo git 2.24.51.20140916) 1.11 app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.7, 3.2.5-r6, 3.3.5-r1 dev-util/cmake: 2.8.12.2-r2 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.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4, 1.14.1 sys-devel/binutils: 2.23.2, 2.24-r3, 2.24.51.0.2::hacking-gentoo, 2.24.51.0.3, 9999 sys-devel/gcc: 4.7.3-r1, 4.8.3, 4.9.1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo x-portage vaca mipl_emc ext-devlibs gentoo-el last-hope science steam-overlay stuff gentoo-zh qt kde x11 hacking-gentoo x-ROKO__ elementary x-local x-layman Installed sets: @kde-applications-live, @kde-frameworks-live, @kde-next-live, @kde-plasma-live, @qt5-essentials ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA PUEL googleearth Q3AEULA-20000111 AdobeFlash-11.x Intel-SDP Q3AEULA skype-4.0.0.7-copyright Oracle-BCLA-JavaSE cadsoft GIMPS" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -m3dnow -mtls-dialect=gnu2 -mglibc -m64 -pipe -ffat-lto-objects -flto=5 -fuse-linker-plugin -fomit-frame-pointer -frename-registers -ftracer -fno-stack-protector" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/entropy /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -m3dnow -mtls-dialect=gnu2 -mglibc -m64 -pipe -ffat-lto-objects -flto=5 -fuse-linker-plugin -fomit-frame-pointer -frename-registers -ftracer -fno-stack-protector" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="C" LDFLAGS="-march=native -O2 -m3dnow -mtls-dialect=gnu2 -mglibc -m64 -pipe -ffat-lto-objects -flto=5 -fuse-linker-plugin -fomit-frame-pointer -frename-registers -ftracer -fno-stack-protector -Wl,--as-needed -Wl,-O2 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,-z,combreloc -Wl,-flto=5 -flto=5 -fuse-linker-plugin " MAKEOPTS="-j5" PKGDIR="usr/portage/distfiles" 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 /var/lib/layman/vaca /var/lib/layman/emc /var/lib/layman/ext-devlibs /var/lib/layman/gentoo-el /var/lib/layman/last-hope /var/lib/layman/science /var/lib/layman/steam /var/lib/layman/stuff /var/lib/layman/gentoo-zh /var/lib/layman/qt /var/lib/layman/kde /var/lib/layman/x11 /var/lib/layman/hacking-gentoo /var/lib/layman/ROKO__ /var/lib/layman/elementary /var/lib/layman/local /var/lib/layman" USE="256-color 3d 3dnow 3dnowext 3ds 64bit 7zip R X Xaw3d a52 aac aalib accessibility acl acpi aes aes-ccm aes-gcm aes-ni aiglx aio airdrop-ng airgraph-ng alert alsa amd64 analitza ap apache apache2 applet asm athena atm atmo attica audio audio-sdl audioeffects audiofile awt bash-completion bazaar bench berkdb bindist bittorrent boundschecks branding bugzilla bullet bundled-libs bzip2 bzr c++0x cairo cdda cddb cdr chm city clamav clamd clamdtop clang cli cmake colordiff colorio colors conky consolekit corefonts cpudetection cpufreq cpufreq_bench cpuload cpusets cracklib cramfs crash-reporter crc crypt csharp cups curl cxx cycles d dbus demangle dep device-mapper dga dhcp digital direct2d directfb directx distribution djvu dmenu dmx dos dot dpi dri drm dts dv dvd dvdr ebook editor eigen emacs emboss encode evdev eve examples exif extensions extra extras facebook fam fbcon fbcon_frontend_linux fbdev fcitx ffmpeg fftw firefox firmware flac fltk font-styles fontconfig fortran fpx freetype freetype2 ftp fuse g3dvl gbm gcj gcode gd gdbm gdm ggi gif gimp git glamor glibc glut gnome gnuplot go gold gpm gps graphviz gstreamer gtk gtkstyle gudev gui guile hal hddtemp help hscolour hwdb ibus icons iconv idn ieee1394 imagemagic imlib inotify iostats ipv6 irc jack jadetex java jpeg jpeg2 jpeg2k json kate kdm kdrive kerberos keyring lame latex lcms ldap libass libcaca libkms libnotify libsamplerate libv4l live llvm llvm-gcc lm_sensors lto lua lua-cairo lua-imlib lzma lzo mad maps matroska mms mmx mmxext mng modplug modules mono motif mp3 mp4 mpeg mpfi mplayer msn mtp mudflap multilib multimedia multislot musepack music mysql nas ncurses netlink network networkmanager nfs nis nls nptl nsplugin nss ntfs ntp ntpl oauth octave offensive ogg okteta okular openal opencascade opencl openexr opengl opengtl openinventor openmp openrc openvg oss overlays p2p pam pango pdf perl physfs physics plasma plotutils png policykit ppds python q64 qalculate qml qt qt3support qt4 qt5 qthelp quota qwt rar rdesktop readline resolvconf rss rtf ruby rups samba samples schematics sdk sdl sdl-image server session shine skins skype smp sms sndfile solver sound speex spell sqlite sse sse2 sse3 ssl ssse3 startup-notification stroke subversion svg tcpd telepathy theora threads thumbnail tiff timidity tk tools truetype tty-helpers twolame udev udisks unicode unit-mm upower urwid usb userlocales utils v4l v4l2 vaapi valgrind vcd vcdx vdpau videos vim-syntax vlc vnc volpack vorbis vtk waveform weather-metar webkit widgets wimax winbind word-perfect wps wxwidgets x264 xa xattr xcb xcomposite xine xinerama xkb xml xmlreader xmlwriter xmms2 xmp xnest xorg xplanet xprint xrandr xrender xv xvfb xvid xvmc xz zeroconf zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 author" 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 ublox ubx" GRUB_PLATFORMS="emu efi-32 efi-64 pc" INPUT_DEVICES="keyboard evdev mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en el" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5_5" PYTHON_SINGLE_TARGET="python2_7 pyhton3_2 python3_3" PYTHON_TARGETS="python2_7 python3_3" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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" USE_PYTHON="2.7 3.3" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
I forgot to mension that, it stops with totaly safe (default) c{xx|ld}flags via package.env Let me know if you need that output/build.log too.
Does it build with earlier versions of GCC?
GCC-4.8.3 and binutils-9999 It builts just fine. Even with LTO -fomit-frame-pointers and other various CFLAGS. So...GCC-4.9.1 bug?
If you like to test another way please stop using -ffat-lto-objects and use git binutils with automatic loading of liblto_plugin.so. To have it loaded have a symlink from /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.1/liblto_plugin.so to /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/ set/present. Gcc:4.9 defaults to slim LTO, saving one compilation (-ffat-lto-object compiles once for normal/native assembler and once for GIMPLE bytecode) and above method allowed me to build cmake without froubles with gcc-4.9.2 svn version 215199.
I see. I thought it was incorrent to use -ffat-lto-object with lto symlink and binutils-9999 (steps that I have done already). So, should I remove it completeley and emerge system|world? Is this the correct way to enable/compile with LTO?
Also is -fuse-linker-plugin needed in CFLAGS when an lto symlink exists?
(In reply to David Kredba from comment #5) > If you like to test another way please stop using -ffat-lto-objects and use > git binutils with automatic loading of liblto_plugin.so. To have it loaded > have a symlink from > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.1/liblto_plugin.so to > /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/ > set/present. Shouldn't it be the gcc ebuild task to make that symlink?
(In reply to Paolo Pedroni from comment #8) > (In reply to David Kredba from comment #5) > > If you like to test another way please stop using -ffat-lto-objects and use > > git binutils with automatic loading of liblto_plugin.so. To have it loaded > > have a symlink from > > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.1/liblto_plugin.so to > > /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/ > > set/present. > > Shouldn't it be the gcc ebuild task to make that symlink? @toolchain: is this an toolchain issue?
(In reply to Johannes Huber from comment #9) > (In reply to Paolo Pedroni from comment #8) > > (In reply to David Kredba from comment #5) > > > If you like to test another way please stop using -ffat-lto-objects and use > > > git binutils with automatic loading of liblto_plugin.so. To have it loaded > > > have a symlink from > > > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.1/liblto_plugin.so to > > > /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/ > > > set/present. > > > > Shouldn't it be the gcc ebuild task to make that symlink? > > @toolchain: is this an toolchain issue? probably, but i'm not sure comment #5 will be the way to go. @Petros. back to comment #2. can we see what flags you're using in package.env. also if you have an opportunity, can you test with 4.9.2.
(In reply to Anthony Basile from comment #10) > (In reply to Johannes Huber from comment #9) > > (In reply to Paolo Pedroni from comment #8) > > > (In reply to David Kredba from comment #5) > > > > If you like to test another way please stop using -ffat-lto-objects and use > > > > git binutils with automatic loading of liblto_plugin.so. To have it loaded > > > > have a symlink from > > > > /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.1/liblto_plugin.so to > > > > /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/ > > > > set/present. > > > > > > Shouldn't it be the gcc ebuild task to make that symlink? > > > > @toolchain: is this an toolchain issue? > > probably, but i'm not sure comment #5 will be the way to go. > > @Petros. back to comment #2. can we see what flags you're using in > package.env. also if you have an opportunity, can you test with 4.9.2. Compiled ok with dev-util/cmake-3.1.0 and gcc-4.9.2
(In reply to Anton Kochkov from comment #11) > > Compiled ok with dev-util/cmake-3.1.0 and gcc-4.9.2 It would be good if you tell us what you're doing to enable lto so we can better support this in the future.
(In reply to Anthony Basile from comment #12) > (In reply to Anton Kochkov from comment #11) > > > > Compiled ok with dev-util/cmake-3.1.0 and gcc-4.9.2 > > It would be good if you tell us what you're doing to enable lto so we can > better support this in the future. Nothing special, except upgrading gcc to 4.9.2 - here are my gcc useflags: [ebuild R #] sys-devel/gcc-4.9.2:4.9 USE="cxx fortran gcj go (multilib) nls nptl objc objc++ objc-gc openmp sanitize (-altivec) -awt -doc (-fixed-point) -graphite (-hardened) (-libssp) (-multislot) -nopie -nossp -regression-test -vanilla" 0 KiB
(In reply to Anton Kochkov from comment #13) > (In reply to Anthony Basile from comment #12) > > (In reply to Anton Kochkov from comment #11) > > > > > > Compiled ok with dev-util/cmake-3.1.0 and gcc-4.9.2 > > > > It would be good if you tell us what you're doing to enable lto so we can > > better support this in the future. > > Nothing special, except upgrading gcc to 4.9.2 - here are my gcc useflags: > > [ebuild R #] sys-devel/gcc-4.9.2:4.9 USE="cxx fortran gcj go (multilib) > nls nptl objc objc++ objc-gc openmp sanitize (-altivec) -awt -doc > (-fixed-point) > -graphite (-hardened) (-libssp) (-multislot) -nopie -nossp -regression-test > -vanilla" 0 KiB I think Antony is looking for CFLAGS that enable LTO. cmake is compiled just fine here, with GCC 4.9.2. No special env file is needed. I am not using LTO, for the record. Do you want me to enable it and post the results after compiling cmake again?