pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/37828: pkg shared libs do not depend on libc.so



>Number:         37828
>Category:       pkg
>Synopsis:       pkg shared libs do not depend on libc.so
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 21 05:55:00 +0000 2008
>Originator:     David A. Holland
>Release:        current pkgsrc of 20080117
>Organization:
>Environment:
System: NetBSD tanaqui 4.99.31 NetBSD 4.99.31 (TANAQUI) #19: Tue Sep 11 
19:46:35 EDT 2007  dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:

Most (nearly all) shared libraries built from pkgsrc do not have an
explicit dependency (a DT_NEEDED entry, if I remember my elf
correctly) on libc.

This severely restricts our future options for maintaining binary
compatibility (arguably, more so than the same issue in base) and
should be rectified as soon as possible.

>How-To-Repeat:

% ldd /usr/pkg/lib/libfontforge.so
/usr/pkg/lib/libfontforge.so:
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lgunicode.3 => /usr/pkg/lib/libgunicode.so.3
        -lICE.6 => /usr/X11R6/lib/libICE.so.6
        -lSM.6 => /usr/X11R6/lib/libSM.so.6
        -lX11.6 => /usr/X11R6/lib/libX11.so.6
        -lXext.6 => /usr/X11R6/lib/libXext.so.6
        -lXi.6 => /usr/X11R6/lib/libXi.so.6
        -lm.0 => /usr/lib/libm387.so.0
        -lm.0 => /usr/lib/libm.so.0
        -lxkbfile.1 => /usr/X11R6/lib/libxkbfile.so.1
        -lxkbui.1 => /usr/X11R6/lib/libxkbui.so.1
        -lgdraw.2 => /usr/pkg/lib/libgdraw.so.2

for example.

>Fix:

Add -lc to the link when building shared libs. Arranging for libtool
to do this would probably cover most of the widely used cases. I have
no idea how that might be done though.

Another possible alternative is to adjust our gcc specs so all shared
libs not using -nostdlib get -lc. Not sure this is really a good idea
though.

See also lib/37827.




Home | Main Index | Thread Index | Old Index