Compile problem - libdb

Henri van Riel bogo at vanriel.xs4all.nl
Sun Jan 18 21:05:25 CET 2004


> Welcome Henri,

Thanks!

> I believe your environment is inadequate.  Bogofilter was initially
> developed and tested for db3.  It has since been expanded to work with
> db4, tdb, and qdbm.  AFAIK, it won't work with db1.

> I believe that you have three choices:  1 - install a newer database; 2
> - modify the code so it works with db1; 3 - build static executables on
> a system with a usable database.

> Choice 1 & 3 are probably the easiest to do.  If you do take on #2, the
> file to look at is datastore_db.c.  With luck, that's the only file that
> needs changing.

I tried the #1 option and I got the tdb tarball (1.0.6) and build the
library. I changed the configure options for Bogofilter into:

  --with-database=tdb --with-libtdb-prefix=/usr/local

Configure ends without a problem and the Makefile is generated.
However, make returns an error (sorry... long):

datastore_tdb.c: In function `db_get_dbvalue':
datastore_tdb.c:184: warning: function call has aggregate value
datastore_tdb.c: At top level:
datastore_tdb.c:266: parse error before `__attribute__'
datastore_tdb.c:277: parse error before `__attribute__'
datastore_tdb.c:282: `userdata' undeclared here (not in a function)
datastore_tdb.c:287: parse error before `.'
datastore_tdb.c:289: parse error before `.'
datastore_tdb.c:289: warning: function declaration isn't a prototype
datastore_tdb.c:289: warning: data definition has no type or storage class
datastore_tdb.c:290: parse error before `char'
datastore_tdb.c:296: initializer element is not constant
datastore_tdb.c:296: warning: data definition has no type or storage class
datastore_tdb.c:298: parse error before `.'
datastore_tdb.c:298: warning: function declaration isn't a prototype
datastore_tdb.c:298: conflicting types for `xfree'
xmalloc.h:23: previous declaration of `xfree'
datastore_tdb.c:298: warning: data definition has no type or storage class
datastore_tdb.c: In function `db_foreach':
datastore_tdb.c:311: warning: declaration of `hookdata' shadows global declaration
datastore_tdb.c:316: `tdb_traversor' undeclared (first use this function)
datastore_tdb.c:316: (Each undeclared identifier is reported only once
datastore_tdb.c:316: for each function it appears in.)
make[3]: *** [datastore_tdb.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

You might say I have no clue whatsoever as to what causes this
problem. I think maybe my compiler is a bit too old for this... :(

But maybe somebody here has a different idea. If so, I'll be glad to
hear it.

-- 
Henri.






More information about the Bogofilter mailing list