Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258888 - sys-kernel/linux-headers does not recognize CHOST="pentium3-pc-linux-gnu"
Summary: sys-kernel/linux-headers does not recognize CHOST="pentium3-pc-linux-gnu"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://www.gentoo.org/doc/en/change-c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 22:53 UTC by Gordon Schumacher
Modified: 2009-02-17 15:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Schumacher 2009-02-13 22:53:40 UTC
If I have CHOST="pentium3-pc-linux-gnu" set in make.conf, then "emerge sys-kernel/linux-headers" returns the following:

 * This version of linux-headers does not support unknown.
 * Please merge the appropriate sources, in most cases
 * (but not all) this will be called unknown-headers.
 *
 * ERROR: sys-kernel/linux-headers-2.6.28-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called pkg_setup
 *               ebuild.sh, line 1286:  Called kernel-2_pkg_setup
 *         kernel-2.eclass, line 1089:  Called setup_headers
 *         kernel-2.eclass, line  718:  Called die
 * The specific snippet of code:
 *              die "Package unsupported for $(tc-arch)"
 *  The die message:
 *   Package unsupported for unknown
 *
 * 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-kernel/linux-headers-2.6.28-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-2.6.28-r1/temp/die.env'.

It would appear that it is expecting only "i*86-pc-linux-gnu".  I have my CHOST set to this for the benefit of packages like gmp and mpfr.

I can get the package to emerge by overriding CHOST in /etc/portage/env (yuck!) but then "emerge -K sys-kernel/linux-headers" fails with:

!!! All ebuilds that could satisfy "sys-kernel/linux-headers" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/linux-headers-2.6.28-r1 (masked by: CHOST: i686-pc-linux-gnu)
- sys-kernel/linux-headers-2.6.27-r2 (masked by: CHOST: i686-pc-linux-gnu)
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-02-14 01:42:35 UTC
Set CFLAGS for (sub)architecture specific optimisations. CHOST has no influence on those whatsoever.
Comment 2 Gordon Schumacher 2009-02-16 20:55:35 UTC
Unless I'm horribly mistaken, this is not true for the more heavily-optimized packages such as gmp, mpfr, and some of the multimedia libs.  I do know that, for instance, gmp has multiple sets of optimized assembly routines for different specific flavours of x86, and uses the string passed to --host to determine which to use.  Thus, "./configure --host=pentium3-pc-linux-gnu" will use assembly routines utilizing sse, but "./configure --host=i686-pc-linux-gnu" will not.

In my particular situation, I am building an environment that has a minimum system requirement of a Pentium 3 processor, hence why I changed CHOST.  I was worried about changing CHOST for just those packages - I was afraid that might cause library-linking issues, so I simply changed it in make.conf; perhaps that's not the correct answer here.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-16 23:46:36 UTC
Your CHOST is not valid (there's a canonical list somewhere)

GMP chooses optimizations based on the CPU yes, and it's wrongly doing so based on the CHOST setting. It needs to export that ability further out. If you can find packages where it's automatically using the CHOST to decide on optimizations, please file a bug for each of those packages.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-16 23:47:31 UTC
Closing now, please report seperate bugs for each badly behaved package like GMP is doing with detection based on CHOST. (It can cause issues when you're building between machines easily).
Comment 5 SpanKY gentoo-dev 2009-02-17 00:27:14 UTC
no, dont report any bugs at all about CHOST=pentium3-xxx.  that is not a valid chost.  the gmp issue is completely isolated and there is a bug open dealing with that.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-17 10:14:11 UTC
vapier: you mis-interpreted what I said. To clarify, if there are packages doing detection of what to build based on invalid CHOST strings (like pentium3-...), those packages need to be fixed.
Comment 7 SpanKY gentoo-dev 2009-02-17 15:58:52 UTC
not really ... in the case of gmp, it does extra special magic.  look at the bug open about it.