Installation of 2.2.15 fails at compiling clamav

Discussion in 'Installation/Configuration' started by xrat, Jul 24, 2007.

  1. xrat

    xrat Member

    Hi all,
    I tried to update from 2.2.14 to 2.2.15. My previous updates all worked fine on my Debian 3.1 machine. So, I guess all requirements should be OK. Also, I did not change anything (as far as I can remember ;) I only installed automake-1.9 (which should have no effect).

    This time though, with 2.2.15, the setup/installation fails (apparently) when compiling ClamAV:

    Code:
    gcc -shared  .libs/matcher-ac.o .libs/matcher-bm.o .libs/matcher-ncore.o .libs/matcher.o .libs/md5.o .libs/others.o .libs/readdb.o .libs/cvd.o .libs/dsig.o .libs/str.o .libs/scanners.o .libs/filetypes.o .libs/rtf.o .libs/blob.o .libs/mbox.o .libs/message.o .libs/snprintf.o .libs/table.o .libs/text.o .libs/ole2_extract.o .libs/vba_extract.o .libs/msexpand.o .libs/pe.o .libs/upx.o .libs/htmlnorm.o .libs/chmunpack.o .libs/rebuildpe.o .libs/petite.o .libs/wwunpack.o .libs/suecrypt.o .libs/unsp.o .libs/aspack.o .libs/packlibs.o .libs/fsg.o .libs/mew.o .libs/upack.o .libs/line.o .libs/untar.o .libs/unzip.o .libs/special.o .libs/binhex.o .libs/is_tar.o .libs/tnef.o .libs/unrar15.o .libs/unrarvm.o .libs/unrar.o .libs/unrarfilter.o .libs/unrarppm.o .libs/unrar20.o .libs/unrarcmd.o .libs/LZMADecode.o .libs/bzlib.o .libs/infblock.o .libs/nulsft.o .libs/pdf.o .libs/spin.o .libs/yc.o .libs/elf.o .libs/sis.o .libs/uuencode.o .libs/phishcheck.o .libs/phish_domaincheck_db.o .libs/phish_whitelist.o .libs/regex_list.o .libs/sha256.o .libs/mspack.o .libs/cab.o .libs/entconv.o .libs/hashtab.o .libs/dconf.o .libs/lockdb.o  -lz -lpthread -lnsl  -Wl,-soname -Wl,libclamav.so.2 -o .libs/libclamav.so.2.0.7
    /usr/lib/libc_nonshared.a(atexit.oS)(.text.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':
    : multiple definition of `__i686.get_pc_thunk.bx'
    /usr/lib/gcc-lib/i486-linux/3.3.5/crtbeginS.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
    collect2: ld returned 1 exit status
    make[2]: *** [libclamav.la] Error 1
    make[2]: Leaving directory `/root/install_ispconfig/compile_aps/clamav-0.91.1/libclamav'
    
    My libc6 and binutils are

    Code:
    $ dpkg -l 'libc6*' binutils | grep ^ii
    ii  binutils       2.15-6         The GNU assembler, linker and binary ...
    ii  libc6          2.3.6.ds1-13   GNU C Library: Shared libraries
    ii  libc6-dev      2.3.6.ds1-13   GNU C Library: Development Libraries ...
    $ gcc --version
    gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
    I found a very valuable post by Michael Koren at http://www.mail-archive.com/[email protected]/msg33191.html where he provides several ways to work around the above mentioned troubles.

    Thus, I installed gcc-3.4 (note that gcc then still is v3.3 but I needed the shared libs of gcc-3.4). Executed in directory /usr/lib/gcc-lib/i486-linux/3.3.5 the following commands exchange the files needed:
    Code:
    cp -a crtbeginS.o crtbeginS.o.orig
    cp -a crtendS.o crtendS.o.orig
    cp -a /usr/lib/gcc/i486-linux/3.4.4/crtbeginS.o .
    cp -a /usr/lib/gcc/i486-linux/3.4.4/crtendS.o .
    Unfortunately, compilation still fails, though with a different yet similar error (provided here only for reference):

    Code:
    : multiple definition of `__i686.get_pc_thunk.bx'
    .libs/matcher-ac.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):/root/install_ispconfig/compile_aps/clamav-0.91.1/libclamav/matcher-ac.c:40: first defined here
    collect2: ld returned 1 exit status
    make[2]: *** [libclamav.la] Error 1
    
    Eventually, I managed to install ISPconfig 2.2.15 by compiling it with GCC 3.4 and G++ 3.4 (don't forget to install it!:)

    I do not know the recommended way of switching GCC from 3.3 to 3.4 but the following did the job for me.

    Code:
    $ cd /usr/bin
    rm gcc ; ln -s gcc-3.4 gcc
    rm g++ ; ln -s g++-3.4 g++
    
    HTH,
    -- xrat
     

Share This Page