Bug 147564 - missing Requires in rpm-devel
missing Requires in rpm-devel
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-02-09 06:54 EST by Joe Orton
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-10 06:43:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Orton 2005-02-09 06:54:27 EST
/usr/lib/librpm.la contains:

dependency_libs=' -L/usr/src/build/515221-i386/install/usr/lib
-L/usr/lib /usr/lib/librpmdb.la
-L/usr/src/build/515221-i386/BUILD/rpm-4.4.1/zlib -L/usr/local/lib
-L/usr/kerberos/lib /usr/lib/libsqlite3.la -lelf /usr/lib/librpmio.la
/usr/lib/libbeecrypt.la -lm /usr/lib/libneon.la -lssl -lcrypto -ldl
-lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv
/usr/lib/libexpat.la -lrt -lpthread -lbz2 /usr/lib/libpopt.la -lselinux'

and must therefore "Require: neon-devel, sqlite3-devel, beecrypt-devel"
(etc?) for presence of those .la files, otherwise libtool fails when
linking against librpm.la.
Comment 1 Joe Orton 2005-02-09 06:56:01 EST
those -L's are all pretty dodgy too FWIW, not an rpm-specific issue of
Comment 2 Jeff Johnson 2005-02-09 08:46:34 EST
The dependencies are tracked through BuildRequires: already.
Without explicit convention (or definite fault) it is unclear whether
the Requires: in rpm-devel are needed as well as the BuildRequires:.

-L paths are dodgy yes, but needed (at least the very
first one) to insure that libtool links against the
newly built libraries. 

*** This bug has been marked as a duplicate of 116891 ***
Comment 3 Joe Orton 2005-02-09 08:55:19 EST
BuildRequires are not sufficient:

Linking against librpm using libtool fails if sqlite3-devel is not
installed.   libtool attempts to resolve the dependencies listed and
fails if any listed .la files are missing.

This is an easily observable fact which I just observed in the FC4
buildroot when attempting to rebuild PHP.

ergo, rpm-devel needs to Require: sqlite3-devel et al.

grep: /usr/lib/libsqlite3.la: No such file or directory
/bin/sed: can't read /usr/lib/libsqlite3.la: No such file or directory
libtool: link: `/usr/lib/libsqlite3.la' is not a valid libtool archive
make: *** [ext/snmp/snmp.la] Error 1
Comment 4 Jeff Johnson 2005-02-09 09:42:27 EST
Sufficient is in the eye of the beholder. Yes better could
be done.

PHP needs rpm? Whatever for? 
Comment 5 Joe Orton 2005-02-09 10:02:09 EST
There's nothing subjective about the fact that the missing Requires:
broke the PHP build.  PHP needs net-snmp needs librpm.
Comment 6 Jeff Johnson 2005-02-09 10:05:45 EST
I resist adding dependencies needlessly, not to be difficult.

Yes, BuildRequires: as currently used are inadequate to
tack the problem you are describing.

If we are going to track -devel dependencies better,
then better automation, not more manual cruft, is needed.

For example, dependencies on package name, rather than on
soname or file path, are implicit and subjective rather
than explicit and automagically mechanically extracted.

An PHP depending on rpmlib terrifies me. Why exactly
is PHP depending on rpmlib.
Comment 7 Jeff Johnson 2005-02-09 10:09:50 EST
Ah, got it. The better fix is to nuke the net-snmp
dependency on rpmlib (which is a hack I did in 1998,
all that is really needed is rpm -qa spew for the mib)

I'll add the dependencies to rpm-devel, but I strongly believe
the mannaer in which build dependencies are currently done
is bogus. But that's not your problem, it's mine.
Comment 8 Jeff Johnson 2005-02-10 06:43:24 EST
Fixed in rpm-4.4.1-0.20. Sorry for the hassle.

Note You need to log in before you can comment on or make changes to this bug.