From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (WinNT; U) Description of problem: When compiling rpm 4.0.2 from source I really get _two_ errors. The first is that, even though the ./configure step determines that I only have db1 installed on my system, the lib/dbconfig.c module does a hard-coded #include <db3/db.h>, which of course is not found. If I update that to be #include <db1/db.h>, things go fine until I get to the point where this is seen: /bin/sh ../libtool --mode=link gcc -g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o dump dump.o ../build/librpmbuild.la ../lib/librpm.la ../rpmio/librpmio.la ../popt/libpopt.lamkdir .libs gcc -g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o .libs/dump dump.o ../build/.libs/librpmbuild.so ../lib/.libs/librpm.so -ldb1 ../rpmio/.libs/librpmio.so -L/usr/local/lib -lz -lbz2 ../popt/.libs/libpopt.so ../lib/.libs/librpm.so: undefined reference to `db3Free' ../lib/.libs/librpm.so: undefined reference to `db3New' collect2: ld returned 1 exit status make[2]: *** [dump] Error 1 make[2]: Leaving directory `/tmp/rpm-4.0.2/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/rpm-4.0.2' make: *** [all-recursive-am] Error 2 How reproducible: Always Steps to Reproduce: 1. Untar the sources 2. Apply the ferror.patch, s390.patch, and rpm-deb.patch 3. ./configure 4. make This produces the first problem of db3/db.h not being found. 5. edit lib/dbconfig.c to replace db3/db.h with db1/db.h 6. make This eventually gets to the undefined references for db3New and db3Free. Actual Results: /bin/sh ../libtool --mode=link gcc -g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o dump dump.o ../build/librpmbuild.la ../lib/librpm.la ../rpmio/librpmio.la ../popt/libpopt.lamkdir .libs gcc -g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o .libs/dump dump.o ../build/.libs/librpmbuild.so ../lib/.libs/librpm.so -ldb1 ../rpmio/.libs/librpmio.so -L/usr/local/lib -lz -lbz2 ../popt/.libs/libpopt.so ../lib/.libs/librpm.so: undefined reference to `db3Free' ../lib/.libs/librpm.so: undefined reference to `db3New' collect2: ld returned 1 exit status make[2]: *** [dump] Error 1 make[2]: Leaving directory `/tmp/rpm-4.0.2/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/rpm-4.0.2' make: *** [all-recursive-am] Error 2 Expected Results: A clean compile and link. Additional info:
You can't successfully compile rpm-4.0 without db3 installed, and installed as in the Red Hat spec file, with include file in /usr/include/db3 etc. The choice of db3 (and db1 in rpm-4.0.2) is not optional. Meanwhile, db1 has already been eliminated and db-3.2.9 has been added to the rpm source tree in rpm-4.0.3-0.18 (still under development).
Then the ./configure script should be updated to actually _fail_ if it can't find db3, instead of continuing as it does now. Actually, it should also be updated to not even look for db1.