Build with ld fine Build with ld.gold and +dlz fine. Build with ld.gold and -dlz fails in lib/samples: libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -pthread -Wl,-O1 -o .libs/sample-gai .libs/sample-gai.o -Wl,--as-needed ../irs/.libs/libirs.so ../dns/.libs/libdns.so -L/usr/lib ../isccfg/.libs/libisccfg.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/dns/.libs/libdns.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so ../isc/.libs/libisc.so -lcrypto -lz -pthread /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlclose' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlerror' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlsym' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlopen' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:480: sample-gai] Error 1 make[2]: *** Waiting for unfinished jobs.... libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -pthread -Wl,-O1 -o .libs/sample-request .libs/sample-request.o -Wl,--as-needed ../dns/.libs/libdns.so -L/usr/lib ../isccfg/.libs/libisccfg.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/dns/.libs/libdns.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so ../isc/.libs/libisc.so -lcrypto -lz -pthread /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlopen' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlsym' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlerror' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlclose' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:488: sample-request] Error 1 libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -pthread -Wl,-O1 -o .libs/sample-async .libs/sample-async.o -Wl,--as-needed ../dns/.libs/libdns.so -L/usr/lib ../isccfg/.libs/libisccfg.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/dns/.libs/libdns.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so ../isc/.libs/libisc.so -lcrypto -lz -pthread /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlclose' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlerror' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlsym' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlopen' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:476: sample-async] Error 1 libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -pthread -Wl,-O1 -o .libs/resolve .libs/resolve.o -Wl,--as-needed ../irs/.libs/libirs.so ../dns/.libs/libdns.so -L/usr/lib ../isccfg/.libs/libisccfg.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/dns/.libs/libdns.so /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so ../isc/.libs/libisc.so -lcrypto -lz -pthread /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlsym' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlerror' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlclose' /var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/isc/.libs/libisc.so: error: undefined reference to 'dlopen' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:472: resolve] Error 1 make[2]: Leaving directory '/var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib/samples' make[1]: *** [Makefile:84: subdirs] Error 1 make[1]: Leaving directory '/var/tmp/portage/net-dns/bind-9.14.4/work/bind-9.14.4/lib' make: *** [Makefile:91: subdirs] Error 1
Please attach the full build log and the output of emerge --info, thanks.
Created attachment 586292 [details] buildlog with fails with ld.gold Ok, I did: USE='gold default-gold' emerge binutils . /etc/profile MAKEOPTS='-j1' emerge -B bind emerge --info '=net-dns/bind-9.14.4::gentoo' Portage 2.3.69 (python 3.6.5-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-8.3.0, glibc-2.29-r2, 4.19.57-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.19.57-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5405_@_2.00GHz-with-gentoo-2.6 KiB Mem: 8166424 total, 2861612 free KiB Swap: 2097148 total, 2096624 free Timestamp of repository gentoo: Fri, 09 Aug 2019 00:00:01 +0000 Head commit of repository gentoo: 368852274f8c35d51095bdb04ef4590d9cb7894c Head commit of repository ejabberd: 884cba4789d1ce2c6f2b3438185bfecfb6450ac8 sh bash 4.4_p23-r1 ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16 app-shells/bash: 4.4_p23-r1::gentoo dev-lang/perl: 5.28.2-r1::gentoo dev-lang/python: 3.6.5::gentoo dev-util/cmake: 3.14.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.41.2::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.14.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.32-r1::gentoo sys-devel/gcc: 8.3.0-r1::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: x-portage location: /usr/local/portage masters: gentoo ejabberd location: /var/lib/layman/ejabberd sync-type: git sync-uri: https://github.com/rion-overlay/ejabberd-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE arj DCC intel-ucode linux-fw-redistributable lha no-source-code unRAR" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n" 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-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox 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="ru_RU.UTF-8" LC_ALL="ru_RU.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" 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 audit bzip2 caps crypt dane gmp hardened iconv idn ipv6 jemalloc jit libidn2 libtirpc lzma lzo nptl openmp pam pie poll readline seccomp split-usr ssl ssp threads unicode vhosts xattr xtpax 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="alias authn_core authz_core authz_host cache cgi cgid deflate dir filter http2 log_config log_forensic logio mime mime_magic socache_shmcb unixd vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" CURL_SSL="openssl" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NGINX_MODULES_HTTP="access brotli fastcgi gzip rewrite" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= net-dns/bind-9.14.4::gentoo was built with the following: USE="caps doc ssl zlib -berkdb -dlz -dnsrps -dnstap -fixed-rrset -geoip -gost -gssapi -json -ldap -libressl -lmdb -mysql -odbc -postgres -python (-selinux) -static-libs -urandom -xml" PYTHON_TARGETS="python3_6 -python2_7 -python3_5 (-python3_7)"
Added '-ldl' to LIBS in WORKDIR/lib/isc/Makefile{,.in}, 'make clean' in WORKDIR and 'ebuild path/to/bind.ebuild merge' did the trick for me. See: https://github.com/isc-projects/bind9/blob/master/lib/isc/Makefile.in#L83 The braindump can have typos. Whysoever dl got lost.
Looks like the build process has some issues anyway. (Or a profile 17.1 issue?) Upgrading bind from lib versions 13xx to 15xx, output of ldd speaks for itself: # ldd /usr/sbin/named-checkconf linux-vdso.so.1 (0x00007ffe27dae000) libbind9.so.1500 => /usr/lib64/libbind9.so.1500 (0x00007f0773c5b000) libns.so.1500 => /usr/lib64/libns.so.1500 (0x00007f0773c0e000) libisccfg.so.1500 => /usr/lib64/libisccfg.so.1500 (0x00007f0773bdd000) libdns.so.1501 => /usr/lib64/libdns.so.1501 (0x00007f07739cb000) libisc.so.1501 => /usr/lib64/libisc.so.1501 (0x00007f0773968000) libc.so.6 => /lib64/libc.so.6 (0x00007f07737f7000) libisccfg.so.1302 => /usr/lib64/libisccfg.so.1302 (0x00007f07737c5000) libcrypto.so.45 => /usr/lib64/libcrypto.so.45 (0x00007f07735dc000) libisc.so.1309 => /usr/lib64/libisc.so.1309 (0x00007f0773578000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0773559000) libdns.so.1310 => /usr/lib64/libdns.so.1310 (0x00007f0773344000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f077333f000) libz.so.1 => /lib64/libz.so.1 (0x00007f0773325000) /lib64/ld-linux-x86-64.so.2 (0x00007f0773c7f000) libdns.so.1309 => not found libisc.so.1308 => not found Then, I removed the 13xx version libraries completely, rebuild bind and ... # ldd /usr/sbin/named-checkconf linux-vdso.so.1 (0x00007fffdf8ed000) libbind9.so.1500 => /usr/lib64/libbind9.so.1500 (0x00007f7c30f06000) libns.so.1500 => /usr/lib64/libns.so.1500 (0x00007f7c30eb9000) libisccfg.so.1500 => /usr/lib64/libisccfg.so.1500 (0x00007f7c30e88000) libdns.so.1501 => /usr/lib64/libdns.so.1501 (0x00007f7c30c76000) libisc.so.1501 => /usr/lib64/libisc.so.1501 (0x00007f7c30c13000) libc.so.6 => /lib64/libc.so.6 (0x00007f7c30aa2000) libcrypto.so.45 => /usr/lib64/libcrypto.so.45 (0x00007f7c308b7000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7c30898000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f7c30893000) libz.so.1 => /lib64/libz.so.1 (0x00007f7c3087b000) /lib64/ld-linux-x86-64.so.2 (0x00007f7c30f29000)
*** Bug 695478 has been marked as a duplicate of this bug. ***
*** Bug 611810 has been marked as a duplicate of this bug. ***
*** Bug 617532 has been marked as a duplicate of this bug. ***
Should be fixed now.