Subject: pkg/15981: libtool pattern matching broken?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dmcmahill@netbsd.org>
List: netbsd-bugs
Date: 03/20/2002 09:28:46
>Number: 15981
>Category: pkg
>Synopsis: libtool pattern matching broken?
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 20 06:30:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Dan McMahill
>Release: NetBSD 1.5ZA
>Organization:
NetBSD.org
>Environment:
System: NetBSD mudshark 1.5ZA NetBSD 1.5ZA (GENERIC) #0: Sat Mar 2 22:02:27 EST 2002 dan@bondage:/export/disk1/src/netbsd-current/src/obj.alpha/sys/arch/alpha/compile/GENERIC alpha
Architecture: alpha
Machine: alpha
>Description:
it seems that our libtool's pattern for matching shared libs doesn't like
'.' in the library name.
The way libtool checks to see if a shared library is available from the
-lfoo flag is it looks for libfoo.so (or libfoo_pic.a). However if you have something like
-lfoo-1.0, it tries to look for libfoo-1.0.so, but the extra '.' throws
off the regexp in the pattern matching.
[using the current pkgsrc libtool's matching]
# echo "/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libgmodule-2.0.so" | \
sed 10q | egrep "/lib[^/\.]+(\.so|_pic\.a)$"
no match!
# echo "/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libgmodule.so" | \
sed 10q | egrep "/lib[^/\.]+(\.so|_pic\.a)$"
/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libgmodule.so
found a match!
[using a more relaxed matching that doesn't exclude the '.']
# echo "/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libgmodule-2.0.so" | \
sed 10q | egrep "/lib[^/]+(\.so|_pic\.a)$"
/usr/pkgsrc/x11/gtk2/work/.buildlink/lib/libgmodule-2.0.so
found a match!
>How-To-Repeat:
try and create a shared library that links to a -lsomethingwith.inthename
with libtool. It will complain that no shared lib for -lsomethingwith.inthename
is found.
>Fix:
change the matching pattern as shown above.
I didn't make the change myself because libtool touches too many pkgs and
I wanted extra opinions on this fix.
>Release-Note:
>Audit-Trail:
>Unformatted: