Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 82418 - Cannot Statically Link Against librpm
Summary: Cannot Statically Link Against librpm
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: athlon
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-21 23:25 UTC by Adam H. Pendleton
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-22 10:18:21 UTC

Attachments (Terms of Use)

Description Adam H. Pendleton 2003-01-21 23:25:28 UTC
Description of problem:
When using libtool and automake to link the RPM 4.1 libraries, full static
linkage is not possible.

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:

In use:

program_LDADD = -lrpm
program_LDFLAGS = -all-static

Compiling this program produces the following error:

/usr/bin/ld: cannot find -lrpmdb-4.1
collect2: ld returned 1 exit status

This occurs because there is indeed no static version of librpmdb-4.1.  There is
a shared version, but not static version.  Since /usr/lib/ depends on
librpmdb-4.1, there should be static versions of these libraries.

Actual results:

No linkage statically against rpm.

Expected results:

Static link to rpm libraries.

Additional info:

It should be possible to statically link against librpm.

Comment 1 Jeff Johnson 2003-01-22 10:18:21 UTC
Use -lrpmdb, not -lrpmdb-4.1.

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