Subject: packages not finding libraries - explanation please
To: None <>
From: James Thompson <>
List: tech-pkg
Date: 12/01/2002 02:54:27
I should probably send-pr this but I'm running into a problem building
lang/librep.  The error is that ld can't find -liconv (converters/libiconv).

 From what I can tell the library is installed in /usr/pkg/lib and since 
being included in rpath I can't understand why it cannot be found.

silence% ls -l /usr/pkg/lib/libiconv.*
-rw-r--r--  1 root  wheel  906340 Dec  1 00:04 /usr/pkg/lib/libiconv.a
-r--r--r--  1 root  wheel     766 Dec  1 00:04 /usr/pkg/lib/
lrwxr-xr-x  1 root  wheel      15 Dec  1 00:04 /usr/pkg/lib/ 
lrwxr-xr-x  1 root  wheel      15 Dec  1 00:04 
/usr/pkg/lib/ ->
-r--r--r--  1 root  wheel  908507 Dec  1 00:04 /usr/pkg/lib/

The actual error being produced is the following:

cc -Wl,-R/usr/pkg/lib -o repdoc repdoc.o  -L/usr/pkg/lib 
/usr/pkg/lib/ /usr/pkg/lib/ -lc -lcrypt 
/usr/pkg/lib/ -Wl,--rpath -Wl,/usr/pkg/lib -Wl,--rpath 
ld: cannot find -liconv
gmake[1]: *** [repdoc] Error 1

If someone would be kind enough to explain to me why this is occuring I
would enjoy the explanation, it's happened to me before and I'd rather
know what was going on than having someone just "fix it" for me.

Much Appreciated