Török Edwin wrote:
> Brian Morrison wrote:
>> Brian Morrison wrote:
>>
>>> Brian Morrison wrote:
>>>
>>>> Brian Morrison wrote:
>>>>
>>>>
>>>>> OK, I'll do that if I can't resolve it.
>>>>>
>>>>> I've checked that there are no old libclamav* files anywhere, they are
>>>>> only in /usr/lib/, I've also checked that ld.so.conf is sane, and indeed
>>>>> it is the only relevant paths are /usr/lib and /usr/local/lib in that
>>>>> order.
>>>>>
>>>>> I'm wondering if somehow the older libclamunrar* files are not being
>>>>> overwritten, but I can't see why that would happen.
>>>>>
>>>>>
>>>> Right, I've checked some more things out:
>>>>
>>>> The relocation error is complaining that rarvm_free is not a symbol in
>>>> libclamav.so.4
>>>>
>>>> If I check for any rarvm* symbol in libclamav.so.4 there are none shown,
>>>> so:
>>>>
>>>> nm /usr/lib/libclamav.so.4 | grep rarvm
>>>>
>>>> returns nothing, however:
>>>>
>>>> nm /usr/lib/libclamunrar.so.4 | grep rarvm
>>>>
>>>> does find rarvm_free and a lot of other rarvm* symbols.
>>>>
>>>> libclamav.so.4.0.1, libclamunrar.so.4.0.1 and
>>>> libclamunrar_iface.so.4.0.1 are all in /usr/lib
>>>>
>>>> Any ideas what's happening, should there be rar_vm* symbols in
>>>> libclamav.so.4.0.1?
>>>>
>>>>
>>> But ldd /usr/sbin/clamd says "Not a dynamic executable".
>>>
>
> In your build directory clamd is a shell script, which invokes the real
> executable inside .libs/clamd. This is how libtool works.
>
>>> That's whether built with rpm or the ./configure && make method.
>>>
>>>
>> No, scratch that last comment. I was looking in the wrong place in the
>> build directory.
>>
>> The actual problem is clamd has not linked in the libclamunrar*
>> libraries at all, or libz.so.1, libbz2.so.1 and libgmp.so.3, so there
>> is a problem that stops the same .spec file as 0.92.1 working in 0.93.
>>
>> I'm going to check the result of a manual build with no additional stuff
>> passed to configure. But I think I need --enable-experimental to get the
>> libclamunrar stuff don't I?
>>
>
> No, libclamunrar is controlled by --disable-unrar. By default it is enabled.
>> Well in any case, I have now tried this on RH9 (gcc 3.2.2) and Fedora 7
>> (gcc 4.1.2), and the result is that a configure && make (with or without
>> --enable-experimental) results in a clamd executable that does not link
>> in either libclamunrar* library or libz.so.1, libbz2.so.1 and
>> libgmp.so.3, but libclamav.so does link in libclamunrar.so and
>> libclamunrar_iface.so.
>>
>> Same result on both, looks like some sort of makefile bug to me.
>>
>> Trying to enter this in bugzilla, but login is screwed for me just now.
>
> What does libclamav.la, libclamunrar_iface.la, and libclamunrar.la contain?
> [EMAIL PROTECTED] clamav-0.93]# more libclamav/.libs/libclamav.la
> # libclamav.la - a libtool library file
> # Generated by ltmain.sh - GNU libtool 1.5.26 Debian 1.5.26-1 (1.1220.2.493
> 2008/02/01 16:58:18)
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
>
> # The name that we can dlopen(3).
> dlname='libclamav.so.4'
>
> # Names of this library.
> library_names='libclamav.so.4.0.1 libclamav.so.4 libclamav.so'
>
> # The name of the static archive.
> old_library='libclamav.a'
>
> # Libraries that this one depends upon.
> dependency_libs=' -lz -lbz2 -lgmp -lpthread
> /home/bdm/clamav-0.93/libclamunrar_iface/libclamunrar_iface.la
> /home/bdm/clamav-0.93/libclamunrar/libclamunrar.la'
>
> # Version information for libclamav.
> current=4
> age=0
> revision=1
>
> # Is this an already installed library?
> installed=no
>
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
>
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
>
> # Directory that this library needs to be installed in:
> libdir='/usr/local/lib'
> relink_command="(cd /home/bdm/clamav-0.93/libclamav; /bin/sh ../libtool
> --tag=CC --mode=relink gcc -g -O2 -thread-safe -version-info 4:1:0
> -no-undefined -Wl,--version-script,..
> /libclamav/libclamav.map -o libclamav.la -rpath /usr/local/lib matcher-ac.lo
> matcher-bm.lo matcher.lo md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo
> scanners.lo textdet.lo fil
> etypes.lo rtf.lo blob.lo mbox.lo message.lo table.lo text.lo ole2_extract.lo
> vba_extract.lo msexpand.lo pe.lo upx.lo htmlnorm.lo chmunpack.lo rebuildpe.lo
> petite.lo wwunpack.lo
> unsp.lo aspack.lo packlibs.lo fsg.lo mew.lo upack.lo line.lo untar.lo
> unzip.lo inflate64.lo special.lo binhex.lo is_tar.lo tnef.lo autoit.lo
> strlcpy.lo regcomp.lo regerror.lo re
> gexec.lo regfree.lo unarj.lo bzlib.lo nulsft.lo infblock.lo pdf.lo spin.lo
> yc.lo elf.lo sis.lo uuencode.lo phishcheck.lo phish_domaincheck_db.lo
> phish_whitelist.lo regex_list.lo
> mspack.lo cab.lo entconv.lo hashtab.lo dconf.lo lzma_iface.lo explode.lo
> textnorm.lo -lz -lbz2 -lgmp -lpthread lzma/liblzma.la
> ../libclamunrar_iface/libclamunrar_iface.la @inst
> _prefix_dir@) "
> [EMAIL PROTECTED] clamav-0.93]# more libclamunrar/.libs/libclamunrar.la
> # libclamunrar.la - a libtool library file
> # Generated by ltmain.sh - GNU libtool 1.5.26 Debian 1.5.26-1 (1.1220.2.493
> 2008/02/01 16:58:18)
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
>
> # The name that we can dlopen(3).
> dlname='libclamunrar.so.4'
>
> # Names of this library.
> library_names='libclamunrar.so.4.0.1 libclamunrar.so.4 libclamunrar.so'
>
> # The name of the static archive.
> old_library='libclamunrar.a'
>
> # Libraries that this one depends upon.
> dependency_libs=''
>
> # Version information for libclamunrar.
> current=4
> age=0
> revision=1
>
> # Is this an already installed library?
> installed=no
>
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
>
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
>
> # Directory that this library needs to be installed in:
> libdir='/usr/local/lib'
> [EMAIL PROTECTED] clamav-0.93]# more
> libclamunrar_iface/.libs/libclamunrar_iface.la
> # libclamunrar_iface.la - a libtool library file
> # Generated by ltmain.sh - GNU libtool 1.5.26 Debian 1.5.26-1 (1.1220.2.493
> 2008/02/01 16:58:18)
> #
> # Please DO NOT delete this file!
> # It is necessary for linking the library.
>
> # The name that we can dlopen(3).
> dlname='libclamunrar_iface.so.4'
>
> # Names of this library.
> library_names='libclamunrar_iface.so.4.0.1 libclamunrar_iface.so.4
> libclamunrar_iface.so'
>
> # The name of the static archive.
> old_library='libclamunrar_iface.a'
>
> # Libraries that this one depends upon.
> dependency_libs=' /home/bdm/clamav-0.93/libclamunrar/libclamunrar.la'
>
> # Version information for libclamunrar_iface.
> current=4
> age=0
> revision=1
>
> # Is this an already installed library?
> installed=no
>
> # Should we warn about portability when linking against -modules?
> shouldnotlink=no
>
> # Files to dlopen/dlpreopen
> dlopen=''
> dlpreopen=''
>
> # Directory that this library needs to be installed in:
> libdir='/usr/local/lib'
> relink_command="(cd /home/bdm/clamav-0.93/libclamunrar_iface; /bin/sh
> ../libtool --tag=CC --mode=relink gcc -g -O2 -thread-safe -version-info
> 4:1:0 -no-undefined -Wl,--version-
> script,../libclamunrar_iface/libclamunrar_iface.map -o libclamunrar_iface.la
> -rpath /usr/local/lib unrar_iface.lo ../libclamunrar/libclamunrar.la
> @inst_prefix_dir@) "
> [EMAIL PROTECTED] clamav-0.93]#
>
> Also the correct sequence is:
> clamd uses libclamav
> libclamav uses libclamunrar_iface
> libclamunrar_iface uses libclamunrar.
>
> Here is my ldd -v /usr/local/sbin/clamd output, which illustrates this.
> How does your look like?
> $ ldd -v /usr/local/sbin/clamd
> linux-vdso.so.1 => (0x00007fff33ffe000)
> libclamav.so.4 => /usr/local/lib/libclamav.so.4 (0x00007fa22bc45000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x0000003ccd200000)
> libc.so.6 => /lib/libc.so.6 (0x0000003ccc600000)
> libz.so.1 => /usr/lib/libz.so.1 (0x00000034bf200000)
> libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x0000003cdd600000)
> libgmp.so.3 => /usr/lib/libgmp.so.3 (0x000000360b400000)
> libclamunrar_iface.so.4 =>
> /usr/local/lib/libclamunrar_iface.so.4 (0x00007fa22ba41000)
> /lib64/ld-linux-x86-64.so.2 (0x0000003ccc200000)
> libclamunrar.so.4 => /usr/local/lib/libclamunrar.so.4
> (0x00007fa22b836000)
>
> Version information:
> /usr/local/sbin/clamd:
> libclamav.so.4 (CLAMAV_PRIVATE) =>
> /usr/local/lib/libclamav.so.4
> libclamav.so.4 (CLAMAV_PUBLIC) =>
> /usr/local/lib/libclamav.so.4
> libpthread.so.0 (GLIBC_2.2.5) => /lib/libpthread.so.0
> libpthread.so.0 (GLIBC_2.3.2) => /lib/libpthread.so.0
> libc.so.6 (GLIBC_2.3.4) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /usr/local/lib/libclamav.so.4:
> libclamunrar_iface.so.4 (CLAMAV_PRIVATE) =>
> /usr/local/lib/libclamunrar_iface.so.4
> libpthread.so.0 (GLIBC_2.2.5) => /lib/libpthread.so.0
> libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /lib/libpthread.so.0:
> ld-linux-x86-64.so.2 (GLIBC_2.3) =>
> /lib64/ld-linux-x86-64.so.2
> ld-linux-x86-64.so.2 (GLIBC_2.2.5) =>
> /lib64/ld-linux-x86-64.so.2
> ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
> /lib64/ld-linux-x86-64.so.2
> libc.so.6 (GLIBC_2.3.2) => /lib/libc.so.6
> libc.so.6 (GLIBC_PRIVATE) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /lib/libc.so.6:
> ld-linux-x86-64.so.2 (GLIBC_2.3) =>
> /lib64/ld-linux-x86-64.so.2
> ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
> /lib64/ld-linux-x86-64.so.2
> /usr/lib/libz.so.1:
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /lib/libbz2.so.1.0:
> libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /usr/lib/libgmp.so.3:
> libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.7) => /lib/libc.so.6
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /usr/local/lib/libclamunrar_iface.so.4:
> libclamunrar.so.4 (CLAMAV_PRIVATE_UNRAR) =>
> /usr/local/lib/libclamunrar.so.4
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
> /usr/local/lib/libclamunrar.so.4:
> libc.so.6 (GLIBC_2.2.5) => /lib/libc.so.6
>
I got this after installing the 0.93 rpms.
[EMAIL PROTECTED] etc]# ldd /usr/lib/libclamav.so.4
libz.so.1 => /usr/lib/libz.so.1 (0x400af000)
libbz2.so.1 => /usr/lib/libbz2.so.1 (0x400c1000)
libgmp.so.3 => /usr/lib/libgmp.so.3 (0x400d0000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x400fd000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
[EMAIL PROTECTED] etc]# ldd /usr/lib/libclamunrar.so.4
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
[EMAIL PROTECTED] etc]# ldd /usr/lib/libclamunrar_iface.so.4
libclamunrar.so.4 => /usr/lib/libclamunrar.so.4 (0x4001d000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
Not sure how to look at what the .la files contain.
When I build manually, I get the correct linkages between the libraries
and clamd, I think, at least if I set LD_LIBRARY_PATH and then use ldd
on clamd/.libs/clamd it shows the libclamunrar*.so files.
Where it seems to break is during the rpm installation step. As I say,
exactly the same .spec file has worked up to and including 0.92.1, I
can't see what is being done differently.
--
Brian
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html