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

Bug 642340

Summary: =dev-perl/Tk-804.33.0 missing net-libs/libnsl dependency (ld: error: cannot find -lnsl)
Product: Gentoo Linux Reporter: Petross404(Petros S) <petross404>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kentnl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 636158    
Attachments: build.log
emerge --info

Description Petross404(Petros S) 2017-12-26 20:01:01 UTC
Compiling =dev-perl/Tk-804.33.0 failes with:

/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find -lnsl

Emerging net-libs/libnsl allowed Tk to build successfully. So, is it an undeclared dependency?
Comment 1 Petross404(Petros S) 2017-12-26 20:07:32 UTC
Created attachment 511686 [details]
build.log
Comment 2 Petross404(Petros S) 2017-12-26 20:08:00 UTC
Created attachment 511688 [details]
emerge --info
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-12-26 21:55:56 UTC
  my @try   = qw(-lsocket -lnsl -lm);
  push(@try,'-lc') if $^O =~ /svr4/i;


*sigh*
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-02-28 02:56:13 UTC
I'm currently trying to reproduce this and I don't seem to able to replicate the problem, even without libnsl installed.

Despite the mentions of -lnsl in the source code, those are "soft-auto-detect" paths, and you shouldn't need libnsl installed to make dev-perl/Tk compile.

Its possible you've run afoul of Perl auto-including nsl in its configure (see bug #638518 for details ), so please make sure that:

    /usr/bin/perl -V | grep nsl

Emits no output before re-attempting.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2018-04-28 16:02:04 UTC
Let's hope this is fixed with newer dev-lang/perl.