This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build Error - gcc must provide the <cpuid.h> header


On Sat, May 28, 2016 at 2:46 PM, Sreyan Chakravarty
<sreyan.mailing@gmail.com> wrote:
> On 5/22/16, Mike Frysinger <vapier@gentoo.org> wrote:
>> On 21 May 2016 21:54, Sreyan Chakravarty wrote:
>>> Here is what I did-:
>>>
>>> I did the search on my system for cpuid.h using the following command-:
>>>
>>> find /usr/ -name cpuid.h
>>>
>>> which turned up only one result-:
>>>
>>> /usr/src/linux-headers-2.6.24-32-generic/include/config/x86/cpuid.h
>>>
>>> Then I copied the above file into my /usr/include/ using the cp
>>> command. Then the configuration worked fine.
>>
>> no, don't do that.  cpuid.h needs to come from gcc, not some old random
>> version of the linux kernel.  your build is doomed to fail.
>>
>> if you need a newer version of glibc, you should just install a newer
>> distro.  if you can't upgrade your current one, then use a VM or a diff
>> system or a chroot.
>> -mike
>>
>
>
> Ok my build failed after adding the cpuid.h from the /usr location.
> Tell me something why doesnt my gcc have cpuid.h I can't figure that
> out yet.
>
> What should I do ? I am stuck. I cannot upgrade to a newer distro I
> need to build on this platform.
>
> Could you please explain the process of the chroot in more detail ?

GCC is somehow not searching headers in the predefined location. Try
adding -B<path where cpuid.h exists>(RTFM cc -B) to your CFLAGS when
you configure glibc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]