Randall Perry wrote: > Having trouble building with clamav-milter. > > Initially I did just: > ./configure --enable-milter --prefix=/opt/local > make > make install > > It installed fine. But running the startup script I noticed > clamav-milter wasn't installed. > > So, installed the libmilter libraries by going into sendmail libmilter > source: > ./Build all > ./Build install > > The header and lib files were installed in /usr. > > Went to build clamav again, but this time got the error: > configure: error: Cannot find libmilter > > Which is strange as it didn't complain the libmilter library was missing > when it was, but is now complaining it's missing when it isn't. > > Any ideas? > > > Answering my own question -- looks like clamav requires a dynamic libmilter lib. Thanks to Robert Delius Royar for instructions shown below, which worked for me:
If you want a dylib, try this. Build sendmail with -DMILTER in your site.m4 cd ./obj.Darwin.8.9.0.PowerMacintosh/libmilter make clean make rm *.o Now, copy one of the cc commands It looks like this on my system cc -pipe -Os -g -pipe -mcpu=970 -mtune=970 -mpim-altivec \ -mpowerpc-gpopt -I. -I../../sendmail -I../../include \ -I/opt/local/include -DDARWIN=80000 -DBIND_8_COMPAT -DNETINET6 \ -DNOT_SENDMAIL -Dsm_snprintf=snprintf -w -DXP_MT -c -o main.o \ main.c Modify it like so gcc -fno-common -pipe -Os -g -pipe -mcpu=970 -mtune=970 -mpim-altivec \ -mpowerpc-gpopt -I. -I../../sendmail -I../../include \ -I/opt/local/include -DDARWIN=80000 -DBIND_8_COMPAT -DNETINET6 \ -DNOT_SENDMAIL -Dsm_snprintf=snprintf -w -DXP_MT -c *.c Note that I just used the wildcard to compile all the source files at once. You can remove the '-pipe -Os -g -pipe -mcpu=970 -mtune=970 -mpim-altivec -mpowerpc-gpopt', but you need the -fno-common. see http://finkproject.org/doc/porting/porting.en.html#shared.build-lib You should see no output, but the object files should be made. Now issue a command such as gcc -dynamiclib -install_name /usr/lib/libmilter.dylib \ -compatibility_version 8.7 -current_version 8.7.9 -o libmilter.dylib \ main.o engine.o listener.o handler.o comm.o smfi.o signal.o \ sm_gethost.o errstring.o strl.o Note that if you are making sendmail 14.x there are two additional object files you will need (worker.o and monitor.o). Also the version will be '-compatibility_version 8.8 and -current_version 8.8.1'. I just tried this and copied the libmilter.dylib to /usr/lib. When I ran make in clamav-90.3/clamav-milter, I got the following warnings: /usr/bin/ld: warning -L: directory name (/lib) does not exist /usr/bin/ld: warning multiple definitions of symbol _allow_severity clamav-milter.o definition of _allow_severity in section (__DATA,__data) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libwrap.dylib(tcpd.o) definition of _allow_severity /usr/bin/ld: warning multiple definitions of symbol _main clamav-milter.o definition of _main in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libwrap.dylib(tcpd.o) definition of _main /usr/bin/ld: warning multiple definitions of symbol _deny_severity clamav-milter.o definition of _deny_severity in section (__DATA,__data) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libwrap.dylib(tcpd.o) definition of _deny_severity creating clamav-milter Then, otool -L .libs/clamav-milter /usr/local/lib/libclamav.2.dylib (compatibility version 3.0.0, current version 3.3.0) /opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /opt/local/lib/libgmp.3.dylib (compatibility version 8.0.0, current version 8.1.0) /opt/local/lib/libcurl.4.dylib (compatibility version 5.0.0, current version 5.0.0) /opt/local/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /opt/local/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libmilter.dylib (compatibility version 8.7.0, current version 8.7.9) /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 369.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.4.1) /usr/lib/libwrap.7.dylib (compatibility version 7.0.0, current version 7.6.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) -- Randall Perry sysTame Xserve Web Hosting/Co-location/Leasing QuickTime Streaming Mac Consulting/Sales http://www.systame.com/ _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://lurker.clamav.net/list/clamav-users.html