Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


Search this Thread
Old 09-14-2012, 12:05 AM   #1
LQ Newbie
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
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-

It seems that the files in /usr/include/linux are only a subset of what is in /usr/src/linux/include- 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?
Old 09-14-2012, 12:24 AM   #2
Registered: Jul 2012
Location: RO
Distribution: Slackware64-14.0
Posts: 65

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

Last edited by sorinm; 09-14-2012 at 12:26 AM.
Old 09-14-2012, 01:15 AM   #3
Slackware Contributor
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
Not sure if this will work but try going into the /usr/src/linux/ directory and do a
make prepare
Old 09-14-2012, 03:56 AM   #4
Didier Spaier
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 5,255

Rep: Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462Reputation: 1462
Originally Posted by mRgOBLIN View Post
Not sure if this will work but try going into the /usr/src/linux/ directory and do a
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".

Last edited by Didier Spaier; 09-14-2012 at 05:03 AM. Reason: Delete useless considerations that the OP is already aware of.
Old 09-14-2012, 06:57 AM   #5
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 786

Rep: Reputation: 235Reputation: 235Reputation: 235
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.
Old 09-14-2012, 11:03 PM   #6
LQ Newbie
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Originally Posted by wildwizard View Post
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help me find the Linux kernel headers xjonquilx Linux - Newbie 6 05-20-2012 05:55 PM
GCC in chroot failing to build, unable to find headers falt004 Linux From Scratch 4 08-03-2007 10:00 AM
GCC 4.0.2 Chroot Build Unable to Find Headers Kenji Miyamoto Linux From Scratch 5 06-29-2006 03:34 AM
gcc compiler error / linux headers install help SciYro Linux - Software 2 12-07-2003 01:44 PM
util-linux cannot find any headers emu_123 Linux From Scratch 3 11-05-2003 04:19 AM

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration