Glibc-2.14 issues

Bryan Kadzban bryan at
Sat Jun 4 18:52:46 PDT 2011

Matthew Burgess wrote:
> Hi all,
> The following is taken from my build logs when using Glibc-2.13:
> checking cpuid.h usability... no
> checking cpuid.h presence... yes
> configure: WARNING: cpuid.h: present but cannot be compiled
> configure: WARNING: cpuid.h:     check for missing prerequisite headers?
> configure: WARNING: cpuid.h: see the Autoconf documentation
> configure: WARNING: cpuid.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: cpuid.h: proceeding with the preprocessor's result
> configure: WARNING: cpuid.h: in the future, the compiler will take precedence
> checking for cpuid.h... yes
> Using Glibc-2.14, that final line reads 'no', and appears to stem from the
> lack of 'stdio.h'.  stdio.h is installed by Glibc, so it would appear as if
> we're getting into a circular dependency here somehow, but I'm yet to figure
> out how/why Glibc-2.14 is behaving so differently to Glibc-2.13.
> I guess the first question is, has anyone else seen this issue?

Haven't done a build in a while (and my builds are 64-bit multilib
anyway, so I'm not sure if I get sysdeps/i386 configure scripts to run
or not :-) ), but I've done some digging.

The problem is autoconf.  By default the AC_CHECK_HEADER macro uses a
set of prerequisite headers that's supposed to cover most of the common
stuff on a system -- but that list is set up for full systems, not
bootstrapping like we're trying to do.

But it turns out that cpuid.h is dead-simple (it has to be, since it's
installed with the compiler...  :-) ), and it doesn't need any of these
prerequisite headers at all.  So I *think* the attached patch will work.

(However, I can't actually test it, since glibc 2.14 refuses to
configure on this box as it is, complaining that my compiler is too old.
That's probably going to make the next upgrade a bit difficult...)

Anyway, see if it helps.  I'm fixing both and configure
here, but if you "patch -Z" then it shouldn't cause make to try to rerun
autoconf.  (Because it'll set the timestamps of the edited files to the
ones in the patch file, and I've ensured that configure is newer than in this patch file.)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glibc-2.14-fix-cpuid.patch
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the lfs-dev mailing list