Bug 182607

Summary: RFE: rpmbuild should warn for unused shared libraries
Product: [Fedora] Fedora Reporter: dann
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-18 13:48:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
script to run ldd -u -r against executables and libraries none

Description dann 2006-02-23 17:22:53 UTC
According to Ulrich Drepper's "How to write shared libraries" document
(http://people.redhat.com/drepper/dsohowto.pdf document)
unused shared libraries are to be avoided because they impose unwanted overheads.  

A huge number of shared libraries in FC have unused dependencies.
As part of sanity checking the package 
rpmbuild could run "ldd -u -r " on all binaries and shared libraries and warn
about unused libraries. This could make package authors aware of the issue and
provide an incentive to improve the package.

Just my 2 cents.

Comment 1 Jeff Johnson 2006-03-18 13:33:48 UTC
The idea is sound, and rpm could pretty easily add a build root policy check like
the attached script if desired.

However, the choice to eliminate unused shared libraries is way outside the scope of rpm
even though a rpmbuild build root policy script might very well be an efficient implementation
mechanism.

Comment 2 Jeff Johnson 2006-03-18 13:44:15 UTC
The idea is sound, and rpm could pretty easily add a build root policy check like
the attached script if desired.

However, the choice to eliminate unused shared libraries is way outside the scope of rpm
even though a rpmbuild build root policy script might very well be an efficient implementation
mechanism.

Comment 3 Jeff Johnson 2006-03-18 13:46:49 UTC
Created attachment 126302 [details]
script to run ldd -u -r against executables and libraries

Try
    find /bin | ldd-unused.sh