Building static binaries of clamav is relatively easy, thanks to autotools. There is one main caveat, though - curl does not trivially support static linking, at least on the systems I have tried it on. So the simplest method to make sure it works is:

  • ./configure --enable-static --disable-shared --without-curl
  • make LDFLAGS='-all-static'

Known Problems

  • Do not pass LDFLAGS to configure. -all-static is a libtool argument that gcc understandably does not understand.
  • Fixing the curl problem may be as trivial as building a static library version of dlopen, but I have not tried.
  • The resulting static binaries are not completely static - all routines from the NSS libraries are always dynamically linked

-- StephenGran - 09 Feb 2007

Topic revision: r2 - 2007-03-11 - 11:19:26 - TorokEdwin
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback