If the environment variable ARCH is set to some value the linux-headers ebuild script fails to install the asm headers. Reproducible: Always Steps to Reproduce: 1. export ARCH=linux 2. emerge sys-kernel/linux-headers 3. Actual Results: Other packages that need the asm parts of the headers fail to build. Expected Results: The portage system should make sure that crucial environment variables are cleaned out before building.
What ebuild/version of linux-headers have you tried this on? If you haven't given it a shot, mind trying on the 2.4.21 ebuild and let me know (via this bug) what happens? 2.4.21 uses kernel.eclass (/usr/portage/eclass/), and It is possible a fix can be implemented there or in the ebuilds.
Even the 2.4.21 ebuild uses $ARCH in the script and does not like if ARCH is set to anything else.
In the 2.4.21 ebuild, what about changing: ARCH="${ARCH:-`uname -m`}" to ARCH="${uname -m}"? How does that work for you?
This is fine, it avoids nasty surprises.
This is more up my alley, so I'll take care of this bug shortly.
Fixed and in CVS. Let me know if the issue somehow continues to persist.