Mailing List Archive

libclamav grew by 10Mb ?
Just curious - my 0.95.3 libclamav was about 2Mb, the new 0.96 is 12Mb -
did I possibly do something wrong in the build?


/Per Jessen, Zürich

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
On 04/25/2010 05:58 PM, Per Jessen wrote:
> Just curious - my 0.95.3 libclamav was about 2Mb, the new 0.96 is 12Mb -
> did I possibly do something wrong in the build?

No, that is normal: the new JIT code in 0.96 takes up that space.
You can strip it if you want it a bit smaller (~9M).

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
Could you explain why it has so much increase between 0.95.3 and 0.96 ?

Is there a way, by disable some new features ( bytecoder for ex ) to
decrease the size of the lib ?

Thanks for any help!

Nicolas.

2010/4/25 Török Edwin <edwintorok@gmail.com>

> On 04/25/2010 05:58 PM, Per Jessen wrote:
> > Just curious - my 0.95.3 libclamav was about 2Mb, the new 0.96 is 12Mb -
> > did I possibly do something wrong in the build?
>
> No, that is normal: the new JIT code in 0.96 takes up that space.
> You can strip it if you want it a bit smaller (~9M).
>
> Best regards,
> --Edwin
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
2010/4/26 nicolas dumont <nicolas.dumont.perso@gmail.com>:
> Could you explain why it has so much increase between 0.95.3 and 0.96 ?
>
> Is there a way, by disable some new features ( bytecoder for ex ) to
> decrease the size of the lib ?

Is it that difficult?

--with-llvm links statically the whole llvm into libclamav.
--without-llvm does not do this.

Why is a user question sent to -devel?


> 2010/4/25 Török Edwin <edwintorok@gmail.com>
>> On 04/25/2010 05:58 PM, Per Jessen wrote:
>> > Just curious - my 0.95.3 libclamav was about 2Mb, the new 0.96 is 12Mb -
>> > did I possibly do something wrong in the build?
>>
>> No, that is normal: the new JIT code in 0.96 takes up that space.
>> You can strip it if you want it a bit smaller (~9M).
>>
>> Best regards,
>> --Edwin
>> _______________________________________________
>> http://lurker.clamav.net/list/clamav-devel.html
>> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>>
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>



--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
On 04/26/2010 01:07 PM, Reini Urban wrote:
> 2010/4/26 nicolas dumont <nicolas.dumont.perso@gmail.com>:
>> Could you explain why it has so much increase between 0.95.3 and 0.96 ?
>>
>> Is there a way, by disable some new features ( bytecoder for ex ) to
>> decrease the size of the lib ?
>
> Is it that difficult?
>
> --with-llvm links statically the whole llvm into libclamav.
> --without-llvm does not do this.

Actually --disable-llvm does that, there is no --with/--without-llvm.
This is similar to --disable-bzip2, again no --with/--without there.

I think you are right that configure should be more consistent.
Maybe something to improve for 0.97.

>
> Why is a user question sent to -devel?

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
I've added the option --disable-llvm to the configure file parameters.
I've also remove the use of lib c++.
and now my binary linked with libclamav.a is about 1MB instead of 12MB.

So, it's really better for my usage.
Thank you very much.

Best regards,
Nicolas Dumont.


2010/4/26 Török Edwin <edwintorok@gmail.com>

> On 04/26/2010 01:07 PM, Reini Urban wrote:
> > 2010/4/26 nicolas dumont <nicolas.dumont.perso@gmail.com>:
> >> Could you explain why it has so much increase between 0.95.3 and 0.96 ?
> >>
> >> Is there a way, by disable some new features ( bytecoder for ex ) to
> >> decrease the size of the lib ?
> >
> > Is it that difficult?
> >
> > --with-llvm links statically the whole llvm into libclamav.
> > --without-llvm does not do this.
>
> Actually --disable-llvm does that, there is no --with/--without-llvm.
> This is similar to --disable-bzip2, again no --with/--without there.
>
> I think you are right that configure should be more consistent.
> Maybe something to improve for 0.97.
>
> >
> > Why is a user question sent to -devel?
>
> Best regards,
> --Edwin
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
Reini Urban wrote:

