ClamAV binary needs .so from dev-package?

Rafael Ostertag raos at opencsw.org
Sat May 17 22:11:18 CEST 2014


Hi Peter
On Sat, May 17, 2014 at 07:48:45PM +0200, Peter Bonivart wrote:
> # freshclam -V
> LibClamAV Warning: Cannot dlopen libclamunrar_iface: file not found -
> unrar support unavailable
> ClamAV 0.98.4-rc1/18999/Sat May 17 13:26:18 2014

Judging from the message, freshclam (or libclamav) tries to dlopen(3C) the
library, i.e. the library is loaded dynamically at runtime by a call to
dlopen(3C) instead of being loaded during initialization phase of the
executable.

dlopen() requires a pathname, so the usual 'SONAME is recorded in the binary,
and then used to locate the library later' does not apply here. AFAIK, all
applications which dlopen() libraries at runtime do so by searching for .so
files. As an example, apache's modules are loaded dynamically and also only
feature .so names (see /opt/csw/apache2/libexec). Using versioned file names
wouldn't do any good, and one had to constantly update the file name in the
code to keep in sync.

> 
> If I install the dev package everything is fine. The below looks ok to
> me so why doesn't the library use the .so.6-file you think?
> 
> # ls -ld /opt/csw/lib/*unrar_iface*
> lrwxrwxrwx   1 root     root          28 May 17 19:22
> /opt/csw/lib/libclamunrar_iface.so -> libclamunrar_iface.so.6.1.23
> lrwxrwxrwx   1 root     root          28 May 16 18:56
> /opt/csw/lib/libclamunrar_iface.so.6 -> libclamunrar_iface.so.6.1.23
> -rwxr-xr-x   1 root     bin        11908 May 16 15:58
> /opt/csw/lib/libclamunrar_iface.so.6.1.23

See above. I'd bet the clamav guys use libtool and 6.1.23 is also the version
of libclam, and they were just lazzy to create a separate recipe for generating
dynamically loaded modules.  However, if remotely possible, I would put the
dynamically loaded libraries into /opt/csw/lib/clamav or similar.

HTH

cheers
rafi
> 
> /peter
> 


More information about the maintainers mailing list