=^.^=

Portage Errors: gcc must provide the cpuid.h header

When compiling glibc or gcc you may encounter:

configure: error: gcc must provide the  header
 * ERROR: sys-libs/glibc-2.12.2 failed (compile phase):
 *   failed to configure glibc
 * 
 * Call stack:
 *           ebuild.sh, line   56:  Called src_compile
 *         environment, line 3723:  Called eblit-run 'src_compile'
 *         environment, line 1175:  Called eblit-glibc-src_compile
 *   src_compile.eblit, line  217:  Called toolchain-glibc_src_compile
 *   src_compile.eblit, line  128:  Called glibc_do_configure 'nptl'
 *   src_compile.eblit, line  104:  Called die
 * The specific snippet of code:
 *      "${S}"/configure ${myconf} || die "failed to configure glibc"

This is because your currently selected GCC profile is too old.

# gcc-config -l
 [1] i686-pc-linux-gnu-3.4.6
 [2] i686-pc-linux-gnu-3.4.6-hardened
 [3] i686-pc-linux-gnu-3.4.6-hardenednopie
 [4] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.4.6-hardenednossp
 [6] i686-pc-linux-gnu-4.1.2 *
 [7] i686-pc-linux-gnu-4.3.4

# gcc-config 7 
 * Switching native-compiler to i686-pc-linux-gnu-4.3.4 ...
>>> Regenerating /etc/ld.so.cache...

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

# source /etc/profile

Now update your gcc (if applicable) and switch to its profile repeating the steps above:

# emerge --update gcc

Comments

There are no comments for this item.