[Bug 197542] find-lib.sh doesn't find library
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Feb 11 17:37:21 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197542
Bug ID: 197542
Summary: find-lib.sh doesn't find library
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Ports Framework
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: cgreen at sentex.ca
CC: portmgr at FreeBSD.org
When installing gettext-tools, I get the following:
===> Patching for gettext-tools-0.19.4
===> Applying FreeBSD patches for gettext-tools-0.19.4
===> gettext-tools-0.19.4 depends on shared library: libexpat.so - found
(/usr/local/lib/libexpat.so.1.6.0)
===> gettext-tools-0.19.4 depends on shared library: libintl.so - found
(/usr/local/lib/libintl.so.8.1.3)
===> gettext-tools-0.19.4 depends on shared library: libiconv.so.3 - not
found
libiconv.so.3 is not found.
However, the package is installed:
cgreen:Smtp1:/usr/local/lib# pkg info libiconv
libiconv-1.14_6
Name : libiconv
Version : 1.14_6
Installed on : Wed Feb 11 11:45:01 EST 2015
Origin : converters/libiconv
And the files are present in /usr/local/lib:
cgreen:Smtp1:/usr/local/lib# ll /usr/local/lib/libicon*
-rw-r--r-- 1 root wheel 1117168 Feb 11 11:44 /usr/local/lib/libiconv.a
lrwxr-xr-x 1 root wheel 17 Feb 11 11:44 /usr/local/lib/libiconv.so@ ->
libiconv.so.2.5.1
lrwxr-xr-x 1 root wheel 17 Feb 11 11:44 /usr/local/lib/libiconv.so.2@
-> libiconv.so.2.5.1
-rw-r--r-- 1 root wheel 1089102 Feb 11 11:44
/usr/local/lib/libiconv.so.2.5.1
lrwxr-xr-x 1 root wheel 13 Feb 11 11:45 /usr/local/lib/libiconv.so.3@
-> libiconv.so.2
Therein lies the problem.
Gettext requires libiconv.so.3, which is a symlink.
/usr/ports/Mk/bsd.port.mk calls /usr/ports/Mk/Scripts/find-lib.sh to find the
absolute path to the library.
find-lib.sh has a routine to resolve symlinks, but it fails (after setting the
appropriate env vars):
cgreen:Smtp1:/usr/local/lib# sh /usr/ports/Mk/Scripts/find-lib.sh libiconv.so.3
cgreen:Smtp1:/usr/local/lib#
It's failing because while the libiconv.so.3 symlink is resolved to
/usr/local/lib/libiconv.so.2, libiconv.so.2 is, as above, another symlink.
The resolved file /usr/local/lib/libiconv.so.2 is passed to "file -b -L
--mime-type" which dutifully reports it as a symlink and not the x-sharedlib
find-lib.sh is looking for, and find-lib exits unsuccessfully.
If you pass find-lib.sh libivonv.so.2 instead, it works as intended:
cgreen:Smtp1:/usr/local/lib# sh /usr/ports/Mk/Scripts/find-lib.sh libiconv.so.2
/usr/local/lib/libiconv.so.2.5.1
However, the double-symlink that libiconv installs (.so.3 -> .so.2 ->
.so.2.5.1) trips up find-lib.sh.
While the issue can be fixed by having libiconv link .so.3 directly to
.so.2.5.1 (my current workaround), I have no idea how many other ports may use
a double-symlink, so I'm guessing fixing the find-lib.sh tool to watch for
double-symlinks (or more levels or redirection?) would likely be easiest.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list