Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 640932

Summary: net-irc/irssi-1.0.5: USE=perl - Building with Perl support ....... : NO! - Error linking with perl libraries: [..] -lnsl [..]: .../ld: error: cannot find -lnsl
Product: Gentoo Linux Reporter: Enne Eziarc <gentoo+bugs>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jstein, kentnl, monsieurp
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 636158    
Attachments: build.log
build.log

Description Enne Eziarc 2017-12-13 16:57:25 UTC
Created attachment 509886 [details]
build.log

Looks like an undeclared dependency on net-libs/libnsl, which I don't currently have installed, but I don't understand where that's coming from or why it's needed. Both perl5 and irssi currently run fine separately.
Comment 1 Jonas Stein gentoo-dev 2017-12-14 08:33:24 UTC
ebuild ... does not fetch dependencies or dependencies of dependencies.
Please *attach* the logfiles of emerge irssi,
https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29
and reopen this ticket (Status:unconfirmed).
Comment 2 Enne Eziarc 2017-12-14 17:42:03 UTC
Created attachment 510042 [details]
build.log
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-12-26 22:02:18 UTC
irssi-1.0.5 $ grep -i nsl configure.ac 
AC_SEARCH_LIBS([inet_addr], [nsl])


But note to irssi maintainers, there is also an auxiliary bug where perl may retain -lnsl in its linker flags due to perl's Config.pm

So ensure machines that exhibit this (or similar) bugs don't show -lnsl in:

grep nsl $( grep Config.pm <( qlist perl ))
Comment 4 Sven Wegener gentoo-dev 2018-01-04 22:40:41 UTC
I assume the nsl build error comes from the mentioned perl bug.

irssi seems to use the libnsl on some systems for inet_addr, which is part of libc these days. the configure result for this check in the build log:

> checking for library containing inet_addr... none required

so irssi itself does not want to link to it.