After upgrading to 9.16.5 I see emerge wants me to re-emerge it because of linkage to an older version of a library it installs. libtool seems to pick up a -L/usr/lib before -lisc. E.g.: libtool: relink: hppa2.0-unknown-linux-gnu-gcc -shared -fPIC -DPIC .libs/context.o .libs/dnsconf.o .libs/gai_strerror.o .libs/getaddrinfo.o .libs/getnameinfo.o .libs/resconf.o .libs/version.o -L/var/tmp/portage/net-dns/bind-9.16.5/work/bind-9.16.5/lib/isc/.libs -L/var/tmp/portage/net-dns/bind-9.16.5/work/bind-9.16.5/lib/dns/.libs -Wl,--as-needed -L/usr/lib -L/var/tmp/portage/net-dns/bind-9.16.5/image/usr/lib -lisccfg -ldns -lmaxminddb -lisc -lcrypto -ljson-c -luv -lz -ldl -mschedule=8000 -march=2.0 -ggdb -O2 -pthread -Wl,-O1 -Wl,--hash-style=gnu -Wl,--no-keep-memory -Wl,--export-dynamic -pthread -Wl,-soname -Wl,libirs.so.1601 -o .libs/libirs.so.1601.0.0
(In reply to Jeroen Roovers from comment #0) > After upgrading to 9.16.5 I see emerge wants me to re-emerge it because of > linkage to an older version of a library it installs. libtool seems to pick > up a -L/usr/lib before -lisc. E.g.: > > libtool: relink: hppa2.0-unknown-linux-gnu-gcc -shared -fPIC -DPIC > .libs/context.o .libs/dnsconf.o .libs/gai_strerror.o .libs/getaddrinfo.o > .libs/getnameinfo.o .libs/resconf.o .libs/version.o > -L/var/tmp/portage/net-dns/bind-9.16.5/work/bind-9.16.5/lib/isc/.libs > -L/var/tmp/portage/net-dns/bind-9.16.5/work/bind-9.16.5/lib/dns/.libs > -Wl,--as-needed -L/usr/lib > -L/var/tmp/portage/net-dns/bind-9.16.5/image/usr/lib -lisccfg -ldns > -lmaxminddb -lisc -lcrypto -ljson-c -luv -lz -ldl -mschedule=8000 > -march=2.0 -ggdb -O2 -pthread -Wl,-O1 -Wl,--hash-style=gnu > -Wl,--no-keep-memory -Wl,--export-dynamic -pthread -Wl,-soname > -Wl,libirs.so.1601 -o .libs/libirs.so.1601.0.0 try using MAKEOPTS="-j1" for net-dns/bind
(In reply to slawan from comment #1) > try using MAKEOPTS="-j1" for net-dns/bind I guarantee you one hundred per cent that MAKEOPTS has nothing to do with this and that you completely misunderstood the issue at hand.
(In reply to Jeroen Roovers from comment #2) > I guarantee you one hundred per cent that MAKEOPTS has nothing to do with > this and that you completely misunderstood the issue at hand. you're right! Problem in bind-9.16.5.ebuild <code> export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir) -ldl" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ </code>
Created attachment 652298 [details, diff] remove -L from LDFLAGS
Comment on attachment 652298 [details, diff] remove -L from LDFLAGS >--- bind-9.16.5.ebuild 2020-08-02 13:45:27.556740539 +0300 >+++ bind-9.16.5-r1.ebuild 2020-08-02 13:25:59.135312749 +0300 >@@ -92,7 +92,7 @@ > src_prepare() { > default > >- export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir) -ldl" >+ export LDFLAGS="${LDFLAGS} -ldl" What could have been the original reason to mangle LDFLAGS like this? Why is "-ldl" still being injected here? What I guess is that this is a workaround for a problem that originates elsewhere and that the entire line should be removed in favour of fixing the actual problem deeper down.
(In reply to Jeroen Roovers from comment #5) > Comment on attachment 652298 [details, diff] [details, diff] > remove -L from LDFLAGS > > >--- bind-9.16.5.ebuild 2020-08-02 13:45:27.556740539 +0300 > >+++ bind-9.16.5-r1.ebuild 2020-08-02 13:25:59.135312749 +0300 > >@@ -92,7 +92,7 @@ > > src_prepare() { > > default > > > >- export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir) -ldl" > >+ export LDFLAGS="${LDFLAGS} -ldl" > > What could have been the original reason to mangle LDFLAGS like this? Why is > "-ldl" still being injected here? What I guess is that this is a workaround > for a problem that originates elsewhere and that the entire line should be > removed in favour of fixing the actual problem deeper down. if -ldl is not needed, then -Wl,--as-needed will remove it. But maybe you should try to build without -ldl
(In reply to slawan from comment #6) > > >- export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir) -ldl" [...] > if -ldl is not needed, then -Wl,--as-needed will remove it. But maybe you > should try to build without -ldl I was questioning why, when, or where, the entire LDFLAGS mangling was there, not trying to hack around the problem by trial and error. If the point was to show the linker where to find some symbols, then it should have been injecting " -L${EPREFIX}/usr/$(get_libdir) -ldl" properly into LIBS, and not LDFLAGS.
commit 7597f1a046ad0d59bf67712b6ee3041de117c13e Author: Mikle Kolyada <zlogene@gentoo.org> Date: Mon Aug 19 01:32:25 2019 +0300 net-dns/bind: export LDFLAGS with respect to libdir Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> diff --git a/net-dns/bind/bind-9.14.4.ebuild b/net-dns/bind/bind-9.14.4.ebuild index 73486f000ee..02378940927 100644 --- a/net-dns/bind/bind-9.14.4.ebuild +++ b/net-dns/bind/bind-9.14.4.ebuild @@ -95,6 +95,8 @@ pkg_setup() { src_prepare() { default + export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir)" + # Adjusting PATHs in manpages for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do sed -i \ diff --git a/net-dns/bind/bind-9.15.2.ebuild b/net-dns/bind/bind-9.15.2.ebuild index d1efa262a4a..805319e464b 100644 --- a/net-dns/bind/bind-9.15.2.ebuild +++ b/net-dns/bind/bind-9.15.2.ebuild @@ -95,6 +95,8 @@ pkg_setup() { src_prepare() { default + export LDFLAGS="${LDFLAGS} -L${EPREFIX}/usr/$(get_libdir)" + # Adjusting PATHs in manpages for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do sed -i \ No reasons given here either.
commit bc1637a2780976fcc1af483c364e0fd075c32948 Author: Mikle Kolyada <zlogene@gentoo.org> Date: Sun Oct 20 11:17:42 2019 +0300 net-dns/bind: Version bump (v9.14.7) Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> Looks like that ebuild first introduced " -ldl".
Hi Jeroen, please feel free to drop that hack if you can confirm it works fine for you. It has too long story which I am kind of reluctant to repeat, but admittedly I forgot about this one, it should not be needed anymore as far as I remember.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d2a480f9ebf1e5958b5100658ee98e6e2e413e1 commit 7d2a480f9ebf1e5958b5100658ee98e6e2e413e1 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-08-02 15:24:55 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-08-02 15:32:58 +0000 net-dns/bind: Drop LDFLAGS injection Package-Manager: Portage-3.0.1, Repoman-2.3.23 Closes: https://bugs.gentoo.org/show_bug.cgi?id=735024 Signed-off-by: Jeroen Roovers <jer@gentoo.org> net-dns/bind/bind-9.14.12.ebuild | 2 -- net-dns/bind/bind-9.16.4.ebuild | 2 -- net-dns/bind/bind-9.16.5.ebuild | 2 -- 3 files changed, 6 deletions(-)