I'm trying to compile dbmail 1.2.1 under Mac OS X 10.2.8
I run through the build.sh script and get these errors:
> This is the dbmail build script
> I will have to ask you some questions about your system
>
> What database do you wish to use? Choices are (m)ysql and (p)ostgresql >
> m
> You have selected MySQL as database
> The library directory for MySQL is now [/usr/local/lib/mysql/].
> Enter new directory or press RETURN to keep this setting:
> /usr/local/mysql/lib
> The include directory for MySQL is now [/usr/include/mysql/].
> Enter new directory or press RETURN to keep this setting:
> /usr/local/mysql/include
> The libraries are currently set to [-lmysqlclient -lcrypto].
> Enter new libraries (preceed each by -l) or press RETURN to keep this setting:
>
> ./build.sh: [-f: command not found
> ./build.sh: [-f: command not found
>
> Creating makefile..
>
> Done. You can now make dbmail by running 'make clean all'.
> Do you want this to be executed right now?
> n
which I fixed by putting a space in front of the -f for the second test for
each include file:
if [ -f /usr/include/endian.h ] || [ -f "${incdir}/endian.h" ]; then
&&
if [ -f /usr/include/crypt.h ] || [ -f "${incdir}/crypt.h" ]; then
then I tried to compile:
[macserve22:/usr/build/dbmail-1.2.1] root# make clean all
rm -f *.o core mysql/*.o
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o list.o list.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o debug.o debug.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o pipe.o pipe.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o mime.o mime.c
cc -o mysql/dbmysql.o -c mysql/dbmysql.c -L/usr/local/mysql/lib
-I/usr/local/mysql/include -I.
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o dbmd5.o dbmd5.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o md5.o md5.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o bounce.o bounce.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o forward.o forward.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o memblock.o memblock.c
cc -o mysql/dbauthmysql.o -c mysql/dbauthmysql.c -L/usr/local/mysql/lib
-I/usr/local/mysql/include -I.
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o config.o config.c
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE -c -o misc.o misc.c
misc.c: In function `itoa':
misc.c:50: warning: implicit declaration of function `malloc'
cc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE main.c -o dbmail-smtp list.o
debug.o pipe.o mime.o mysql/dbmysql.o dbmd5.o md5.o bounce.o forward.o
memblock.o mysql/dbauthmysql.o config.o misc.o -L/usr/local/mysql/lib
-I/usr/local/mysql/include -I. -lmysqlclient -lcrypto
ld: Undefined symbols:
_compress
_uncompress
make: *** [smtp] Error 1
I corrected the first problem in misc.c by added this line:
#include <stdlib.h>
and the second error, I added -lz to the lib compile options.
Thanks
Brian