Bug 39524 - Compilation of rpm 4.0.2 gets undefined reference to `db3Free' to 'db3New'
Summary: Compilation of rpm 4.0.2 gets undefined reference to `db3Free' to 'db3New'
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-08 01:55 UTC by Mark Post
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-05-08 01:55:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark Post 2001-05-08 01:55:07 UTC
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:

Comment 1 Jeff Johnson 2001-05-08 12:07:38 UTC
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).

Comment 2 Mark Post 2001-05-08 13:22:05 UTC
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.


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