LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   gcc can't find linux/ headers (http://www.linuxquestions.org/questions/slackware-14/gcc-cant-find-linux-headers-4175427171/)

JT74 09-14-2012 12:05 AM

gcc can't find linux/ headers
 
I have a fresh install of 13.37. I chose defaults for most (maybe all) of the packages, including kernel-headers. I'm trying to build xcpustate but am getting the following error:

In file included from s.c:87:0:
s-linux.c:30:27: fatal error: linux/threads.h: No such file or directory

My glibc version is 2.13 as reported by ldd --version:
ldd (GNU libc) 2.13

The file is at /usr/src/linux-2.6.37.6/include/linux/threads.h

It seems that the files in /usr/include/linux are only a subset of what is in /usr/src/linux/include-2.6.37.6/linux. From what I understand, the files at /usr/include/linux are or should be the ones that libc was built for. I suspect there will be a similar problem with the /usr/include/asm directory.

On my very old linux system (slackware 3... um, yeah, it's been a while...) I recall a similar problem that was solved with some symbolic links but from what I've read that is not the right solution (plus I tried it and it didn't work.)

What's the proper (and hopefully easy) way to resolve this?

sorinm 09-14-2012 12:24 AM

Edited, I thought kernel-headers wasn`t installed. Need to drink more coffee to wake up :)

mRgOBLIN 09-14-2012 01:15 AM

Not sure if this will work but try going into the /usr/src/linux/ directory and do a
Code:

make prepare

Didier Spaier 09-14-2012 03:56 AM

Quote:

Originally Posted by mRgOBLIN (Post 4779966)
Not sure if this will work but try going into the /usr/src/linux/ directory and do a
Code:

make prepare

I second that as IIRC long ago I had such a problem after doing a "make mrproper" in that directory and it was solved with a "make prepare".

wildwizard 09-14-2012 06:57 AM

xcpustate seems to be rather old an unmaintained.

It should be noted that the missing header file does not actually provide any useful defines any more so even if it was there it would make no difference.

JT74 09-14-2012 11:03 PM

Quote:

Originally Posted by wildwizard (Post 4780194)
xcpustate seems to be rather old an unmaintained.

It did seem pretty stale. Is there a more modern / maintained tool that provides similar information? I've been out of the Linux scene for a while. There may even be one that came with 13.37 and I just don't know it.


All times are GMT -5. The time now is 09:30 PM.