db4 link problem [was: Bogofilter-0.15.9 ...]

David Relson relson at osagesoftware.com
Sun Nov 23 23:42:49 CET 2003


On Sun, 23 Nov 2003 14:26:01 -0800
Chris Wilkes <cwilkes-bf at ladro.com> wrote:

> On Sun, Nov 23, 2003 at 05:14:06PM -0500, David Relson wrote:
> > On Sun, 23 Nov 2003 14:02:01 -0800
> > >  Chris Wilkes <cwilkes-bf at ladro.com> wrote:
> > 
> > > For some reason the src rpm doesn't build correctly, I get the
> > > following error:
> > >   /usr/bin/ld: cannot find -ldb
> > >   collect2: ld returned 1 exit status
> > > However the source compiles correctly, with configure using
> > > DB_LIB=-ldb, and apparently it can find my db4 (4.1.25-3) files.
> > > 
> > > I don't believe I had to do anything with 0.15.7-1 to get the
> > > source rpm to compile correctly.
> > 
> > Exactly what are the commands you're using for the build?  What OS? 
> > What's the path for db4?
> 
> rpmbuild --rebuild bogofilter-0.15.9-1.src.rpm
> 
> # uname -a
> Linux box06 2.4.20-8 #1 Thu Mar 13 17:18:24 EST 2003 i686 athlon i386
> GNU/Linux
> 
> That's RedHat 9.0
> 
> # rpm -qa | grep db4
> db4-utils-4.1.25-3
> db4-devel-4.1.25-3
> db4-java-4.1.25-3
> db4-debuginfo-4.1.25-3
> db4-4.1.25-3
> 
> Here's the rather lengthly result of looking for all my libdb's:
> 
> # locate libdb
...[snip]...
> /usr/lib/debug/lib/libdb-4.1.so.debug
...[snip]...
> /usr/lib/libdb-4.1.so
...[snip]...
> /lib/libdb-4.1.so

Chris,

Next time, try "locate | grep libdb-4".  It'll shorten the list :-)

My workstation is Mandrake 9.1.  I use db3-3 for releases and db4-1 for
development.  I don't know much about Redhat 9, so don't have a
definitive answer.

When I do a libdb4 build I use "configure
--with-libdb-prefix=/usr/local/BerkeleyDB.4.1"

What may help is to install the source rpm, then use "autogen
--with-libdb-prefix=/usr".

HTH,

David




More information about the Bogofilter mailing list