LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ClamAV configure error: Cannot find lmilter [SOLVED] (https://www.linuxquestions.org/questions/linux-software-2/clamav-configure-error-cannot-find-lmilter-%5Bsolved%5D-4175531468/)

dtex23 01-19-2015 12:02 AM

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

unSpawn 01-21-2015 08:03 PM

Thanks for posting. Are these steps specifically for a distro? Like LFS for example?

dtex23 01-26-2015 06:22 PM

Sorry, I should have noted that too...

This problem was affecting a Hardened Linux from Scratch build (HLFS), the latest SVN as of this date: SVN-20110904.

These problems came up during the BLFS phase of really getting software on the machine. I am using the More Control and Package Users management scheme (it really does work well for making sure that one package does not step on the toes of another, but it's a royal pain in the ass as you build the system).

Sendmail 8.14.9 for libmilter
ClamAV 0-98.5 for the virus scanner


All times are GMT -5. The time now is 08:34 AM.