ClamAV configure error: Cannot find lmilter [SOLVED]
Good evening all,
There hasn't been a posting on the Web for this one in a long while, but here goes a shot... See "Thirdly" for the fix for the title problem.
When installing a ClamAV on a machine that Sendmail was already installed on, a few issues cropped up. First was that sendmail was not building libmilter. This was solved by adding the following lines to sendmail's initial configuration and recompiling (I'm not the best with building sendmail, so the line might not be the best or most appropriate for you - most important lines were the ones involving milter and -DMILTER).
devtools/Site/site.config.m4
APPENDDEF(`confENVDEF',`-DSTARTTLS -DSASL -DLDAPMAP -DMILTER -DSOCKETMAP -DSASL=2 -D_FFR_SMTP_SSL')
APPENDDEF(`confLIBS', `-lssl -lcrypto -lsasl2 -lldap -llber -ldb -L/usr/lib')
APPENDDEF(`confINCDIRS', `-I/usr/include/sasl')
APPENDDEF(`confMAPDEF',`-DMAP_REGEX -DNEWDB')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE')
APPENDDEF(`conf_libmilter_ENVDEF',`-DSM_CONF_POLL')dnl
APPENDDEF(`conf_sendmail_ENVDEF', `-DPIPELINING=0')
define(`confCCOPTS_SO', `-fPIC')
define(`confCCOPTS', `-fPIC')
Second, copy all the header files from source_directory/include/{sendmail, libsm, libmilter} to respective /usr/include/ directories, and symlink /usr/include/sendmail.h to /usr/include/sendmail/sendmail.h (there is a weird circular reference in one of the header files that expects to see both sendmail and sendmail/sendmail.h ... they look like they should be the same file and a little test program compiles correctly when the includes are like so).
Thirdly, and this was the important part, when trying to configure ClamAV with the configure line:
./configure --prefix=/usr -enable-milter -with-user=clamav -with-group=clamav
always ended with the error:
configure: error: Cannot find libmilter
After much digging, the error appeared that the compiler could not successfully compile a test program that let libmilter be detected. However, if line 19356 of the configure file
char mi_stop ();
is changed to
char mi_stop () {};
then everything sails smoothly along.
Like I said, I haven't seen this be a problem in a long time, and perhaps I am the only one that it is affecting, but hopefully someone in the future will get some use out of it.
DJ
Last edited by Tinkster; 01-21-2015 at 08:03 PM.
Reason: Removed acci-duped part
|