Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 495076

Summary: dev-util/perf-3.12: perf: error while loading shared libraries: libbfd-2.23.1.so: cannot open shared object file: No such file or directory
Product: Gentoo Linux Reporter: Stijn Tintel <stijn+gentoo>
Component: [OLD] DevelopmentAssignee: Naohiro Aota <naota>
Status: RESOLVED NEEDINFO    
Severity: normal CC: dschridde+gentoobugs
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log for dev-util/perf-3.12
Output of tests as requested in comment #9

Description Stijn Tintel 2013-12-23 01:15:18 UTC
perf can't find libbfd-2.23.1.so while it exists on my system.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-util/perf
2. perf top

Actual Results:  
perf: error while loading shared libraries: libbfd-2.23.1.so: cannot open shared object file: No such file or directory

Expected Results:  
Open PerfTop

Works if run like this:
LD_LIBRARY_PATH=/usr/lib64/binutils/x86_64-pc-linux-gnu/2.23.1/ perf top
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-23 01:20:44 UTC
Re-emerging dev-util/perf should fix that (since you switched to a new sys-devel/binutils).

It's probably going to be difficult to fix this one.
Comment 2 Stijn Tintel 2013-12-23 02:56:53 UTC
(In reply to Jeroen Roovers from comment #1)
> Re-emerging dev-util/perf should fix that (since you switched to a new
> sys-devel/binutils).

That would be weird though, since I had just installed dev-util/perf for the first time, and made no changes to binutils afterwards. Just to be sure I just re-emerged dev-util/perf, and the problem persists.
Comment 3 Naohiro Aota gentoo-dev 2013-12-24 13:35:33 UTC
Well... What's your perf version?? There's no perf-1.5.4 in Portage.
Comment 4 Stijn Tintel 2013-12-25 08:35:04 UTC
(In reply to Naohiro Aota from comment #3)
> Well... What's your perf version?? There's no perf-1.5.4 in Portage.

My bad, it's actually 3.12.
Comment 5 Naohiro Aota gentoo-dev 2013-12-25 23:43:49 UTC
Please provide your build.log and output of binutils-config -l
Comment 6 Stijn Tintel 2013-12-27 04:34:59 UTC
Created attachment 366268 [details]
build.log for dev-util/perf-3.12

taz ~ # binutils-config -l
 [1] x86_64-pc-linux-gnu-2.23.1 *
Comment 7 SpanKY gentoo-dev 2014-02-07 07:44:25 UTC
as Jer said, the issue is that perf links against the shared libs provided by binutils.  so any time you upgrade, you're going to break.

subslots might help with this.
Comment 8 SpanKY gentoo-dev 2014-02-14 05:09:56 UTC
the fact that linking -lbfd worked but then running the program didn't was weird

run some simple tests and post the output:
$ echo 'main(){}' > test.c
$ gcc test.c -lbfd
$ ./a.out
$ ldd a.out
$ ldconfig -p
$ grep ^ /etc/ld.so.conf /etc/ld.so.conf/05*
Comment 9 Stijn Tintel 2015-02-18 12:11:02 UTC
Created attachment 396824 [details]
Output of tests as requested in comment #9
Comment 10 Dennis Schridde 2015-10-02 07:31:38 UTC
I have a similar issue with mysqld:

$ q list sys-devel/binutils | grep libbfd-2.25
/usr/lib64/binutils/x86_64-pc-linux-gnu/2.25.1/libbfd-2.25.1.so

$ scanelf -n /usr/sbin/mysqld | grep libbfd-2.25 # 5th lib in the list
ET_DYN liblzma.so.5,libbz2.so.1,libaio.so.1,libz.so.1,libbfd-2.25.1.so,libpcre.so.1,libcrypt.so.1,libpthread.so.0,libssl.so.1.0.0,libcrypto.so.1.0.0,libdl.so.2,libstdc++.so.6,libm.so.6,libc.so.6,ld-linux-x86-64.so.2 /usr/sbin/mysqld 

I guess there is something wrong with the ldpath?

$ emerge --info dev-db/mariadb
Unavailable repository 'science' referenced by masters entry in '/var/lib/layman/sage-on-gentoo/metadata/layout.conf'
Portage 2.2.22 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-4.9.3, glibc-2.21-r1, 4.2.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.2.2-gentoo-x86_64-AMD_A10-7800_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.2
KiB Mem:    15381440 total,   8444560 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 02 Oct 2015 07:15:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.3 [disabled]
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.3::gentoo
dev-util/cmake:           3.3.2::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /var/cache/portage/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000

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

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.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
    priority: 50

local
    location: /var/cache/portage/local
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=bdver3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/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="-pipe -O2 -march=bdver3"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --nospinner"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg compressdebug config-protect-if-modified distlocks 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://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j5"
PKGDIR="/var/cache/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"
USE="X a52 aac aacplus aacs acl acpi alsa amd64 appindicator audit avahi bash-completion bdplus berkdb bluetooth bluray branding bzip2 cairo caps cdda cddb cdio cdr celt cjk cli conntrack cracklib crypt cups cxx dbus declarative dirac dri dts dvb dvd dvdr egl emboss encode exif fam fax ffmpeg firefox flac fontconfig fortran gdbm gif glamor gles gles2 gmp gpm gstreamer gtk ibus iconv ipv6 jpeg jpeg2k kde kipi ladspa latex lcms ldap libnotify libsecret lua_target_lua5-2 lv2 lz4 lzma lzo mad mmx mmxext mng modemmanager modplug modules mp3 mp4 mpeg mplayer mtp multilib multitarget mysql ncurses netlink networkmanager nls nptl ogg openal opencl openexr opengl openmax openmp opus pam pango pch pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline rtmp samba scanner schroedinger sctp sdl seccomp semantic-desktop session speex spell sse sse2 ssl startup-notification subversion svg systemd tcpd theora threads tiff truetype udev udisks unicode upnp upnp-av upower usb v4l vaapi vdpau vorbis vpx wavpack wayland webp widgets x264 x265 xattr xcb xcomposite xinerama xml xrandr xscreensaver xv xvid xz zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="stage words flow sheets gemini" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" DRACUT_MODULES="btrfs caps systemd" ELIBC="glibc" ENLIGHTENMENT_MODULES="*" 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="coreboot efi-64 pc" INPUT_DEVICES="evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_GB ar fa" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

dev-db/mariadb-10.1.7_rc::gentoo was built with the following:
USE="community cracklib pam perl server ssl tools -bindist -client-libs (-cluster) -debug -embedded -extraengine -galera -innodb-lz4 -innodb-lzo -innodb-snappy -jemalloc -latin1 -mroonga -odbc -oqgraph -profiling (-selinux) -sphinx -sst-rsync -sst-xtrabackup -static -static-libs -systemtap -tcmalloc -test -tokudb -xml" ABI_X86="32 64 -x32"
CFLAGS="-pipe -O2 -march=bdver3 -fno-strict-aliasing"
CXXFLAGS="-pipe -O2 -march=bdver3 -fno-strict-aliasing -felide-constructors -fno-strict-aliasing"
Comment 11 Dennis Schridde 2015-10-02 07:33:16 UTC
P.S: Rebuilding dev-db/mariadb-10.1.7_rc got rid of the dependency on libbfd-2.25.1.so:
# ldd /usr/sbin/mysqld | grep libbfd || echo notfound
notfound