Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597514 - net-p2p/amule with dev-libs/crypto++-5.6.4-r3 - amuled: error while loading shared libraries: /usr/lib/libcryptopp.so.5.6: unexpected reloc type 0x03
Summary: net-p2p/amule with dev-libs/crypto++-5.6.4-r3 - amuled: error while loading s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-19 08:39 UTC by Aldo Mazzeo
Modified: 2016-10-21 18:00 UTC (History)
1 user (show)

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


Attachments
r2 build.log (crypto++-5.6.4-r2.build.log,20.31 KB, application/octet-stream)
2016-10-21 13:58 UTC, Aldo Mazzeo
Details
r3 build.log (crypto++-5.6.4-r3.build.log,63.84 KB, application/octet-stream)
2016-10-21 13:58 UTC, Aldo Mazzeo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aldo Mazzeo 2016-10-19 08:39:23 UTC
After updating on ARM from dev-libs/crypto++-5.6.4-r2 to dev-libs/crypto++-5.6.4-r3 I receive the following error message when I try to start amule-2.3.2:

amuled: error while loading shared libraries: /usr/lib/libcryptopp.so.5.6: unexpected reloc type 0x03

This was not happening with dev-libs/crypto++-5.6.4-r2.

emerge --info

Portage 2.3.2 (python 3.4.5-final-0, hardened/linux/arm/armv7a, gcc-5.3.0, glibc-2.23-r2, 4.4.20-v7+ armv7l)
=================================================================
System uname: Linux-4.4.20-v7+-armv7l-ARMv7_Processor_rev_5_-v7l-with-gentoo-2.3
KiB Mem:      947744 total,    202408 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 16 Oct 2016 21:00:01 +0000
sh bash 4.4-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.4-r1::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-march=native -O2 -pipe"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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 -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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 arm armv5te armv6 armv6t2 berkdb bindist bzip2 cli cracklib crypt cxx dri flac gdbm hardened iconv ipv6 jpeg modules mp3 ncurses nls nptl ogg openmp pam pax_kernel pcre pic pie png readline seccomp session ssl ssp subversion tcpd tiff unicode urandom usb xattr xtpax zlib" 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" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-0" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 05:01:13 UTC
Hi,

The difference between r2 and r3 is a change of build system of upstream, from a proprietary make to cmake. It is important help fixing the cmake as the proprietary was a mess.

Can you please provide build log of:
FEATURES=test emerge --oneshot dev-libs/crypto++

If you get the same error during test run, please also provide build log of:
FEATURES=test emerge --oneshot =dev-libs/crypto++-5.6.4-r2

So I can compare.

Thanks!
Comment 2 Aldo Mazzeo 2016-10-21 08:59:04 UTC
The test worked on -r3. Anyway, this is the output

>>> Test phase: dev-libs/crypto++-5.6.4-r3
 * .arm: running multilib-minimal_abi_src_test
>>> Working in BUILD_DIR: "/var/tmp/portage/dev-libs/crypto++-5.6.4-r3/work/build-.arm"
ctest
Test project /var/tmp/portage/dev-libs/crypto++-5.6.4-r3/work/build-.arm
    Start 1: build_cryptest
1/2 Test #1: build_cryptest ...................   Passed    2.71 sec
    Start 2: cryptest
2/2 Test #2: cryptest .........................   Passed   51.38 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =  54.12 sec
 * Tests succeeded.
>>> Completed testing dev-libs/crypto++-5.6.4-r3

If you need anything else...
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 09:03:14 UTC
Thanks!
So it is not fundamental issue with the linkage.
Can you please try to emerge amule again with the new version?
Also output of:
$ readelf -d/usr/lib/libcryptopp.so.5.6
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 09:35:33 UTC
ok, my bad, the tests in build are using the static version of the library, so the test is void for the shared library issue. best if I will be able to compare the linkage statement between the versions.

please do the following:
# rm -fr /var/tmp/portage/*
$ cd $PORTDIR/dev-libs/crypto++
$ ebuild crypto++-5.6.4-r2.ebuild clean install
$ ebuild crypto++-5.6.4-r3.ebuild clean install

Attach:
/var/tmp/portage/dev-libs/crypto++-5.6.4-r2/temp/build.log
/var/tmp/portage/dev-libs/crypto++-5.6.4-r3/temp/build.log
Comment 5 Aldo Mazzeo 2016-10-21 13:58:19 UTC
Created attachment 450894 [details]
r2 build.log
Comment 6 Aldo Mazzeo 2016-10-21 13:58:41 UTC
Created attachment 450896 [details]
r3 build.log
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 14:27:28 UTC
Thanks!
Strange, the only different I see is -pthread LDFLAG which should not have caused the issue you see.

Please try:
# LDFLAGS="-Wl,-O1 -Wl,--as-needed -pthread" emerge --oneshot dev-libs/crypto++

I also interested in the output of:
$ readelf -d /usr/lib/libcryptopp.so.5.6

Also please:
$ ls -la /usr/lib/libcryptopp*

Thanks!
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 14:33:04 UTC
OK, I think the CFLAGS is the problematic one, makes more sense.

# CFLAGS="-march=native -O2 -pipe -fPIC" CXXFLAGS="-march=native -O2 -pipe -fPIC" emerge --oneshot dev-libs/crypto++
Comment 9 Aldo Mazzeo 2016-10-21 15:09:26 UTC
Your last advice (adding -fPIC) made everything working. Thanks. I don't know if it's important, but I'm on an ARM hardened profile.

Can you provide an r4 with this thing included?

Thanks again.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 15:24:03 UTC
Yes, the build system mistakenly adds this only to 32bit platforms, I will fix this soon.
Thanks for your help!
Comment 11 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 17:59:38 UTC
Fixed in dev-libs/crypto++-5.6.4-r3
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2016-10-21 18:00:09 UTC
Sorry, fixed in dev-libs/crypto++-5.6.4-r4.