Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602244 - net-libs/zeromq-4.2.0 Error emerge due missing -ldl with libunwind installed
Summary: net-libs/zeromq-4.2.0 Error emerge due missing -ldl with libunwind installed
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-10 12:43 UTC by Alessandro
Modified: 2016-12-11 14:09 UTC (History)
2 users (show)

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


Attachments
gzipped temp build.log file (build.log.gz,8.84 KB, application/gzip)
2016-12-10 13:14 UTC, Alessandro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro 2016-12-10 12:43:37 UTC
net-libs/zeromq-4.2.0 (and maybe previouses) fails building with USE=sodium enabled due missing -ldl ldflags (undefined reference to dladdr)

error:

libtool: link: x86_64-pc-linux-gnu-g++ -std=gnu++11 -march=native -O2 -pipe -Wl,-O1 -o perf/.libs/local_lat perf/local_lat.o  -Wl,--as-needed src/.libs/libzmq.so -lunwind -lsodium -lrt -lpthread
src/.libs/libzmq.so: error: undefined reference to 'dladdr'
libtool: link: x86_64-pc-linux-gnu-g++ -std=gnu++11 -march=native -O2 -pipe -Wl,-O1 -o perf/.libs/inproc_lat perf/inproc_lat.o  -Wl,--as-needed src/.libs/libzmq.so -lunwind -lsodium -lrt -lpthread
src/.libs/libzmq.so: error: undefined reference to 'dladdr'
src/.libs/libzmq.so: error: undefined reference to 'dladdr'
src/.libs/libzmq.so: error: undefined reference to 'dladdr'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
src/.libs/libzmq.so: error: undefined reference to 'dladdr'
make[1]: *** [Makefile:2384: perf/local_lat] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2396: perf/remote_lat] Error 1
make[1]: *** [Makefile:2372: perf/inproc_lat] Error 1
make[1]: *** [Makefile:2402: perf/remote_thr] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:2390: perf/local_thr] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-libs/zeromq-4.2.0/work/zeromq-4.2.0'
make: *** [Makefile:4035: all-recursive] Error 1
 * ERROR: net-libs/zeromq-4.2.0::gentoo failed (compile phase):

$ emerge --info
Portage 2.3.3 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r3, 4.8.12-gentoo-r1-bsc.01 x86_64)
=================================================================
System uname: Linux-4.8.12-gentoo-r1-bsc.01-x86_64-AMD_A8-7600_Radeon_R7,_10_Compute_Cores_4C+6G-with-gentoo-2.3
KiB Mem:    15404084 total,   9269920 free
KiB Swap:    2097148 total,   2097148 free
sh bash 4.4_p5-r1
ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12
app-shells/bash:          4.4_p5-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.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.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://git.gentoo.org/repo/gentoo.git
    priority: -1000

aegypius
    location: /usr/local/repos/aegypius
    sync-type: git
    sync-uri: https://github.com/aegypius/overlay.git
    masters: gentoo
    priority: 50

docker
    location: /usr/local/repos/docker
    sync-type: git
    sync-uri: https://github.com/tianon/docker-overlay.git
    masters: gentoo
    priority: 50

science
    location: /usr/local/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-science/sci.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA RAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
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"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cdr clang cli consolekit cracklib crypt cups cxx dbus dri dts dvb dvd dvdr egl emboss encode exif fam firefox flac fortran gdbm gif glamor glamour gpm gtk hddtemp iconv icu infinality ipv6 jpeg lapack lcms ldap libnotify lldb mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opencl opengl openmp oss pam pango pcre pdf png policykit postscript ppds qt3support readline savedconfig sdl seccomp session spell sqlite sse sse2 ssl startup-notification svg tcl tcpd threads tiff tk truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis webgl webp wifi x264 xattr xcb xml xv xvid zlib zsh-completion" 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="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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="evdev keyboard 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" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" 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 Alessandro 2016-12-10 13:13:18 UTC
Is not referred to libsodium but libunwind.

zeromq on configuration phase checks for libunwind and enable some "perf related" CFLAGS, but don't add -ldl flag.
Comment 2 Alessandro 2016-12-10 13:14:44 UTC
Created attachment 455746 [details]
gzipped temp build.log file
Comment 3 Andrey Grozin gentoo-dev 2016-12-10 15:49:26 UTC
Same here:

x86_64-pc-linux-gnu-g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I./src  -I./include -I./include -pedantic -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -Wno-long-long   -O2 -march=native -pipe -c -o perf/local_lat.o perf/local_lat.cpp
/bin/sh ./libtool  --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++ -std=gnu++11  -O2 -march=native -pipe  -Wl,-O1 -Wl,--as-needed -o perf/local_lat perf/local_lat.o src/libzmq.la -lrt -lpthread 
libtool: link: x86_64-pc-linux-gnu-g++ -std=gnu++11 -O2 -march=native -pipe -Wl,-O1 -o perf/.libs/local_lat perf/local_lat.o  -Wl,--as-needed src/.libs/libzmq.so -lunwind -lsodium -lrt -lpthread
src/.libs/libzmq.so: undefined reference to `dladdr'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:2384: perf/local_lat] Error 1
Comment 4 Alessandro 2016-12-11 12:35:51 UTC
It's a zeromq configuration problem: https://github.com/zeromq/libzmq/issues/2033
Comment 5 Luca Boccassi 2016-12-11 12:37:40 UTC
This should be fixed in the repository, if you could please confirm, the patch is just a one-liner:

https://github.com/zeromq/libzmq/pull/2206/files
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2016-12-11 13:06:20 UTC
For some reason Alessandro's `emerge --info` output does not contain the information about the last tree update, i.e. something like

> Timestamp of repository gentoo: Thu, 08 Dec 2016 14:42:07 +0000

And the build.log does indicate that your tree does not contain the fix from bug 602230.


Alessandro and Andrey, could you please tell us if you are still experience the problem with the current ebuild which contains the patch mentioned in comment #5? I.e. please update tree and verify that the =net-libs/zeromq-4.2.0 ebuild does contain the following line: 

> "${FILESDIR}"/${P}-dl-backport.patch
Comment 7 Andrey Grozin gentoo-dev 2016-12-11 13:40:07 UTC
I've synced the tree right now. zeromq-4.2.0 emerges fine.
Comment 8 Alessandro 2016-12-11 14:09:52 UTC
same here.