> 2010/4/26 nicolas dumont <nicolas.dumont.perso@gmail.com>:
>> Could you explain why it has so much increase between 0.95.3 and 0.96
>> ?
>>
>> Is there a way, by disable some new features ( bytecoder for ex ) to
>> decrease the size of the lib ?
>
> Is it that difficult?
>
> --with-llvm links statically the whole llvm into libclamav.
> --without-llvm does not do this.
>
> Why is a user question sent to -devel?

It's hardly a user question when it concerns how to build clamav.
Besides, the configure help output doesn't exactly say much:

--enable-llvm Enable 'llvm' JIT/verifier support [default=auto]

(automatic selection based on what?)

Btw, the README doesn't mention the 500% increase in the library size,
nor does the Changelog.


/Per Jessen, Zürich

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
On 04/27/2010 02:19 PM, Per Jessen wrote:
> Reini Urban wrote:
>
>> 2010/4/26 nicolas dumont <nicolas.dumont.perso@gmail.com>:
>>> Could you explain why it has so much increase between 0.95.3 and 0.96
>>> ?
>>>
>>> Is there a way, by disable some new features ( bytecoder for ex ) to
>>> decrease the size of the lib ?
>>
>> Is it that difficult?
>>
>> --with-llvm links statically the whole llvm into libclamav.
>> --without-llvm does not do this.
>>
>> Why is a user question sent to -devel?
>
> It's hardly a user question when it concerns how to build clamav.
> Besides, the configure help output doesn't exactly say much:
>
> --enable-llvm Enable 'llvm' JIT/verifier support [default=auto]
>
> (automatic selection based on what?)

It is automatically enabled if you have a known-to-work GNU C++ compiler
installed, and you have a CPU supported by the LLVM JIT.

>
> Btw, the README doesn't mention the 500% increase in the library size,
> nor does the Changelog.

The wiki mentions something about the size:
http://wiki.clamav.net/bin/view/Main/UpgradeNotes096

I don't see an easy way of reducing the size (except for --disable-llvm).
Can you give some more details on why this size increase is not
acceptable for you?

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
Török Edwin wrote:

>>
>> --enable-llvm Enable 'llvm' JIT/verifier support [default=auto]
>>
>> (automatic selection based on what?)
>
> It is automatically enabled if you have a known-to-work GNU C++
> compiler installed, and you have a CPU supported by the LLVM JIT.

Okay. Just out of curiosity - what happens if I build/configure on a
machine where the JIT is supported, but distribute to a machine where
it isn't? I.e. will it cause a problem?

> I don't see an easy way of reducing the size (except for
> --disable-llvm). Can you give some more details on why this size
> increase is not acceptable for you?

Oh, I don't have an issue with the size as such, it was just a surprise.


/Per Jessen, Zürich

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
Re: libclamav grew by 10Mb ? [ In reply to ]
On 04/27/2010 09:58 PM, Per Jessen wrote:
> Török Edwin wrote:
>
>>>
>>> --enable-llvm Enable 'llvm' JIT/verifier support [default=auto]
>>>
>>> (automatic selection based on what?)
>>
>> It is automatically enabled if you have a known-to-work GNU C++
>> compiler installed, and you have a CPU supported by the LLVM JIT.
>
> Okay. Just out of curiosity - what happens if I build/configure on a
> machine where the JIT is supported, but distribute to a machine where
> it isn't? I.e. will it cause a problem?

supported has 2 parts:
- C++ compiler "recent enough"
- CPU *architecture* supported

Obviously you can't take the build from one CPU architecture (say X86)
and run it on another (say PowerPC), unless you are cross compiling, so
I don't think there should be any problems with that part.

Regarding the C++ part: the machines you'll run ClamAV on don't need to
have a C/C++ compiler installed, they only need a libstdc++.
That libstdc++ has to be something that is compatible with the libstdc++
on the build machine (this usually means same version or newer).
Although in some cases it might work with older versions, I don't know.


The worse that can happen regarding libstdc++ mismatches AFAIK is that
you get a missing symbol error, and the program doesn't start.

In conclusion no, there shouldn't be any problems, and if you do get
problems they should be obvious when you start clamscan/clamd.

>
>> I don't see an easy way of reducing the size (except for
>> --disable-llvm). Can you give some more details on why this size
>> increase is not acceptable for you?
>
> Oh, I don't have an issue with the size as such, it was just a surprise.

Ah ok.

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net