[Clamav-devel] Compiling a portable version of ClamAV

Micah Snyder (micasnyd) micasnyd at cisco.com
Tue Oct 16 17:09:05 EDT 2018

Hi Brady,

You might try --enable-static --disable-shared

Legal disclaimer: I will note that libmspack should be dynamically linked, however, due to the LGPL license.

Also note that libclamunraris dynamically linked with libclamunrar_iface, but libclamunrar_iface isn't linked at all with libclamav and is instead dynamically loaded.  I'm not certain if that chain will still work when using the above configure flags.

Micah Snyder
ClamAV Development
Cisco Systems, Inc.

On Oct 16, 2018, at 4:17 PM, Brady Tello <bctello8 at gmail.com<mailto:bctello8 at gmail.com>> wrote:


I'm trying to compile ClamAV on a CentOS 7 machine and then transfer the
compiled executables to another CentOS 7 machine under a directory that has
a non-deterministic name.  My current best guess as to how to accomplish
this is to statically compile ClamAV so that it doesn't have to load any
libraries at runtime.

I tried to compile using `configure --enable-static` but I have a feeling
that doesn't do what I think it does because the output of `ldd clamd`
indicates that clamd is a dynamically linked ELF.  And indeed when I try to
run clamd on my target machine it complains about not being able to find
libclamav.so.7.  Does anyone have any idea as to why this isn't working or
what I can do to compile clamd statically?

Brady Tello
clamav-devel mailing list
clamav-devel at lists.clamav.net<mailto:clamav-devel at lists.clamav.net>

Please submit your patches to our Bugzilla: http://bugzilla.clamav.net

Help us build a comprehensive ClamAV guide:


More information about the clamav-devel mailing list