Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588474 - net-misc/networkmanager-1.2.2 fails to build due to missing -libdl linking libnm
Summary: net-misc/networkmanager-1.2.2 fails to build due to missing -libdl linking libnm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-09 22:19 UTC by Rick Harris
Modified: 2016-08-04 01:26 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,288.21 KB, text/x-log)
2016-07-09 22:19 UTC, Rick Harris
Details
missing-libdl-link-fix.patch (missing-libdl-link-fix.patch,620 bytes, patch)
2016-07-10 22:35 UTC, Rick Harris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Harris 2016-07-09 22:19:13 UTC
Created attachment 440228 [details]
build.log

Am able to workaround for now by doing:
LIBS="-ldl" emerge -1 networkmanager
Comment 1 Adrian Bassett 2016-07-10 14:12:22 UTC
(In reply to Rick Harris from comment #0)
> Created attachment 440228 [details]
> build.log
> 
> Am able to workaround for now by doing:
> LIBS="-ldl" emerge -1 networkmanager

For me the cause was under-linking caused by using the gold linker - there was no problem when I switched to ld.bfd for this version of networkmanager.
Comment 2 Rick Harris 2016-07-10 22:10:04 UTC
(In reply to Adrian.Bassett from comment #1)
> (In reply to Rick Harris from comment #0)
> > Created attachment 440228 [details]
> > build.log
> > 
> > Am able to workaround for now by doing:
> > LIBS="-ldl" emerge -1 networkmanager
> 
> For me the cause was under-linking caused by using the gold linker - there
> was no problem when I switched to ld.bfd for this version of networkmanager.

FWIW I'm not using ld.gold, using standard ld.bfd when build fails in this way.

Even just extracting upstream's vanilla tarball and issuing a './configure && make' on the source it fails in exactly the same way.

It seems maybe an oversight by upstream in libnm/Makefile.in leaving out '$(LIBDL)' in libnm.la: link line.

Changing:
$(AM_V_CCLD)$(libnm_la_LINK) -rpath $(libdir) $(libnm_la_OBJECTS) $(libnm_la_LIBADD) $(LIBS)

to be:
$(AM_V_CCLD)$(libnm_la_LINK) -rpath $(libdir) $(libnm_la_OBJECTS) $(libnm_la_LIBADD) $(LIBS) $(LIBDL)

prior to running configure, means a successful build.
Comment 3 Rick Harris 2016-07-10 22:35:42 UTC
Created attachment 440318 [details, diff]
missing-libdl-link-fix.patch
Comment 4 Adrian Bassett 2016-07-11 08:18:31 UTC
(In reply to Rick Harris from comment #3)
> Created attachment 440318 [details, diff] [details, diff]
> missing-libdl-link-fix.patch

Interesting - but changing the linker was the only thing I did.  

(Perhaps mine was a niche case but I am a little bit surprised that there aren't more people having problems if this software is as much installed as I assume it is.)
Comment 5 Rick Harris 2016-07-11 09:01:16 UTC
(In reply to Adrian.Bassett from comment #4)
> (In reply to Rick Harris from comment #3)
> > Created attachment 440318 [details, diff] [details, diff] [details, diff]
> > missing-libdl-link-fix.patch
> 
> Interesting - but changing the linker was the only thing I did.  
> 
> (Perhaps mine was a niche case but I am a little bit surprised that there
> aren't more people having problems if this software is as much installed as
> I assume it is.)
Maybe both our cases are special.
I'm always finding new and interesting ways to break stuff :)

Bit surprised also but this version hasn't been in the tree more than a few days so probably time will tell.
Comment 6 Johannes Hirte 2016-07-13 15:51:02 UTC
(In reply to Adrian.Bassett from comment #1)
> (In reply to Rick Harris from comment #0)
> > Created attachment 440228 [details]
> > build.log
> > 
> > Am able to workaround for now by doing:
> > LIBS="-ldl" emerge -1 networkmanager
> 
> For me the cause was under-linking caused by using the gold linker - there
> was no problem when I switched to ld.bfd for this version of networkmanager.

Can confirm this. With gold the build fails. Switching to bfd linker works for me.
Comment 7 Rick Harris 2016-07-29 08:46:19 UTC
My bad I was unaware that my system was in fact using ld.gold.

Long boring story but I had mistakenly set and forgot EXTRA_ECONF="--enable-gold=default" in /etc/portage/...

This meant the readlink command I was using to detect the currently used 'ld' would display inaccurately and I actually needed to do 'ld -v' to find out it was set to 'gold'.

*sigh* Sorry for the noise, closing now...
Comment 8 Mike Gilbert gentoo-dev 2016-07-29 12:23:13 UTC
It is still a bug that needs fixing.
Comment 9 Jason Schulz 2016-08-03 18:11:26 UTC
Also ran into this.  Is there a way to force ld.bfd in the ebuild?
Comment 10 Mike Gilbert gentoo-dev 2016-08-03 18:31:12 UTC
(In reply to Jason Schulz from comment #9)
> Also ran into this.  Is there a way to force ld.bfd in the ebuild?

Yes, but that's a workaround, not a fix.
Comment 11 Mike Gilbert gentoo-dev 2016-08-03 18:40:48 UTC
I see NM-1.2.4 was released, which includes the upstream fix for this. I'll bump it.
Comment 12 Mike Gilbert gentoo-dev 2016-08-04 01:26:51 UTC
commit 0c690a07eb4b9a1b013691255bfd1671212fc9e7
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Wed Aug 3 21:25:57 2016 -0400

    net-misc/networkmanager: bump to 1.2.4
    
    Package-Manager: portage-2.3.0_p16

 net-misc/networkmanager/Manifest                   |   1 +
 .../networkmanager/networkmanager-1.2.4.ebuild     | 322 +++++++++++++++++++++
 2 files changed, 323 insertions(+)