!!! ERROR: sys-apps/file-4.20-r1 failed.
Call stack:
ebuild.sh, line 1614: Called dyn_compile
ebuild.sh, line 971: Called qa_call 'src_compile'
environment, line 3840: Called src_compile
file-4.20-r1.ebuild, line 50: Called distutils_src_compile
distutils.eclass, line 38: Called die

!!! compilation failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/sys-apps/file-4.20-r1/temp/build.log'.

i'm on an athlon64 and have changed chost from i586 to i686. I tries to follow this guide, but when i get to the point of executing "emerge -e world", the system says it can't because of the baselayout package being masked & i've been told it was unwise to unmask it, so i'm a bit stuck now... I was also told not to upgrade from gccc 4.1.1 to gcc 4.1.2 due stability issues, and this would result in gcc being upgraded.
Last issue is that it would try to emerge nvidia-drivers. While i've been able to compile nvidia-drivers following a howto, it fails when part of "emerge -e perl python", method that i saw in another howto, so i expect it not to work when doing"emerge -e world" or "emerge -e system" either.

This is my experience on the change-chost documentation (mostly good).

I decided to switch an old k6-2 machine to gentoo to get better performance.

I first made a CD with install-x86-minimal-2007.0-r1.iso and used the kernel provided in the ISO image to get started.

My emerge commands resulted in going from the 4.1.1 compiler in stage 3 to the 4.1.2 compiler downloaded by emerge. I really didn't investigate how to stay at 4.1.1 compiler.

My hiccups appeared to be in python and perl.

I followed the X86 install instructions, and used stage3-x86-2007.0.tar.bz2 and portage-20071125.tar.bz2. I stopped following the x86 Quick Install Guide at the point of the kernel build, and completed the CHOST document then went back to the X86 install where I left off.

>>> Emerging (1 of 3) dev-perl/Locale-gettext-1.05 to /
>>> Compiling source in /var/tmp/portage/dev-perl/Locale-gettext-1.05/work/gettext-1.05 ...
* Using ExtUtils::MakeMaker
checking for gettext... no
checking for gettext in -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.
no

!!! ERROR: dev-perl/Locale-gettext-1.05 failed.

I first tried emerge -e gettext, but this did not help.

I then tried emerge -e perl, and this fixed the problem.

The second problem occurred when I did the emerge -e world step. This stopped after 68/100 packages. It finished with a lot of instructions, but no errors.

At this point /usr/lib/python2.4/config/Makefile still had the stage3 Makefile, which specified the non-existent i486 compiler. I think this was the only Makefile that still referenced the i486 compiler.

Since emerge -e world only did 68/100, then skipped to doing 32 of 32, the last being net-misc/open-ssh I looked at the CHOST documentation, which said python could be troublesome.

I tried the emerge -av1 python step to hopefully rebuild /usr/lib/python2.4/Makefile, and it did.

So why did doing emerge -av1 python update /usr/lib/python2.4/Makefile, but emerge -e world did not? I see in the build output of emerge -e world:

I followed this guide http://www.gentoo.org/doc/en/change-chost.xml to change from i486 to i686 on a merely fresh install.
I needed this because I took the wrong stage3-tarball. Stupid me!
After rebuilding binutils, gcc and glibc (about one hour),
I just had to rebuild 17 things, which took around a quarter of an hour.
FYI:

I just made some changes in my linux router gentoo instalation. I readed http://en.gentoo-wiki.com/wiki/Safe_Cflags/Via and because I have Via C7 (Esther C5J (Via C7)) I decided to change my CHOST from "i486-pc-linux-gnu" to "i686-pc-linux-gnu". CFLAGS I left as I had before, because I prefer to stay more compatible for cases of HW failure (to be able to run on different HW with currently compiled system). Currently I have CFLAGS="-O2 -mtune=i686 -pipe"

I have followed http://www.gentoo.org/doc/en/change-chost.xml . After "emerge -av1 binutils gcc glibc" I'm, in real trouble. Binutils and gcc was OK, but glibs failed to merge. It's starts to compile, but failed on segmentation faults while compiling. I tried to emerge it once more, but now I have segmentation faults during emerge. Now when I try to emerge glibc

emerge -av1 glibc

I sometimes get segmentation fault imediately, sometimes later. Most far it get to try to download package, but after that it fail on RMD160 verification and it is not able to pass further.

Today I wanted to made some backups (for to be sure) and when I started, my router completly freezes. I tried to restart it, but even no POST was shown, just speaker beeps to me. Problem was in memory. When I changed memory, everything seems to be working. Just now I recompiling glibc without any error (I hope it will end successfully ). So problem seems to be solved. More than two years without any unexpected behavior, to yesterday 299 days uptime (and before I was restarting only because of new kernel). And yesterday, when I change the CHOST, my memory broke. Bad fortune... Or maybee change the CHOST can break memory (for newbies - just joke)

I've been trying to change my CHOST variable for a while now, from i486 to i686 specifically. Every time I tried, I followed the Gentoo Howto exactly, but never got past the first step since after changing my CHOST in /etc/make.conf, suddenly nothing compiles anymore, complaining that the C compiler cannot create executables. Today I finally figured out why: I didn't have any of the other symlinks besides the i486 ones. Making them myself doesn't work, I've tried that before.

Apparently, you have to run binutils-config --x86 to create those links. I have no idea why this is not documented in the howto or, indeed, anywhere. Or if this is not supposed to be necessary, why it was necessary on my system.

Figured maybe someone else out there is having this problem as well and I might just brighten their day a bit. Could someone add a line about this in the howto please? Thanks!

Hello. I've changed my CHOST variable (downgrading from i686 to i484) accroding to the guide: http://www.gentoo.org/doc/en/change-chost.xml.
Almost all went smoothly with the exception for native python library dev-python/python-cjson. It tries to build native library with CHOST="i686" and logically catches exception:

and proceed on completing emerge -ev1 world. After completing world rebuild I retried to build problem packages and all works fine. Therefore there should be an utility package other than gcc and libtool that should be rebuild before entire world building.