LinuxQuestions.org
Review your favorite Linux distribution.
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-current/Debian 10
Posts: 76

Rep: Reputation: 33
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: 231Reputation: 231Reputation: 231
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
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

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

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration