db error from bogofilter and bogoutil

David Relson relson at osagesoftware.com
Wed Oct 30 02:53:34 CET 2002


At 08:41 PM 10/29/02, Gyepi SAM wrote:
>On Tue, Oct 29, 2002 at 03:23:09PM -0800, Dan Stromberg wrote:
> > I'm getting:
> > bogofilter (db) open: /Dcs/staff/strombrg/.bogofilter/goodlist.db: Invalid
> > argument
>
> > Does anyone have a suggestion?
>
>Yes. The docs for db 4.1 suggested opening the databases in autocommit mode,
>but that conflicts with other flags. Try the attached patch, which is also 
>in cvs.

That gets bogoutil working, but bogofilter gets a link error from 
lexer.o.  Below is some output showing bogoutil successfully building and 
running with db-4.1 and also showing that bogofilter doesn't link (due to 
an undefined reference to 'rpl_malloc').


*** show the newly build db-4.1 libraries ***

[relson at osage tst]$ ls -l /usr/lib/libdb-4.1.*
-rw-r--r--    1 relson   relson     890474 Oct 29 20:34 /usr/lib/libdb-4.1.a
-rw-r--r--    1 relson   relson        724 Oct 29 20:29 /usr/lib/libdb-4.1.la
-rwxr-xr-x    1 relson   relson     715899 Oct 29 20:29 /usr/lib/libdb-4.1.so*

*** show that bogoutil can be loaded with db-4.1 ***

[relson at osage tst]$ ldd bogoutil
         libm.so.6 => /lib/i686/libm.so.6 (0x4001d000)
         libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40040000)
         libc.so.6 => /lib/i686/libc.so.6 (0x400e1000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40201000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

*** show that bogoutil runs ***

[relson at osage tst]$ echo .MSG_COUNT | bogoutil -w /var/lib/bogofilter
                        spam   good
.MSG_COUNT             3588  27558

*** show that bogofilter cannot be linked with db-4.1 ***

[relson at osage tst]$ make bogofilter
gcc  -g -O2  -L/usr/local/BerkeleyDB.4.1/lib  -o bogofilter  bogofilter.o 
main.o lexer.o datastore_db.o rstats.o wordhash.o wordlists.o xmalloc.o 
xstrdup.o debug.o  -lm  -ldb-4.1
lexer.o: In function `yy_flex_alloc':
/home/relson/filter/tst/lexer.c:5144: undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make: *** [bogofilter] Error 1





More information about the Bogofilter mailing list