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


Thank you Carlos. I have resolved the error.

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.

What still confuses me is that why was cpuid.h present in x86 folder
when I am clearly on x86_64 machine. If anyone can explain that then
it would be great.

Thanks once to Carlos for pointing me in the right direction.

On 5/21/16, Sreyan Chakravarty <sreyan.mailing@gmail.com> wrote:
> Could you also please tell me where is
>
> contest.c located ? Its obviously not in the glibc sources that I
> downloaded. So where is it coming from ?
>
> On 5/21/16, Sreyan Chakravarty <sreyan.mailing@gmail.com> wrote:
>> Guess you are right. Something is wrong with my toolchain. The test
>> program you gave did not compile.
>>
>> But when I did a
>> find /usr/ -name cpuid.h
>>
>> /usr/src/linux-headers-2.6.24-32-generic/include/config/x86/cpuid.h
>>
>> I managed to find the above file. What bothers me is that, it was
>> found under x86 while I am clearly trying to compile for x86_64.
>>
>> Thanks for shedding light on why my configuration process is failing.
>>
>> Do you have any ideas why this might be happening ?
>>
>> On 5/21/16, Carlos O'Donell <carlos@systemhalted.org> wrote:
>>> On Fri, May 20, 2016 at 5:01 PM, Sreyan Chakravarty
>>> <sreyan.mailing@gmail.com> wrote:
>>>> I have no idea on how to read the config.log. All I can understand is
>>>> that from lines 19-28 I am getting "unknown" probably because I am on
>>>> a VM.
>>>
>>> configure:635: checking cpuid.h usability
>>> configure:635: gcc -c -g -O2  conftest.c >&5
>>> conftest.c:84:19: error: cpuid.h: No such file or directory
>>>
>>> You lack cpuid.h. It looks like your installation is broken.
>>>
>>> Are you compiling locally? If yes, then what does `find /usr -name
>>> cpuid.h` show?
>>>
>>> The following program should compile just fine:
>>> #include <stdio.h>
>>> #include <cpuid.h>
>>> int main (void) { return 0; }
>>>
>>> gcc -o test test.c
>>>
>>> If this fails, then your toolchain is broken.
>>>
>>> Cheers,
>>> Carlos.
>>>
>>
>


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