Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735024 - net-dns/bind-9.16.5 links against /usr/lib/libisc.so.1603.1.0 (from net-dns/bind-9.16.4)
Summary: net-dns/bind-9.16.5 links against /usr/lib/libisc.so.1603.1.0 (from net-dns/b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-08-01 10:37 UTC by Jeroen Roovers (RETIRED)
Modified: 2020-08-02 15:33 UTC (History)
1 user (show)

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


Attachments
remove -L from LDFLAGS (bind-9.16.5-ldflags.patch,375 bytes, patch)
2020-08-02 10:48 UTC, Vyacheslav Bogachenkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2020-08-01 10:37:15 UTC
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
Comment 1 Vyacheslav Bogachenkov 2020-08-02 09:41:47 UTC
(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
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-02 09:47:29 UTC
(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.
Comment 3 Vyacheslav Bogachenkov 2020-08-02 10:36:54 UTC
(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>
Comment 4 Vyacheslav Bogachenkov 2020-08-02 10:48:07 UTC
Created attachment 652298 [details, diff]
remove -L from LDFLAGS
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-02 10:56:12 UTC
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.
Comment 6 Vyacheslav Bogachenkov 2020-08-02 11:09:25 UTC
(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
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-02 14:08:06 UTC
(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.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-02 14:10:09 UTC
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.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2020-08-02 14:12:12 UTC
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".
Comment 10 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-08-02 14:45:22 UTC
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.
Comment 11 Larry the Git Cow gentoo-dev 2020-08-02 15:33:01 UTC
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(-)