LinuxQuestions.org
Help answer threads with 0 replies.
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-09-2006, 10:06 PM   #1
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Rep: Reputation: 55
If I install the kernel source package, do I need the headers?


My normal practice, when a new kernel is released in testing, is to download all of the kernel packages & install them, as a backup, & also as a starting point for my customized kernel. I have a config file that I copy into the new sources & compile a custom kernel for my desktop & laptop. This is the kernel that I use on a regular basis. My question is: Since I have all the kernel source loaded, do I really need the header package? I have gotten along very well in the past without any kernel packages, if I compiled the kernel myself. Anyone have any ideas?
Regards,
Bill
 
Old 09-09-2006, 11:15 PM   #2
sunman
Member
 
Registered: Jun 2005
Distribution: Slackware64 13.0 (multilib)
Posts: 67

Rep: Reputation: 15
I -think- that I recall reading someplace on the forums here about how you should never install kernel headers that are different from what your system was built against, to avoid having library issues. I never have myself and haven't had any problems with anything, but I'm no expert
 
Old 09-09-2006, 11:16 PM   #3
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Technicly no, but it's poor design. Pat put them in a seperate package for a reason.

regards,
...dkrstr
 
Old 09-10-2006, 07:45 AM   #4
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Original Poster
Rep: Reputation: 55
sunman:
Quote:
I -think- that I recall reading someplace on the forums here about how you should never install kernel headers that are different from what your system was built against
Yes, the kernel-headers.WARNING file in the Testing directory of -current says that, too, but I have found that compiling the most recent nvidia driver requires the 2.6 series headers.
Since there was a shiny new kernel package released yesterday, I think I will just put in the source, compile my kernel, get it working, remove everything else, then try to compile the nvidia drivers & a couple of other drivers I need & see what happens. I'll let you know.
Regards,
Bill
 
Old 09-10-2006, 06:12 PM   #5
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Original Poster
Rep: Reputation: 55
OK, here is what I did.
1) Downloaded the most recent 2.6 series kernel in -current/extra.
2) Installed only the kernel source package.
3) Copied in my config files and ran 'make oldconfig', then 'make menuconfig'. (I take out a little more every time I go through one of these iterations, some day I'll have the resultant kernel down the way I want it.)
4) Ran 'make', then 'make modules_install'.
5) Copied the kernel files to /boot.
6) Booted several times to ensure that the new kernel worked, then modified my GRUB menu.lst file to boot automagically from the new kernel.
7) Removed any traces of old kernels/kernel packages.
8) Compiled the nvidia driver module. This process gave me a warning I hadn't seen before, but no errors & the driver works well, so no problem.
9) Compiled the kqemu module for this kernel. This worked normally, no hassles.
As a relult of the above tests, I think I'll not load any further kernel modules & just see how things work.
Regards,
Bill
 
Old 09-11-2006, 01:02 AM   #6
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Make sure to keep the original header package installed or you will run into problems compiling programs later down the road. That is, unless you want to recompile GCC and glibc for your new kernel version.

regards,
...drkstr
 
Old 09-11-2006, 04:13 AM   #7
hsimah
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Slackware 12.1
Posts: 173

Rep: Reputation: 30
I am running a 2.6.17.9 kernel I compiled, but I still have my 2.6.16.9 kernel headers I got from /testing a whing ago. I uninstalled them on my other machine and something broke (this was back in January) so I have just left them there in case.

What exactly do the headers do?
 
Old 09-11-2006, 01:40 PM   #8
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Original Poster
Rep: Reputation: 55
drkstr:
Quote:
Make sure to keep the original header package installed or you will run into problems compiling programs later down the road. That is, unless you want to recompile GCC and glibc for your new kernel version.
Please explain this. I compiled the only kernel on this system, using the GCC and glibc that are installed. The kernel compiled against them, right? Anything else I compile will compile against them, right? I can see & understand the above if I were using a precompiled kernel, but I'm not. Help please.

hsimah
Quote:
What exactly do the headers do?
I guess this is the point of my original post. My impression is that they provide code needed for compiling, if the sources aren't present. BUT, that could be wrong.
Regards,
Bill

Last edited by TSquaredF; 09-11-2006 at 01:53 PM.
 
Old 09-11-2006, 01:42 PM   #9
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
You need to keep the 2.4.x headers installed. The headers are used by GCC when compiling programs and it will expect to find the headers it was compiled against. If you need to compile something specific to your kernel (such as a kernel modules), it will look for the headers installed in the /usr/src/linux-<version>. The most common method is to follow the link '/lib/modules/<version #>/source'. However, If you are compiling a regular program, it will usually look for headers GCC was compiled against in /usr/include/linux (IE. The headers package).

regards,
...drkstr

Last edited by drkstr; 09-11-2006 at 01:43 PM.
 
Old 09-11-2006, 02:00 PM   #10
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Original Poster
Rep: Reputation: 55
Ok, now I understand. I wasn't aware that two different paths could be followed. I will put the 2.4 series headers back in. Thank you for enlightening my ignorance.
Regards,
Bill
 
Old 09-12-2006, 07:22 AM   #11
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Actually, the kernel-headers package that should be installed is the one matching the kernelt that was present when glibc was compiled, not gcc.

The result is the same--do not replace the 2.4.x kernel headers even tho' you might be using a 2.6.x kernel.

I have no idea what that one person did to make the nVidia drivers not compile correctly, since I've (within the last week) installed the latest nVidia driver on both a 10.2 box and a -current box running kernel 2.6.17.11.
 
Old 09-12-2006, 08:43 AM   #12
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Yes, I mentioned that in my earlier post, but if you want to get technical, your entire "toolchain" (binutils, gcc, & glibc) should be compiled against the same kernel headers.

http://www.linuxfromscratch.org

regards,
...drkstr
 
Old 09-12-2006, 10:08 AM   #13
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 490
Blog Entries: 1

Original Poster
Rep: Reputation: 55
Thanks, folks, I appreciate the help.
Regards,
Bill
"me, I just bear up to my bewilderedness.."
Lyle Lovett, "Bears"

Last edited by TSquaredF; 09-12-2006 at 10:29 AM.
 
  


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
do kernel headers come with kernel-source package? janos Linux - Kernel 1 05-30-2006 09:38 AM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 09:17 AM
kernel-headers package? mike2265 Linux - Newbie 1 03-17-2005 04:02 PM
FC3 - how to get and install kernel-source package? philou Fedora 2 11-14-2004 08:01 AM
Install kernel source package yzrider210 Linux - Newbie 2 11-22-2003 02:39 PM


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

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