# No library found for -lnsl



## bloodhound (Jan 22, 2009)

I am trying to install p5-Cflow from ports on Freebsd 7.1-p2 and also on 7 and i get this warning:

Note (probably harmless): No library found for -lnsl

So it doesn't work without it.

lnsl is part of libnsl but i can't find the package for it. 

I found :

/usr/compat/linux/lib/libnsl-2.3.6.so
/usr/compat/linux/lib/libnsl.so.1

but when i linked libnsl-2.3.6.so to /usr/local/lib/libnsl.so.1 i get : 

rm -f blib/arch/auto/Cflow/Cflow.so
LD_RUN_PATH="/usr/local/lib" cc  -shared  -L/usr/local/lib Cflow.o  -o blib/arch/auto/Cflow/Cflow.so      -lnsl
/usr/bin/ld: cannot find -lnsl
*** Error code 1

Stop in /usr/ports/net-mgmt/p5-Cflow/work/Cflow-1.053.
*** Error code 1

Stop in /usr/ports/net-mgmt/p5-Cflow.


Anyone got some magic for me to trick it and make it work?

Thank you


----------



## trev (Jan 23, 2009)

On FreeBSD, unlike Linux, libnsl functionality is included in libc. So you need to remove all references in the makefile to -lnsl.

Assuming you have the port downloaded, type make extract in the cflow port directory, cd to work/Cflow-1.053, edit Makefile.PL removing references to -lnsl, save, go back to main directory and  make all install).

This will build and install it WITHOUT the warning which, contrary to what it states, IS FATAL!


----------



## bloodhound (Jan 23, 2009)

Thx alot worked like a swish clock.

Also when installed p4-patricia had to take lnsl from Makefile.PL as well. Hope flowscan will work.


----------



## ale (Jan 23, 2009)

Maybe you should send-pr(1) or send an email to 
	
	



```
$ cd /usr/ports/net-mgmt/p5-Cflow
$ make maintainer
```


----------

