# Installing app-antivirus/clamav-0.96 fails

## xces

Hi,

when trying to emerge app-antivirus/clamav-0.96 (EDIT: app-antivirus/clamav-0.96.1 fails, too) the build process always fails at the same point: when linking clamscan.

Exact message (complete build log):

```

  CCLD   clamscan

/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: warning: libstdc++.so.6, needed by ../libclamav/.libs/libclamav.so, not found (try using -rpath or -rpath-link)

../libclamav/.libs/libclamav.so: undefined reference to `vtable for std::basic_streambuf<char, std::char_traits<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::copy(char*, unsigned int, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)@GLIBCXX_3.4'

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

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned int, char)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned int, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_dispose(std::allocator<char> const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator delete(void*, std::nothrow_t const&)@GLIBCXX_3.4'

../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'

../libclamav/.libs/libclamav.so: undefined reference to `std::locale::locale()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_guard_release@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned int, unsigned int, char const*) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::locale::~locale()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_guard_acquire@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::__throw_logic_error(char const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::nothrow@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_end_catch@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_rethrow@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(unsigned int, unsigned int, char const*, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::ios_base::ios_base()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned int, unsigned int, unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned int, unsigned int, unsigned int, char)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for std::basic_ios<char, std::char_traits<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `VTT for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(unsigned int, unsigned int, char const*, unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char const*, unsigned int, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `typeinfo for std::bad_alloc@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::__throw_out_of_range(char const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator new(unsigned int, std::nothrow_t const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(unsigned int, char, std::allocator<char> const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::__throw_length_error(char const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_begin_catch@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::ios_base::~ios_base()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned int, unsigned int) const@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::__throw_bad_alloc()@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned int, std::allocator<char> const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)@GLIBCXX_3.4'

../libclamav/.libs/libclamav.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::clear()@GLIBCXX_3.4'

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
```

There is a bug report far a similar bug in ClamAV's bugzilla. The issue has been fixed in ClamAV 0.96.1, but unfortunately clamav-0.96.1 (from my overlay, not in portage) generates the exact same error message during the build process.

I ran lafilefixer but it didn't help. I've even completely rebuilt my toolchain (binutils, glibc, gcc) but it didn't help. Has anyone encountered the same problem or has any idea how to fix it? The problem only occurs when building clamav. Other C++ applications (like MySQL) can be built without a problem.

More information about my system:

```
# emerge --info

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.1-r0,

2.6.29-hardened i686)

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

System uname:

Linux-2.6.29-hardened-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.1

Timestamp of tree: Thu, 20 May 2010 10:30:01 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.6.5-r2, 3.1.2-r3

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.65

sys-devel/automake:  1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.33

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -ftracer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d

/etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release

/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

/etc/udev/rules.d"

CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -ftracer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch

protect-owned sandbox sfperms strict suidctl unmerge-logs unmerge-orphans

userfetch userpriv usersandbox usersync"

GENTOO_MIRRORS="ftp://update.onlinehome-server.info/distribution/gentoo/gentoo

ftp://de-mirror.org/distro/gentoo"

LANG="en_US.utf8"

LC_ALL="en_US.utf8"

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"

PORTDIR_OVERLAY="/usr/local/portage/custom"

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

USE="acl bash-completion berkdb bzip2 caps cli cracklib crypt curl fastcgi gdbm

hardened iconv idn ipv6 jpeg lzma maildir mmx ncurses nls nptl nptlonly openmp

pam pcre png postgres readline session smp sse sse2 ssl svg sysfs tcpd threads

truetype unicode vim-syntax x86 xattr xml 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 proxy proxy_ajp proxy_http" APACHE2_MPMS="worker" 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"

XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface

geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac

delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK,

PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

```
# stat /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libstdc++.so.6

  File: `/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libstdc++.so.6' ->

`libstdc++.so.6.0.13'

  Size: 19              Blocks: 0          IO Block: 4096   symbolic link

Device: 907h/2311d      Inode: 36426407    Links: 1

Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2010-05-20 17:25:24.543621311 +0200

Modify: 2010-05-20 16:46:08.040622019 +0200

Change: 2010-05-20 16:46:08.040622019 +0200

# stat /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libstdc++.so.6.0.13 

  File: `/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libstdc++.so.6.0.13'

  Size: 954472          Blocks: 1872       IO Block: 4096   regular file

Device: 907h/2311d      Inode: 63506466    Links: 1

Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2010-05-21 14:17:18.991621553 +0200

Modify: 2010-05-21 11:32:36.192625294 +0200

Change: 2010-05-21 11:32:55.847621284 +0200
```

```
# uname -a

Linux example.com 2.6.29-hardened #2 SMP Wed May 27 17:49:57 CEST 2009 i686 AMD

Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux
```

```
# gcc -v

Using built-in specs.

Target: i686-pc-linux-gnu

Configured with:

/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/configure --prefix=/usr

--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.3

--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/include

--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3

--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3/man

--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3/info

--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/include/g++-v4

--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec

--disable-fixed-point --without-ppl --without-cloog --enable-nls

--without-included-gettext --with-system-zlib --disable-checking

--disable-werror --enable-secureplt --disable-multilib --enable-libmudflap

--disable-libssp --enable-libgomp --enable-cld

--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.3/python

--disable-libgcj --with-arch=i686 --enable-languages=c,c++ --enable-shared

--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu

--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.3-r2 p1.2'

Thread model: posix

gcc version 4.4.3 (Gentoo 4.4.3-r2 p1.2)
```

Bug report in Gentoo's bugzilla: Bug #320743Last edited by xces on Fri Jun 18, 2010 10:41 am; edited 1 time in total

----------

## eyoung100

 *xces wrote:*   

> 
> 
> More information about my system:
> 
> ```
> ...

 

Could you please post the output of:

```
cat /proc/cpuinfo
```

From looking at your emerge --info, I believe you have a toolchain mismatch.  This may have happened when you rebuilt your toolchain:

```
Portage 2.1.8.3 (default/linux/x86/10.0 ... )

Linux-2.6.29-hardened-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.1

CBUILD="i686-pc-linux-gnu"

CHOST="i686-pc-linux-gnu"

```

You cannot use a 64 bit Kernel on a 32 bit profile.  Try this:Changing the CHOST variable

and then update your profile using

```
eselect profile list
```

 in which you will see something like the following:

```
 Available profile symlink targets:

  [1]   default/linux/amd64/10.0

  [2]   default/linux/amd64/10.0/desktop

  [3]   default/linux/amd64/10.0/developer

  [4]   default/linux/amd64/10.0/no-multilib

  [5]   default/linux/amd64/10.0/server

  [6]   hardened/linux/amd64/10.0

  [7]   hardened/linux/amd64/10.0/no-multilib

  [8]   selinux/2007.0/amd64

  [9]   selinux/2007.0/amd64/hardened

  [10]  selinux/v2refpolicy/amd64

  [11]  selinux/v2refpolicy/amd64/desktop

  [12]  selinux/v2refpolicy/amd64/developer

  [13]  selinux/v2refpolicy/amd64/hardened

  [14]  selinux/v2refpolicy/amd64/server

```

and then you want to set it to the hardened 64 bit profile ( in the example 6, unless you want pure 64-bit, 7)

```
eselect profile set 6
```

then update /etc/make.conf:

```
ACCEPT_KEYWORDS="amd64"
```

then:

```
emerge -e world
```

----------

## xces

 *eyoung100 wrote:*   

> From looking at your emerge --info, I believe you have a toolchain mismatch.

 

No, I don't. I think what irritates you is the "64" in the kernel description, but that's only part of the CPU model name. I'm running a pure 32-bit operating system (i686).

----------

## Hu

 *eyoung100 wrote:*   

> You cannot use a 64 bit Kernel on a 32 bit profile.

 This is incorrect.  If a 64 bit kernel has support for IA32 emulation, you can run with nothing but IA32 binaries.  I did this on one system as a transitional measure until I had time to reinstall it as a full 64 bit profile.  The SysRescueCD also takes this approach.  They ship both 32 bit and 64 bit kernels, but ship only a 32 bit user environment to save space.  This allows people to boot the 64 bit kernel and chroot into a hard drive installed with as a 64 bit user environment.

 *eyoung100 wrote:*   

> Try this:Changing the CHOST variable
> 
> and then update your profile using
> 
> ```
> ...

 No!  That guide deals specifically with changing the CHOST within a given architecture, such as converting from x86 i486 to x86 i686.  It does not address converting from amd64 to x86 or vice versa.  Attempting to do so will probably break the system.  There have been intermittent anecdotes of people who successfully converted a system in place, but it is generally considered to be easier to install the new architecture in a new partition, reboot over to it, and then delete the files of the old architecture.

----------

## xces

*bump*

----------

