Glad to do it. It's the least I can do–thanks so much for making this available–next week I'll be recommending we implement this in production.
If anyone wants to compile this themselves–here's what I did on my box–a Linux RedHat 3.0 RHEL ES System, running Domino 6.5.1.
cat/proc/version
Linux version 2.4.21-9.0.1.EL (bhcompile@bugs.devel.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-26)) #1 Mon Feb 9 22:44:14 EST 2004
gcc -v
Reading specs from/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –enable-shared –enable-threads=posix –disable-checking –with-system-zlib –enable-__cxa_atexit –host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
**
Changes made for the kSpam_v1.39b2_SRC.zip files to compile (and return probabilities > 0.5 to comblist.txt):
- bload/WordList.c (fix of the min function–it was returning max!
27c27
< #define min( x, y) ( (x) > (y) ? (x) : (y) )
—
> #define min( x, y) ( (x) > (y) ? (y) : (x) )
- bload/btree.c (missing a semicolon)
120c120
< free(node_list[i])
—
> free(node_list[i]);
- bload/linux.mak (copied linux.mak to Makefile before running make–no changes to extmgr/linux.mak, other than copying it to Makefile).
45c45
< LIBS = -lnotes -lm -lnsl -lc -ldl -lpthread -lresolv
—
> LIBS = -lnotes -lm -lnsl -lc -ldl -lpthread -lresolv -lndgts
53a54,56
>
> clean :
> rm -f BayesianAddin.o btree.o Kerrors.o LoadProbabilities.o log.o SaveProbabilities.o WordList.o
- Setup these environment variables (I put mine in root's ~/.bash_profile). These are from the Domino Notes API user guide:
lotus capi setup
export LOTUS=/opt/lotus
export NOTES_DATA_DIR=/home/notes/data
export Notes_ExecDirectory=/opt/lotus/notes/latest/linux
export PATH="$NOTES_DATA_DIR:$PATH"
- Change the permissions/owner of the binaries after they are compiled:
as root:
cd/opt/lotus/notes/latest/linux
chmod 555 kspam
chown root.daemon kspam
So they would should look like:
-r-xr-xr-x 1 root daemon 56704 Mar 13 07:40 kspam
-r-xr-xr-x 1 root daemon 61428 Mar 13 07:34 libkspam.so
…jack