Bug 5880

Summary: RPM 3.0.2-5.x incorrectly identifies required libraries
Product: [Retired] Red Hat Linux Reporter: heath
Component: pam_ldapAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-13 22:40:07 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:

Description heath 1999-10-12 15:41:14 UTC
When building a new RPM (via rpm -bb), everything builds
correctly, but rpm incorrectly identifies a "library" as
being required.  The package in question is pam-ldap.  There
is a linker directive (-fPIC) that is being picked up by RPM
as being a required library.  This means that the resultant
rpm complains about a missing dependency when the dependency
shouldn't be there in the first place.

Comment 1 Jeff Johnson 1999-10-12 17:31:59 UTC
Can you send a pointer to the package and/or supply the spec file?
Thanks ...

Comment 2 heath 1999-10-12 20:24:59 UTC
The package was pam_ldap-38-mz1.src.rpm.  In this package, there is a
patch for Makefile.linux that makes the following change:

-LD_FLAGS = -x --shared -rpath $(LDAP_LIB_DIR) -lcrypt -lnsl -lpam
-lnsl -lpthread -lresolv
+LD_FLAGS = -x -shared -rpath $(LDAP_LIB_DIR) -fPIC -lcrypt -lnsl
-lpam -lnsl -lpthread -lresolv

When doing an rpm -bb <specfile>, the following are noted near the
end:

Finding provides...
Finding requires...
Provides: pam_ldap.so
Requires: PIC ld-linux.so.2 libc.so.6 libcrypt.so.1 libnsl.so.1
libpam.so.0 libpthread.so.0 libresolv.so.2
Wrote: /usr/src/redhat/RPMS/i386/pam_ldap-38-mz1.i386.rpm

Since PIC isn't a package or file, it's causes failed dependencies
when you try to install the package.  --nodeps works around it, but I
hate to --nodeps any installation unless I'm 100% sure that I have
what it's looking for.

heath

Comment 3 Jeff Johnson 1999-12-15 18:04:59 UTC
I don't think this is an rpm problem, but rather a mis-linking in the pam_ldap
package (or possibly in egcs command line argument processing). Rpm simply
runs objdump on libraries and massages the output to auto-generate requirements.

Comment 4 Preston Brown 2000-01-13 22:40:59 UTC
the latest nss_ldap/pam_ldap I have built here do not have any problem with the
-fPIC flag.