2006-08-10 13:01:16 UTC
(and probably versions before that).
After I would compile my clamav from source
(using the ./configure, make, make install)
and put into service a new version of clamd, I would log errors immediately
ERROR: pthread_create failed
and clamd would hose itself
My qmail system with qmail-scanner would barf.
Some threads in mailing lists have suggested, somewhat tersely, to raise
softlimits assuming that DJB's tcpserver were being used.
I'm using a RedHat-based system (not using the .RPM for clamd) and have
elected to use the initscripts version to launch clamd.
Irrespective of my configuration, I see a few folks still struggling
with the compiled clamd. On my system, 'cat /proc/cpuinfo' yields:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 9
So I took the advise of a CFLAGS optimization page from Gentoo (after
some hasty googling) and did
./configure CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
Without changing my system 'ulimits', nor my initscript, nor fussing
with softlimits in a tcpserver run file, I now have clamd running
YOUR CFLAGS will be different for your architecture, of course, but I
presume something can be gained by either i) optimizing for your
specific architecture, or using the '-pipe' or '-fomit-frame-pointer'
bits. I don't know compiler behavior well enough to grasp out "why",
but it works. That's enough sometimes...