Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510782 - x11-libs/cairo-1.12.16-r3 - .../temp/ccAm7io8.ltrans0.ltrans.o: In function `main': ccAm7io8.ltrans0.o:(.text.startup+0x13d): undefined reference to `cairo_boilerplate_get_target_by_name'
Summary: x11-libs/cairo-1.12.16-r3 - .../temp/ccAm7io8.ltrans0.ltrans.o: In function `...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alexandre Rostovtsev (RETIRED)
URL:
Whiteboard:
Keywords:
: 512820 515978 526630 529018 (view as bug list)
Depends on:
Blocks: gcc-4.9 525300
  Show dependency tree
 
Reported: 2014-05-19 18:32 UTC by Alexey Shvetsov
Modified: 2014-12-23 21:32 UTC (History)
21 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,476.18 KB, text/plain)
2014-05-19 18:34 UTC, Alexey Shvetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvetsov archtester gentoo-dev 2014-05-19 18:32:28 UTC
build failed with gcc-4.9
Comment 1 Alexey Shvetsov archtester gentoo-dev 2014-05-19 18:34:26 UTC
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"
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-09 13:49:10 UTC
*** Bug 512820 has been marked as a duplicate of this bug. ***
Comment 3 Francesco Turco 2014-06-23 17:33:03 UTC
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
Comment 4 Francesco Turco 2014-06-23 17:36:15 UTC
Previous comment was a little bit ambiguous. I meant: remove "lto" from USE, or add "-lto" to USE.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-01 13:01:44 UTC
*** Bug 515978 has been marked as a duplicate of this bug. ***
Comment 6 microcai 2014-07-06 18:22:48 UTC
Add -ffat-lto-objects to CFLAGS/CXXFLAGS works for me.

perhaps use  

   use lto && tc-append-flags -ffat-lto-objects

to fix the problem?
Comment 7 jospezial 2014-08-15 16:14:16 UTC
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
Comment 8 Mark Gomersbach 2014-08-27 11:44:20 UTC
Thank you microcai,

use lto && append-flags -ffat-lto-objects

Works perfectly in the ebuilds (1.12.6 and 1.12.6-r3)
Comment 9 Arseny Solokha 2014-08-27 12:09:18 UTC
(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.
Comment 10 Torsten Stets 2014-10-22 09:24:39 UTC
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.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-24 09:30:53 UTC
*** Bug 526630 has been marked as a duplicate of this bug. ***
Comment 12 Jaak Ristioja 2014-10-31 21:23:21 UTC
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.
Comment 13 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-11-12 11:03:13 UTC
*** Bug 529018 has been marked as a duplicate of this bug. ***
Comment 14 Perfect Gentleman 2014-11-30 07:21:49 UTC
the same problem with x11-libs/cairo-1.12.16-r4
Comment 15 Perfect Gentleman 2014-11-30 07:24:30 UTC
(In reply to Perfect Gentleman from comment #14)
> the same problem with x11-libs/cairo-1.12.16-r4

USE="-lto" solves the problem
Comment 16 Michal Plichta 2014-12-02 18:36:23 UTC
(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.
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-23 21:32:26 UTC
+  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.