build failed with gcc-4.9
Created attachment 377254 [details] build.log $ emerge --info cairo Portage 2.2.10 (default/linux/amd64/13.0/desktop/kde, gcc-4.9.0, glibc-2.19, 3.14.2-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.14.2-gentoo-x86_64-Intel-R-_Core-TM-_i3-4010U_CPU_@_1.70GHz-with-gentoo-2.2 KiB Mem: 3987572 total, 66496 free KiB Swap: 16777212 total, 16535788 free Timestamp of tree: Sun, 18 May 2014 17:00:01 +0000 ld GNU ld (GNU Binutils) 2.24 ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p47 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.6-r1, 3.3.5, 3.4.0 dev-util/ccache: 3.1.9-r3 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.11.6, 1.13.4, 1.14.1 sys-devel/binutils: 2.24-r2 sys-devel/gcc: 4.9.0 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 science alexxy kde qt x11 Installed sets: @kde-frameworks-5.0 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0" 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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2" FEATURES="assume-digests binpkg-logs candy ccache cgroup config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr" FFLAGS="-O2 -pipe -march=native -mtune=native -mfpmath=sse -mavx2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LDFLAGS="-Wl,-O1,--hash-style=gnu,--sort-common,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="xz" 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="/var/lib/layman/science /var/lib/layman/alexxy /var/lib/layman/kde /var/lib/layman/qt /var/lib/layman/x11" USE="64bit X a52 aac acl acpi addressbook alsa amd64 attrib audit avahi avx avx2 avx256 bash-completion berkdb blas bluetooth branding bzip2 cairo caps cdda cli colord consolekit context cracklib crypt cups cvs cxx cyrillic dbus declarative detex device-mapper dhcp dhcpcd dirac djvu dri dts dvd dvdr dvi2tty dvipdfm eap-tls ebook egl embed_data_files emboss enca encode exif expoblending extensions extra extras faac faad fam fbcondecor fbsplash ffmpeg fftw firefox flac fma fontconfig fortran games gdbm geolocation gif gimp git gles gmp gnuplot gnutls gphoto2 gpm gps gpu graphics graphite graphviz gstreamer gtk gtk3 hdaps hdf5 hscolour humanities iconsets iconv icu id3tag imagemagick inotify iproute2 ipv6 irc jabber jadetex java jbig jingle jpeg kde kerberos kipi kpathsea lapack laptop lastfm latex latex3 lcms ldap lensfun libnotify libv4l libv4l2 lm_sensors lto luatex lvm lzma mad matroska mktemp mmx mng modemmanager modules mp3 mp4 mpeg mplayer msms multilib multimedia music mysql natspec ncurses netlink networkmanager nls nptl nsplugin ntp ogg omega openexr opengl openmp oscar otr pam pam_ssh pango pcre pdf phonon pkcs11 plasma plotutils plugins pm-utils png policykit postscript povray ppds ps pstricks publishers pulseaudio qemu qt3support qt4 rar raw rdesktop readline realtime redeyes resolvconf romio rtsp samba schroedinger science script sdl semantic-desktop session sip skins skype smp speex spell spice sse sse2 sse3 sse4 ssh ssl ssse3 stars startup-notification stream svg symlink syslog szip taglib tcpd telepathy tex4ht theora threads thumbnail tiff tk tools truetype twolame udev udisks unicode upnp upower urandom usb utils v4l v4l2 vaapi vde vdpau vhost-net video videos vim vim-syntax vlc vlm vnc vorbis vpx wayland webkit wifi wmf wxwidgets x264 xattr xcb xcomposite xetex xindy xinerama xml xmlpatterns xmp xscreensaver xv xvid xvmc zeroconf 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="efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="arm mips mipsel" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON ================================================================= Package Settings ================================================================= x11-libs/cairo-1.12.16-r3 was built with the following: USE="X glib lto opengl svg xcb (-aqua) -debug -directfb (-drm) (-gallium) (-gles2) -legacy-drivers -openvg (-qt4) -static-libs -valgrind -xlib-xcb" ABI_X86="64 -32 -x32"
*** Bug 512820 has been marked as a duplicate of this bug. ***
I also have this problem. It seems related to LTO (link-time optimizer). In fact I can build x11-libs/cairo-1.12.16-r3 if I do one of the following things: - Add -fno-lto to CFLAGS/CXXFLAGS - Add -ffat-lto-objects to CFLAGS/CXXFLAGS - Remove -lto from USE
Previous comment was a little bit ambiguous. I meant: remove "lto" from USE, or add "-lto" to USE.
*** Bug 515978 has been marked as a duplicate of this bug. ***
Add -ffat-lto-objects to CFLAGS/CXXFLAGS works for me. perhaps use use lto && tc-append-flags -ffat-lto-objects to fix the problem?
from: http://cgit.freedesktop.org/cairo/commit/?id=c7ff9bb32e20679d6da4e8a2856be716e5bd9e12 Remove LTO support This just never worked too well and caused too many issues. I don't think anyone will miss this. As mentioned in the below bug report, proper LTO support also requires using special versions of ranlib, nm and ar which support the LTO object files. Otherwise, calling the normal ranlib on an .a library breaks the list of exported symbols and thus completely breaks the static library. This (partly) reverts the following commits: c3645d97ebd24c6f7ad850785d585aebc706a11c configure.ac: Add a --disable-lto configure option d486ea30f1a58640a1178de74f705a73845b1cda configure: Conditionally include -flto 0870c6fb5b39dcc04fa376123848adde2d06d2ce gcc-4.5 warnings and optimisation flags. (The last commit is the one which brought us -flto in the first place even though it doesn't talk about this. It's also the one which is only reverted partly.) Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77060
Thank you microcai, use lto && append-flags -ffat-lto-objects Works perfectly in the ebuilds (1.12.6 and 1.12.6-r3)
(In reply to Mark Gomersbach from comment #8) > Thank you microcai, > > use lto && append-flags -ffat-lto-objects > > Works perfectly in the ebuilds (1.12.6 and 1.12.6-r3) -ffat-lto-objects is set by default in gcc 4.8 and unset since gcc 4.9.
This seems only to happen with USE="xcb". I first used the normal Desktop-Profile and cairo compiled fine with CFLAGS="-O2 -march=core-avx2 -pipe". Then I switched to the Desktop/KDE profile, where xcb is a standard USE-Flag and I too got this error. Creating a file /etc/portage/env/fat-lto-objects.conf with: CFLAGS="${CFLAGS} -ffat-lto-objects" CXXFLAGS="${CFLAGS}" and adding x11-libs/cairo fat-lto-objects.conf to /etc/portage/package.env resolved the issue.
*** Bug 526630 has been marked as a duplicate of this bug. ***
Should this really block GCC 4.9? I mean /usr/portage/profiles/use.local.desc clearly states: x11-libs/cairo:lto - Try to build with Link-Time Optimization if supported by the compiler. This is recommended by upstream, but can cause build failure in some environments and on machines with little memory. And if even upstream removed the problematic lto support, then I suggest that lto be dropped by the ebuild as well. This way you avoid further duplicates to this bug and we need not block GCC 4.9.
*** Bug 529018 has been marked as a duplicate of this bug. ***
the same problem with x11-libs/cairo-1.12.16-r4
(In reply to Perfect Gentleman from comment #14) > the same problem with x11-libs/cairo-1.12.16-r4 USE="-lto" solves the problem
(In reply to Torsten Stets from comment #10) > This seems only to happen with USE="xcb". > I first used the normal Desktop-Profile and cairo compiled fine with > CFLAGS="-O2 -march=core-avx2 -pipe". > Then I switched to the Desktop/KDE profile, where xcb is a standard USE-Flag > and I too got this error. > Creating a file /etc/portage/env/fat-lto-objects.conf with: > CFLAGS="${CFLAGS} -ffat-lto-objects" > CXXFLAGS="${CFLAGS}" > and adding > x11-libs/cairo fat-lto-objects.conf > to /etc/portage/package.env resolved the issue. nice... workaround.
+ 23 Dec 2014; Michał Górny <mgorny@gentoo.org> cairo-1.12.16-r3.ebuild, + cairo-1.12.16-r4.ebuild: + Disable LTO unconditionally on 1.12.16* since it does not work properly (bug + #510782) and was removed in 1.12.18.