On 04/08/2010 10:44 AM, Andre Hübner wrote:
> Hello,
> 
> try to package the new clamav 0.96. compiling works but my
> /usr/lib/libclamav.so.6.1.2 gets really huge, size is 73MB

A default build of libclamav.so is 14 MB here, 9 MB if stripped.

> /usr/lib/libclamav.so.6.0.5 of version 0.95.3 just was 2MB
> This is my configure-line:
> 
> ./configure --sysconfdir=/etc --prefix=/usr --libdir=%_libdir
> --with-user=nobody --with-group=nogroup \
> --disable-clamav  --disable-zlib-vcheck --enable-clamdtop --enable-shared
> 
> And there is another difference at compile-time. in 0.95 libtool is used
> to compile the files.
> now it seems to be CXX Compiler.

It still uses libtool, run 'make V=1' if you want to see the actual
libtool invocation.
By default it uses the "silent" rules, that only prints the file being
compiled and any compiler warnings/errors.

> 
> I use this flags:
> 
> CFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0
> -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -pipe -fstack-protector'
> CXXFLAGS='-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0
> -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -pipe -fstack-protector'

Remove -g from CXXFLAGS, or run strip on the resulting libclamav.so.

> What could be the reason for increasing filesize this way?

Debug information for C++ takes up a HUGE amount of space.
By default I set CXXFLAGS to -O2 (without -g).

Perhaps I should add something to the upgrade notes about this.

You are not going to need the debug info for the C++ part anyway, if it
crashes the stacktrace will tell us it happened while in the bytecode,
and thats usually enough, we need a way to reproduce the problem on our
end anyway.
And when we do that, we can build locally with -g.

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to