Subject: pkg/21192: buildlink2/libtool -static broken when static libs are not present
To: None <gnats-bugs@gnats.netbsd.org>
From: None <grant@netbsd.org>
List: netbsd-bugs
Date: 04/16/2003 03:10:28
>Number:         21192
>Category:       pkg
>Synopsis:       buildlink2/libtool -static broken when static libs are not present
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 15 17:11:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     grant beattie
>Release:        SunOS 5.9
>Organization:
>Environment:
System: SunOS u10 5.9 Generic_112233-04 sun4u sparc SUNW,Ultra-5_10
Architecture: sparc
Machine: sun4u
>Description:
If a pkg uses 'libtool -static' and wants a library for which there is
no static library available, it fails to link citing that libxxx.a is
not found.

This happens with libpthread on Solaris 9, because the fake
libpthread.la in work/buildlink/lib refers to it, even though it
doesn't exist:

# Names of this library.
library_names='libpthread.so.1.0 libpthread.so.1 libpthread.so'

# The name of the static archive.
old_library='libpthread.a'

# ls -l /usr/lib/libpthread*
lrwxrwxrwx   1 root     root          17 Feb 28 03:03 /usr/lib/libpthread.so -> ./libpthread.so.1
-rwxr-xr-x   1 root     bin        37620 Apr  7  2002 /usr/lib/libpthread.so.1

>How-To-Repeat:
attempt to build such a pkg on Solaris (9), net/ORBit is a good example.

>Fix:
a workaround is to set old_library='' in libpthread.la - this is how it
should be if there is no static library.

>Release-Note:
>Audit-Trail:
>Unformatted: