Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453938 - dev-libs/libaio: libaio.so built with -flto missing bunch of important symbols
Summary: dev-libs/libaio: libaio.so built with -flto missing bunch of important symbols
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
: 472706 499096 (view as bug list)
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2013-01-25 05:34 UTC by Jason Schulz
Modified: 2024-03-11 22:46 UTC (History)
4 users (show)

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


Attachments
build log (build.log,756.47 KB, text/plain)
2013-01-25 05:36 UTC, Jason Schulz
Details
environment (environment,239.33 KB, text/plain)
2013-01-25 05:36 UTC, Jason Schulz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Schulz 2013-01-25 05:34:26 UTC
Attempting to build app-emulation/qemu-1.2.2-r2 with USE="aio" fails.

emerge --info '=app-emulation/qemu-1.2.2-r2'
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.7.2, glibc-2.15-r3, 3.6.8-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.6.8-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7800_@_2.60GHz-with-gentoo-2.1
Timestamp of tree: Sun, 20 Jan 2013 22:00:01 +0000
ld GNU gold (GNU Binutils 2.23.1) 1.11
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.1.5-r1, 3.2.3-r2, 3.3.0-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-dev-tools x-java-libs dustin
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 Google-TOS skype-4.0.0.7-copyright PUEL AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -fomit-frame-pointer -flto -floop-block -floop-interchange -floop-strip-mine -ffp-contract=fast -march=core2 -mtune=core2 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=4096 -m128bit-long-double -m64 -m80387 -maccumulate-outgoing-args -malign-stringops -mcx16 -mfancy-math-387 -mfp-ret-in-387 -mglibc -mieee-fp -mmmx -mno-abm -mno-aes -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-fma4 -mno-fsgsbase -mno-lwp -mno-lzcnt -mno-movbe -mno-pclmul -mno-popcnt -mno-rdrnd -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-tbm -mno-xop -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3 -mtls-direct-seg-refs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
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="-pipe -O2 -fomit-frame-pointer -flto -floop-block -floop-interchange -floop-strip-mine -ffp-contract=fast -march=core2 -mtune=core2 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=4096 -m128bit-long-double -m64 -m80387 -maccumulate-outgoing-args -malign-stringops -mcx16 -mfancy-math-387 -mfp-ret-in-387 -mglibc -mieee-fp -mmmx -mno-abm -mno-aes -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-fma4 -mno-fsgsbase -mno-lwp -mno-lzcnt -mno-movbe -mno-pclmul -mno-popcnt -mno-rdrnd -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-tbm -mno-xop -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3 -mtls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg 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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,-flto"
MAKEOPTS="-j8"
PKGDIR="/var/pkg/core2/gcc-4.7"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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/dev-tools /var/lib/layman/java-libs /var/lib/layman/dustin"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi aio amd64 berkdb bzip2 cli cracklib crypt cxx flac fortran gdbm gpm iconv ipv6 java6 mmx modules mp3 mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pam pcre pulseaudio readline session sse sse2 sse3 ssl ssse3 tcpd threads udev unicode vorbis zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" 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, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-1.2.2-r2 was built with the following:
USE="caps curl jpeg ncurses opengl png pulseaudio sdl seccomp spice threads uuid vhost-net vnc -aio -alsa -bluetooth -brltty -debug -doc -fdt -mixemu -python -rbd -sasl (-selinux) -smartcard -static -systemtap -tci -tls -usbredir -vde -virtfs -xattr -xen -xfs" QEMU_SOFTMMU_TARGETS="x86_64 (-alpha) (-arm) -cris -i386 -lm32 (-m68k) -microblaze -microblazeel (-mips) -mips64 -mips64el -mipsel -or32 (-ppc) (-ppc64) -ppcemb -s390x -sh4 -sh4eb (-sparc) -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="x86_64 (-alpha) (-arm) -armeb -cris -i386 (-m68k) -microblaze -microblazeel (-mips) -mipsel -or32 (-ppc) (-ppc64) -ppc64abi32 -s390x -sh4 -sh4eb (-sparc) -sparc32plus -sparc64 -unicore32"
CFLAGS="-pipe -O2 -fomit-frame-pointer -flto -floop-block -floop-interchange -floop-strip-mine -ffp-contract=fast -march=core2 -mtune=core2 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=4096 -m128bit-long-double -m64 -m80387 -maccumulate-outgoing-args -malign-stringops -mcx16 -mfancy-math-387 -mfp-ret-in-387 -mglibc -mieee-fp -mmmx -mno-abm -mno-aes -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-fma4 -mno-fsgsbase -mno-lwp -mno-lzcnt -mno-movbe -mno-pclmul -mno-popcnt -mno-rdrnd -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-tbm -mno-xop -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3 -mtls-direct-seg-refs -fno-lto"
CXXFLAGS="-pipe -O2 -fomit-frame-pointer -flto -floop-block -floop-interchange -floop-strip-mine -ffp-contract=fast -march=core2 -mtune=core2 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=4096 -m128bit-long-double -m64 -m80387 -maccumulate-outgoing-args -malign-stringops -mcx16 -mfancy-math-387 -mfp-ret-in-387 -mglibc -mieee-fp -mmmx -mno-abm -mno-aes -mno-avx -mno-avx2 -mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-fma4 -mno-fsgsbase -mno-lwp -mno-lzcnt -mno-movbe -mno-pclmul -mno-popcnt -mno-rdrnd -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-tbm -mno-xop -mpush-args -mred-zone -msahf -msse -msse2 -msse3 -mssse3 -mtls-direct-seg-refs -fno-lto"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,-flto -fno-lto"

emerge -pqv '=app-emulation/qemu-1.2.2-r2'
[ebuild   R   ] app-emulation/qemu-1.2.2-r2  USE="caps curl jpeg ncurses opengl png pulseaudio sdl seccomp spice threads uuid vhost-net vnc -aio -alsa -bluetooth -brltty -debug -doc -fdt -mixemu -python -rbd -sasl (-selinux) -smartcard -static -systemtap -tci -tls -usbredir -vde -virtfs -xattr -xen -xfs" QEMU_SOFTMMU_TARGETS="x86_64 -alpha -arm -cris -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="x86_64 -alpha -arm -armeb -cris -i386 -m68k -microblaze -microblazeel -mips -mipsel -or32 -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32"
Comment 1 Jason Schulz 2013-01-25 05:36:05 UTC
Created attachment 336806 [details]
build log
Comment 2 Jason Schulz 2013-01-25 05:36:29 UTC
Created attachment 336808 [details]
environment
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2013-01-26 20:50:02 UTC
I would say its likely an issue with you using -flto. 

Just to double check the obvious:

1. /usr/lib64/libaio.so is a GNU ld script to /lib64/libaio.so.1 correct? (you'll have to cat the file out)
1a. the OUTPUT_FORMAT is elf64-x86-64?
2. /lib64/libaio.so.1 and what it points to exists?
3. "readelf -s /lib64/libaio.so.1 | grep io_cancel" finds something?
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2013-01-26 20:58:26 UTC
In fact I just noticed you used gold as well. There's a known issue with ld scripts, gold and -flto.
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2013-01-26 20:59:31 UTC
Suggestions, Toolchain Ninjas?
Comment 6 Jason Schulz 2013-01-26 23:09:38 UTC
This is being linked using gold, but not "-flto", see "-fno-lto" in CFLAGS and LDFLAGS.

1. /usr/lib64/libaio.so is a GNU ld script to /lib64/libaio.so.1 correct? (you'll have to cat the file out)

cat /usr/lib64/libaio.so 
/* GNU ld script
   Since Gentoo has critical dynamic libraries in /lib, and the static versions
   in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
   run into linking problems.  This "fake" dynamic lib is a linker script that
   redirects the linker to the real lib.  And yes, this works in the cross-
   compiling scenario as the sysroot-ed linker will prepend the real path.

   See bug http://bugs.gentoo.org/4411 for more info.
 */

GROUP ( /lib64/libaio.so.1 )

1a. the OUTPUT_FORMAT is elf64-x86-64?

not sure

2. /lib64/libaio.so.1 and what it points to exists?

yes

3. "readelf -s /lib64/libaio.so.1 | grep io_cancel" finds something?

readelf -s /lib64/libaio.so.1

Symbol table '.dynsym' contains 10 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000470    22 FUNC    GLOBAL DEFAULT    8 io_queue_init@@LIBAIO_0.1
     2: 0000000000000460    11 FUNC    GLOBAL DEFAULT    8 io_setup@@LIBAIO_0.4
     3: 0000000000000450     5 FUNC    GLOBAL DEFAULT    8 io_queue_release@@LIBAIO_0.1
     4: 0000000000000440     8 FUNC    GLOBAL DEFAULT    8 io_destroy@@LIBAIO_0.4
     5: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND io_getevents
     6: 00000000000004a0    73 FUNC    GLOBAL DEFAULT    8 io_queue_run@@LIBAIO_0.1
     7: 0000000000000490     8 FUNC    GLOBAL DEFAULT    8 io_submit@@LIBAIO_0.1
     8: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBAIO_0.1
     9: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBAIO_0.4
Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2013-01-27 02:18:14 UTC
Try rebuilding your libaio, as its literally missing the symbols you mentioned. I assume you have 0.3.109-r3 installed?
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2013-01-27 02:19:44 UTC
Could be related to #437460 as well.
Comment 9 Jason Schulz 2013-01-27 04:07:43 UTC
I rebuilt libaio with "-fno-lto", and that seems to have fixed it.

readelf -s /lib64/libaio.so.1.0.1 

Symbol table '.dynsym' contains 15 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00000000000005c0    53 FUNC    GLOBAL DEFAULT    8 io_getevents@@LIBAIO_0.4
     2: 0000000000000520    22 FUNC    GLOBAL DEFAULT    8 io_queue_init@@LIBAIO_0.1
     3: 0000000000000550    14 FUNC    GLOBAL DEFAULT    8 io_queue_wait@@LIBAIO_0.4
     4: 0000000000000540     5 FUNC    GLOBAL DEFAULT    8 io_queue_release@@LIBAIO_0.1
     5: 0000000000000620    11 FUNC    GLOBAL DEFAULT    8 io_setup@@LIBAIO_0.4
     6: 0000000000000630     8 FUNC    GLOBAL DEFAULT    8 io_destroy@@LIBAIO_0.4
     7: 00000000000006b0    61 FUNC    GLOBAL DEFAULT    8 io_getevents@LIBAIO_0.1
     8: 0000000000000560    73 FUNC    GLOBAL DEFAULT    8 io_queue_run@@LIBAIO_0.1
     9: 0000000000000660    67 FUNC    GLOBAL DEFAULT    8 io_queue_wait@LIBAIO_0.1
    10: 0000000000000600     8 FUNC    GLOBAL DEFAULT    8 io_submit@@LIBAIO_0.1
    11: 0000000000000610     8 FUNC    GLOBAL DEFAULT    8 io_cancel@@LIBAIO_0.4
    12: 0000000000000640    17 FUNC    GLOBAL DEFAULT    8 io_cancel@LIBAIO_0.1
    13: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBAIO_0.1
    14: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS LIBAIO_0.4

I could have sworn I tried rebuilding libaio with "-fno-lto", but I must have missed updating the portage/package.env.
Comment 10 Jason Schulz 2013-01-27 04:13:48 UTC
(In reply to comment #7)
> Try rebuilding your libaio, as its literally missing the symbols you
> mentioned. I assume you have 0.3.109-r3 installed?

yep, dev-libs/libaio-0.3.109-r3 (rebuilt with "-fno-lto" fixed)
Comment 11 Ryan Hill (RETIRED) gentoo-dev 2013-01-27 04:23:45 UTC
Nothing for toolchain to do here then.  LTO is unsupported.
Comment 12 Doug Goldstein (RETIRED) gentoo-dev 2013-01-27 05:58:17 UTC
Well I guess marking this as fixed then since you have a workaround for the issue. If the toolchain guys won't support LTO, then packages using that toolchain can't possibly support it. Sorry.
Comment 13 Jason Schulz 2013-01-27 06:54:48 UTC
(In reply to comment #12)
> Well I guess marking this as fixed then since you have a workaround for the
> issue. If the toolchain guys won't support LTO, then packages using that
> toolchain can't possibly support it. Sorry.

I don't mind being a canary in the coal mine for the LTO stuff.

I am willing to bet a lot of the issues with LTO are common across portage.  Unfortunately I don't have the spare time to prove the theory at the moment.  Also, whether they're stability issues with LTO or issues in the packages, I'm not sure.
Comment 14 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-09 17:33:19 UTC
*** Bug 472706 has been marked as a duplicate of this bug. ***
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-24 21:00:35 UTC
*** Bug 499096 has been marked as a duplicate of this bug. ***