Bug 32437 - rpm 4.0.2 odd build problems in tools directory
rpm 4.0.2 odd build problems in tools directory
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-20 16:44 EST by Red Hat Bugzilla
Modified: 2008-03-13 15:18 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-21 08:57:26 EST
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 Red Hat Bugzilla 2001-03-20 16:44:44 EST
When building rpm 4.0.2 on our sparc-sun-solaris2.8 build machine, when
it gets to the tools directory, and the `dump' executable, I see the
following:

/bin/sh ../libtool --mode=link cc  -g  -o dump  dump.o
../build/librpmbuild.la ../lib/librpm.la         ../rpmio/librpmio.la   
../popt/libpopt.la       -L/usr/ucblib -R/usr/ucblib  -lnsl -lsocket -lz
-lbz2
cc -g -o dump dump.o ../build/.libs/librpmbuild.a ../lib/.libs/librpm.a
-ldb -lpthread ../rpmio/.libs/librpmio.a -L/usr/ucblib -lnsl -lsocket -lz
-lbz2 ../popt/.libs/libpopt.a -L/local/BerkeleyDB/lib -L/local/lib
-L/usr/ucblib -lnsl -lsocket -lz -lbz2 -R/usr/ucblib -R/usr/ucblib
ild: (argument error) can't find library argument :: -ldb
make: *** [dump] Error 8


The problem is that the LDFLAGS, which contains `-L/local/BerkeleyDB/lib',
doesn't precede the `-ldb -lpthread' on the line.

That should in theory be easy to fix, but after looking at tools/Makefile
for a while, I'm really puzzled.  Nowhere in the Makefile is
'-L/local/BerkeleyDB/lib'
even mentioned.

Also, I see a section like this:

libdb1 = 
libdb2 = 
libdb3 = -ldb -lpthread

But `libdb3' and `-ldb' aren't mentioned anywhere else in the Makefile, so
I don't see how that's making it onto the link line shown above.

I also notice that `LIBS' is being substituted into all the other Makefiles
in every subdirectory, but it's not being substituted into tools/Makefile.

At this point, I'm at a loss to explain how the tools/Makefile is working
at
all.
Comment 1 Red Hat Bugzilla 2001-03-20 17:01:04 EST
After looking some more, I see the the

	-L/local/BerkeleyDB/lib

is coming because of what's recorded in libpopt.la, which is being linked in.

the problem is that it's too far down the link line to do any good for the
problem at hand.

Is there a reason why both LDFLAGS and LIBS are purposely not substituted into
tools/Makefile?
Comment 2 Red Hat Bugzilla 2001-03-20 17:48:53 EST
this is not a wolverine / Red Hat Linux problem.
Comment 3 Red Hat Bugzilla 2001-07-25 17:07:18 EDT
AFAIK, using an internal version of Berkeley DB should "fix" this problem.
Otherwise, please reopen this bug.

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