# app-antivirus/clamav-0.96 failed

## Schickel

Hi!

I can't update/emerge the actual version of clamav-0.96.

Here some outputs/logs from emergeing clamav:

emerge --info =app-antivirus/clamav-0.96:

```

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.26-gentoo-r3 i686)

=================================================================

                        System Settings

=================================================================

System uname: Linux-2.6.26-gentoo-r3-i686-AMD_Athlon-tm-_64_Processor_3200+-with-gentoo-1.12.13

Timestamp of tree: Mon, 12 Apr 2010 22:00:01 +0000

distcc 3.1 i686-pc-linux-gnu [disabled]

app-shells/bash:     4.0_p37

dev-java/java-config: 2.1.10

dev-lang/python:     2.4.4-r13, 2.5.4-r3, 2.6.4-r1

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.1.2, 4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="*"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/spool/torque"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1"

LINGUAS="de"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl apache2 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl symlink sysfs tcpd unicode x86 xml xml2 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

emerge -pqv =app-antivirus/clamav-0.96:

```

[ebuild  N    ] app-antivirus/clamav-0.96  USE="bzip2 iconv ipv6 -clamdtop -milter (-selinux)"

```

/var/tmp/portage/app-antivirus/clamav-0.96/temp/build.log:

```

...

make[4]: Leaving directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96/libclamav'

make[3]: Leaving directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96/libclamav'

make[2]: Leaving directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96/libclamav'

Making all in clamscan

make[2]: Entering directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96/clamscan'

  CC     output.o

  CC     getopt.o

  CC     optparser.o

  CC     actions.o

  CC     misc.o

  CC     clamscan.o

  CC     others.o

  CC     manager.o

  CCLD   clamscan

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)@GLIBCXX_3.4.9'

collect2: ld returned 1 exit status

make[2]: *** [clamscan] Error 1

make[2]: Leaving directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96/clamscan'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/app-antivirus/clamav-0.96/work/clamav-0.96'

make: *** [all] Error 2

 * ERROR: app-antivirus/clamav-0.96 failed:

 *   emake failed

 * 

 * Call stack:

 *     ebuild.sh, line   54:  Called src_compile

 *   environment, line 2901:  Called _eapi2_src_compile

 *     ebuild.sh, line  646:  Called die

 * The specific snippet of code:

 *              emake || die "emake failed"

```

What I did:

stop any mail-services (amavis, clamd, freshclam, postfix) -> Update failed

remove the last version of clamav and try to install the actual -> Install failed

Any suggestions to resolve this?[/code]

----------

## V-Li

Is virtual/libstdc++ installed?

----------

## Schickel

 *V-Li wrote:*   

> Is virtual/libstdc++ installed?

 

Yes, it is.

----------

## V-Li

Which of

sys-libs/libstdc++-v3-bin

sys-libs/libstdc++-v3

is installed?  I should have asked that first.  Swap and see if the other one works or rebuild the non-binary version if you have it installed.

----------

## Schickel

 *V-Li wrote:*   

> Which of
> 
> sys-libs/libstdc++-v3-bin
> 
> sys-libs/libstdc++-v3
> ...

 

I've installed sys-libs/libstdc++-v3 and emerging clamav failed. Also with sys-libs/libstdc++-v3-bin emerging of clamav failed.

On my Gentoo-homeserver sys-libs/libstdc++-v3 is not installed and the clamav updated without any problems, so i think that the problem must be something else.

----------

## V-Li

This error results from the standard C++ library.  Have you built gcc by any chance with USE=nocxx?

----------

## Schickel

 *V-Li wrote:*   

> This error results from the standard C++ library.  Have you built gcc by any chance with USE=nocxx?

 

No, here are the USE-Flags for gcc: fortran mudflap nls nptl openmp

----------

## V-Li

Sorry, I have to give up. Maybe the instructions found in https://bugs.gentoo.org/show_bug.cgi?id=64615 help you.

----------

## tranquilcool

in any case clamav-0.96 is broken. segmentation fault. fails to start.

i had to revert to clamav-0.95.3

----------

## V-Li

 *tranquilcool wrote:*   

> in any case clamav-0.96 is broken. segmentation fault. fails to start.
> 
> i had to revert to clamav-0.95.3

 

Have you already reported this?

----------

## platojones

 *tranquilcool wrote:*   

> in any case clamav-0.96 is broken. segmentation fault. fails to start.
> 
> i had to revert to clamav-0.95.3

 

Certainly not for everybody.  Works fine on my non-hardened, amd64 system.

----------

## tranquilcool

 *platojones wrote:*   

>  *tranquilcool wrote:*   in any case clamav-0.96 is broken. segmentation fault. fails to start.
> 
> i had to revert to clamav-0.95.3 
> 
> Certainly not for everybody.  Works fine on my non-hardened, amd64 system.

 

unfortunately doesn't work for me. libclamav.so problem

----------

## platojones

You try running revdep-rebuild and/or lafilefixer?

----------

## tranquilcool

 *platojones wrote:*   

> You try running revdep-rebuild and/or lafilefixer?

 

tried both.

the error shows up even in dmesg;

clamd[12338] general protection ip:b70ab7f7 sp:bffe0350 error:0 in libclamav.so.6.1.2[b6f81000+80c000]

EDIT: solved.

installed clamav-0.96 with gcc-4.5.0

removed virus database

stopped clamd

ran freshclam

then started clamd.

----------

## Schickel

 *tranquilcool wrote:*   

>  *platojones wrote:*   You try running revdep-rebuild and/or lafilefixer? 
> 
> tried both.
> 
> the error shows up even in dmesg;
> ...

 

Installed with gcc-4.5.0????

In portage is only "Latest version available: 4.3.4"

----------

## tranquilcool

 *Schickel wrote:*   

>  *tranquilcool wrote:*    *platojones wrote:*   You try running revdep-rebuild and/or lafilefixer? 
> 
> tried both.
> 
> the error shows up even in dmesg;
> ...

 

recycled gcc from the toolchain overlay as gcc-4.5.0. recompiling world at the moment.

----------

## svrmarty

see bug 315283

patched ebuild which replaces -O3 with -O2 flags

fixes the segfault with too aggressive -O3 flag

----------

## Schickel

I've got the same error witch the ebuild-file from the bug-report...

----------

## svrmarty

post your emerge --info

----------

## Schickel

 *svrmarty wrote:*   

> post your emerge --info

 

Here it is:

```

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.26-gentoo-r3 i686)

