[bogofilter-announce] BSD and Solaris Support

Adrian Otto aotto at aotto.com
Thu Sep 12 00:28:01 CEST 2002


Okay,

I have bogofilter running on both Solaris and FreeBSD. I have not had time
to test them very much, so I'm not sure just how stable the code is. There
is some fiddling to get it to work, which is outlined in my notes below. Let
me know about any bugs you find. Note that the man page is not installed
using the portable version. I'll get to that at some point.

Getting Judy to work:

Douglas Baskins has written a more portable version of Judy that has a
"generic" Makefile option as well, which appears to work on Solaris and
FreeBSD:

> <www.sourcejudy.com/downloads/Judy_trial.0.0.2.src.tar.gz>
> (This one works on BSD, and I suspect an easy to port to Solaris)

I tried using the source referenced above on FreeBSD and Solaris 7, with
some hacking I got Judy to compile on both. The Makefile.multi indicates
that the configure script is supposed to make src/config.h, but it's not
doing that. The config.h file does not exist anywhere in the source tree.

Here are some notes about how to hack around the problems:

Solaris (must have binutils package installed, because only the GNU ld
works)
-------
$ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/ccs/bin:/usr/ucb ;
export PATH
$ cat configure | sed -e 's/awk/\/usr\/xpg4\/bin\/awk/' > configure.solaris
$ sh configure.solaris
$ touch src/config.h
$ make

There are a couple of problems with compiling Judy on Solaris. First of all,
the Solaris linker does not like the compile flags, but if you have GNU
binutils and GNU make installed, and put /usr/local/bin before /usr/ccs/bin
and /usr/ucb in your path, then it will work. Also, Solaris' awk does not
like the syntax in the Configure script, so use /usr/xpg4/bin/awk instead
for compatibility. Also, the config.h file was not created by the configure
script, but it must exist.

FreeBSD
-------
$ ./configure
$ touch src/config.h
$ make

The only problem with compiling on FreeBSD was that the configure script did
not create a config.h

Getting bogofilter to work:

If you don't already have a v3.0+ version of BerkeleyDB, download this:
http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz
unpack it, and do "./configure && make && make install" in the 'dist'
directory.

Download my "portable" (work in progress) version of bogofilter:
ftp://bogofilter.aotto.com/pub/bogofilter/bogofilter-0.7.2.tar.gz

Solaris
-------
Unpack it, and then do:
$ ./configure --with-db=/usr/local/BerkeleyDB-4.0
$ make && make install

You will either want to put symlinks to libdb.so and libJudy.so in /usr/lib,
or use a modified LD_LIBRARY_PATH environment variable before you start
bogofilter.

$
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/BerkeleyDB-4.0:/opt/Judy/
usr/lib

FreeBSD
-------
Unpack it, and do:
$
./configure --with-judy=/usr/src/Judy_trial.0.0.2/src/bsd_ia32/product/deliv
er/usr \
--with-db=/usr/local/BerkeleyDB.4.0
$ make && make install
$ ldconfig /usr/src/Judy_trial.0.0.2/src/bsd_ia32/product/deliver/usr/lib \
/usr/local/BerkeleyDB.4.0/lib

The 'ldconfig' command gives the runtime linker a way to find the new
libraries.

Enjoy,

Adrian








More information about the Bogofilter-announce mailing list