Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671110 - dev-util/perf-4.14.33 - linking failures when Python is compiled with LTO
Summary: dev-util/perf-4.14.33 - linking failures when Python is compiled with LTO
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Naohiro Aota
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-13 22:09 UTC by WGH
Modified: 2020-10-28 16:48 UTC (History)
1 user (show)

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


Attachments
build.log (perf-4.14.33-build.log,813.06 KB, text/plain)
2018-11-13 22:15 UTC, WGH
Details
build.log (perf-4.14.33-r1-build.log,884.54 KB, text/plain)
2018-11-13 22:15 UTC, WGH
Details
environment (perf-4.14.33-environment,152.06 KB, text/plain)
2018-11-13 22:16 UTC, WGH
Details
environment (perf-4.14.33-r1-environment,116.79 KB, text/plain)
2018-11-13 22:16 UTC, WGH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description WGH 2018-11-13 22:09:18 UTC
I currently have dev-util/perf-4.14.33 installed. When I tried to upgrade to dev-util/perf-4.14.33-r1, it failed to build, spewing A LOT of "undefined reference" errors. I then tried to rebuild the already installed version, and it failed to build as well.

I don't know what happened, but looks like there's something wrong with environment/dependencies, not with the ebuild.

Reproducible: Always




Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-7.3.0, glibc-2.27-r6, 4.18.16-gentoo x86_64)
=================================================================
System uname: Linux-4.18.16-gentoo-x86_64-Intel-R-_Core-TM-_i3-4010U_CPU_@_1.70GHz-with-gentoo-2.4.1
KiB Mem:     8057148 total,    236864 free
KiB Swap:   16777212 total,  16776428 free
Timestamp of repository gentoo: Wed, 07 Nov 2018 22:45:01 +0000
Head commit of repository gentoo: dd61315213ddd62b513390133e8d7a4cf7077389
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15-r100::sage-on-gentoo, 3.5.5-r1::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://mirror.yandex.ru/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

LocalOverlay
    location: /usr/local/portage
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: laymansync
    sync-uri: git://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

johu
    location: /var/lib/layman/johu
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/dev/johu.git
    masters: gentoo
    priority: 50

mrueg
    location: /var/lib/layman/mrueg
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/dev/mrueg.git
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    sync-type: laymansync
    sync-uri: git://github.com/pentoo/pentoo-overlay.git
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    sync-type: laymansync
    sync-uri: git://github.com/cschwan/sage-on-gentoo.git
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    sync-type: laymansync
    sync-uri: https://github.com/istitov/stuff.git
    masters: gentoo
    priority: 50

wjn-overlay
    location: /var/lib/layman/wjn-overlay
    sync-type: laymansync
    sync-uri: https://bitbucket.org/wjn/wjn-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe -msahf -mmovbe --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -mtune=core-avx2 -fstack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
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.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/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=core-avx2 -O2 -pipe -msahf -mmovbe --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -mtune=core-avx2 -fstack-protector"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news parallel-fetch 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://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bindist bzip2 cli crypt cxx dri fortran gdbm glamor iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre pulseaudio readline seccomp ssl systemd tcpd unicode vaapi xattr 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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard synaptics evdev mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 WGH 2018-11-13 22:15:07 UTC
Created attachment 555064 [details]
build.log

There're too many errors, so I skipped some of them to make file <1000 KB.
Comment 2 WGH 2018-11-13 22:15:37 UTC
Created attachment 555066 [details]
build.log

There're too many errors, so I skipped some of them to make file <1000 KB.
Comment 3 WGH 2018-11-13 22:16:17 UTC
Created attachment 555068 [details]
environment
Comment 4 WGH 2018-11-13 22:16:50 UTC
Created attachment 555070 [details]
environment
Comment 5 WGH 2018-12-21 12:29:56 UTC
This was caused by the fact I have Python 3 compiled with -flto.

This is fixed in newer perf versions.

https://lore.kernel.org/patchwork/patch/962160/
Comment 6 WGH 2018-12-21 12:35:39 UTC
Minor self-correction: in my case, both Python 2 and Python 3 are compiled with LTO, and perf seems to try to link to Python 2.
Comment 7 WGH 2018-12-21 12:48:19 UTC
Building perf with -python works in this circumstances.
Comment 8 WGH 2020-10-28 16:48:16 UTC
Since the problematic dev-util/perf versions are long gone from the portage tree, this problem is solved in a way.