Bug 39524 - Compilation of rpm 4.0.2 gets undefined reference to `db3Free' to 'db3New'
Compilation of rpm 4.0.2 gets undefined reference to `db3Free' to 'db3New'
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-07 21:55 EDT by Mark Post
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-07 21:55:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Post 2001-05-07 21:55:07 EDT
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 08:07:38 EDT
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 09:22:05 EDT
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.