Fajar A. Nugraha wrote:

Kevin Spicer wrote:

Have you tried just building a statically linked binary on a more recent
distro and seeing if it works on yours?


BTW, how do you do that? using CFLAGS=-static doesn't seem to work.

Replying my own post,
CFLAGS=-static ./configure && make && make install does NOT produce static clamav binary.
I was able to make one, however, by going to clamav build directory and executing comands in the attachment.


Now I have static clamav binary for linux, built on Fedora Core 1, kernel 2.6.4.
Despite some warnings during compiling, it runs OK on Redhat 6.2 without any warnings.
It should run on any linux i386 distro.


Clamav-milter binary is also included in linux shared and static builds.

Regards,

Fajar

--
Please avoid sending me Microsoft Office attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
cd sigtool &&
gcc  -static -g -O2   -o sigtool-static  options.o sigtool.o ../clamscan/getopt.o 
../clamscan/others.o -L../libclamav -lclamav -lgmp -lz -lpthread &&
strip sigtool-static && cp -f sigtool-static /usr/local/bin &&
cd ../freshclam/ &&
gcc  -static -g -O2   -o freshclam-static  freshclam.o options.o manager.o notify.o 
../clamscan/getopt.o ../clamscan/others.o ../clamd/cfgfile.o -L../libclamav -lclamav 
-lgmp -lz -lpthread &&
strip freshclam-static && cp -f freshclam-static /usr/local/bin &&
cd ../clamdscan/ &&
gcc  -static -g -O2   -o clamdscan-static  clamdscan.o client.o ../clamscan/getopt.o 
../clamscan/options.o ../clamscan/others.o ../clamd/cfgfile.o -L../libclamav -lclamav 
-lgmp -lz -lpthread &&
strip clamdscan-static && cp -f clamdscan-static /usr/local/bin &&
cd ../clamd/ &&
gcc  -static -g -O2   -o clamd-static  options.o cfgfile.o clamd.o tcpserver.o 
localserver.o session.o thrmgr.o server-th.o scanner.o others.o clamuko.o 
dazukoio_compat12.o dazukoio.o tests.o ../clamscan/getopt.o -L../libclamav -lclamav 
-lpthread -lgmp -lz -lbz2 &&
strip clamd-static && cp -f clamd-static /usr/local/sbin &&
cd ../clamscan/ &&
gcc  -static -g -O2   -o clamscan-static  clamscan.o options.o getopt.o others.o 
manager.o treewalk.o  -L../libclamav -lclamav -lz -lpthread -lbz2 -lgmp
strip clamscan-static && cp -f clamscan-static /usr/local/bin &&
cd ../clamav-milter &&
gcc  -static -g -O2   -o clamav-milter-static  clamav-milter.o ../clamd/cfgfile.o 
../clamd/others.o ../clamscan/getopt.o -L../libclamav -lclamav -L/usr/lib/libmilter 
-lmilter  -lwrap -lpthread -lnsl &&
strip clamav-milter-static && cp -f clamav-milter-static /usr/local/sbin

Reply via email to