LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-14-2012, 12:05 AM   #1
JT74
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-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?
 
Old 09-14-2012, 12:24 AM   #2
sorinm
Member
 
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
mRgOBLIN
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
Code:
make prepare
 
Old 09-14-2012, 03:56 AM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,384

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
Quote:
Originally Posted by mRgOBLIN View Post
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".

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
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
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
JT74
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
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.
 
  


Reply


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 02:04 AM.

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