RPM

Comment 1 for bug 936610

Revision history for this message
Jeff Johnson (n3npq) wrote :

The error message is this

libtool: relink: gcc -shared -fPIC -DPIC .libs/libsql.o -Wl,-rpath -Wl,/X/src/wdj54/rpm-5.4.5/_inst/lib -L/X/src/wdj54/rpm-5.4.5/_build/rpmdb/.libs -L/X/src/wdj54/rpm-5.4.5/_build/rpmio/.libs -L/X/src/wdj54/rpm-5.4.5/_build/misc/.libs -L/X/src/wdj54/rpm-5.4.5/_inst/lib -lrpm -L/usr/lib -lrpmdb -lrpmio -lrpmmisc -lm -lpcreposix -ldb_sql-5.3 -ldb-5.3 -lmagic -lbeecrypt -lgomp -ldl -lstdc++ -llzma -lbz2 -lpthread -lrt -lpopt -lz -lpcre -fopenmp -O2 -fopenmp -pthread -Wl,-soname -Wl,libsql.so.0 -o .libs/libsql.so.0.0.0
/usr/bin/ld: cannot find -lrpm
collect2: ld returned 1 exit status
libtool: install: error: relink `libsql.la' with the above command before installing it

The root cause is that libsql.a (a DSO to load a sqlite3 "virtual table" so that
SQL instead of headerGet(...) can be used to retrieve metadata) forces
a dependency on -lrpm which is in the same directory.

 The current AutoFu
    ...
    pkglibdir = @USRLIBRPM@
    pkglib_LTLIBRARIES = libsql.la
    ...
    libsql_la_SOURCES = libsql.c
    libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON)

isn't tracking the "librpm.la" build prerequisite correctly for the stricter (than just typing
"make") environment of
    make distcheck

Commenting out libsql.la SHOULD be enough to resurrect a functional "make distcheck".

Verifying ... yes "progress" goes further with another failure:

make[1]: Entering directory `/home/X/src/wdj54/rpm-5.4.5/_build'
ERROR: files left after uninstall:
./var/lib/rpm/DB_CONFIG
make[1]: *** [distuninstallcheck] Error 1
make[1]: Leaving directory `/home/X/src/wdj54/rpm-5.4.5/_build'
make: *** [distcheck] Error 1

(which can be lived with for rpm-5.4.6 but also needs fixing).