=================================================================

System uname: Linux-2.6.26-gentoo-r3-i686-AMD_Athlon-tm-_64_Processor_3200+-with-gentoo-1.12.13

Timestamp of tree: Thu, 22 Apr 2010 22:00:01 +0000

distcc 3.1 i686-pc-linux-gnu [disabled]

app-shells/bash:     4.0_p37

dev-java/java-config: 2.1.10

dev-lang/python:     2.4.4-r13, 2.5.4-r3, 2.6.4-r1

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.1.2, 4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="*"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/spool/torque"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1"

LINGUAS="de"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl apache2 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl symlink sysfs tcpd unicode x86 xml xml2 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

## platojones

 *Quote:*   

> (std::basic_ostream<char, std::char_traits<char> >&, char const*, int)@GLIBCXX_3.4.9' 

 

I'm curious about that.  Have you recently been doing anything gcc related, like upgrade or downgrade?

----------

## svrmarty

yes it seems so

uninstall your old gcc version (sys-devel/gcc:       4.1.2, 4.3.4 )

this should fix it

----------

## Schickel

 *svrmarty wrote:*   

> yes it seems so
> 
> uninstall your old gcc version (sys-devel/gcc:       4.1.2, 4.3.4 )
> 
> this should fix it

 

It's  unbelievable.... It does not work with the new gcc. I've upgraded gcc with the instructions from the upgradeguide. After building "world" clamav failed with the same error

----------

## Hu

 *Schickel wrote:*   

> Installed with gcc-4.5.0????
> 
> In portage is only "Latest version available: 4.3.4"

 4.3.4 is the latest stable.  There are 4.4.x series gcc in testing, and 4.5.0 was recently added under a package mask.  These newer versions are provided for users who want or need to run the latest available compiler.  Before switching active versions, remember that packages may only made to work with a gcc of the same level of restriction.  A package bug that first manifested under gcc 4.5 may not have its fix backported to stable, on the theory that no one in stable will have gcc 4.5.

 *Schickel wrote:*   

> It's  unbelievable.... It does not work with the new gcc. I've upgraded gcc with the instructions from the upgradeguide. After building "world" clamav failed with the same error

 Please qualify "new."  Your post will live for a long time, and what is new now may not be new later when someone else encounters this issue.  Also, the exact meaning of new can vary depending on whether you incorporate bleeding edge overlays and on whether you use packages from testing or stable.

It is quite believable that a package of moderate to advanced age may fail under a very new compiler.  Each new release of gcc brings improvements in standards compliance, and many releases also bring improvements to security hardening technology.  Old code which happened to work under the permissive settings of an old gcc can break when a newer gcc enforces more strict rules.

----------

## Schickel

@Hu:

I'm sorry, it's my bad english... In german the slogan/saying "unbelievable" means something else.

My clamav is working with the old version and at this time I could live with it. If I found any reason or solution, I post it here.

----------

## xces

The problem described in the first post has probably been an upstream bug which has been fixed in ClamAV 0.96.1, see Bug #1971 in ClamAV's bugzilla.

----------

