LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-20-2010, 07:00 AM   #1
nortonlui
LQ Newbie
 
Registered: Oct 2009
Location: Brazil
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
Kernel 2.6.32 on Slackware 13.1 ( default install )


Using kernel 2.6.32, what advices or recommendations when compiling software from source or 3rd. It's a dumb question but I ask me if in a production server ?!.I'm aware about glibc and kernel-headers (http://www.linuxquestions.org/questi...headers-194957 Thanks again, gnashley )

Norton Luiz.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-20-2010, 08:05 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
I thought about running .32 too, but decided it'd be too risky running a kernel older than that used to build libc + headers (the kernel interface may have changed in a incompatible way).

I briefly thought about rebuilding libc against .32, but that's starting to get a little too involved and I'm not sure whether I'd then have to rebuild everything else too (I suspect I would).
 
1 members found this post helpful.
Old 06-20-2010, 09:15 PM   #3
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
I thought you would only have issues when using new features from new kernels. Slackware's GLIBC is built with compatibility back to 2.6.18.

If you read the docs included with glibc, it says this.
Quote:
--enable-kernel=VERSION'
This option is currently only useful on GNU/Linux systems. The
VERSION parameter should have the form X.Y.Z and describes the
smallest version of the Linux kernel the generated library is
expected to support. The higher the VERSION number is, the less
compatibility code is added, and the faster the code gets.

1.8. What version of the Linux kernel headers should be used?

{AJ,UD} The headers from the most recent Linux kernel should be used. The
headers used while compiling the GNU C library and the kernel binary used
when using the library do not need to match. The GNU C library runs without
problems on kernels that are older than the kernel headers used. The other
way round (compiling the GNU C library with old kernel headers and running
on a recent kernel) does not necessarily work. For example you can't use
new kernel features if you used old kernel headers to compile the GNU C
library.
Code:
uname -a
Linux disturbed1 2.6.32.14-x4 #1 SMP Fri May 28 05:39:51 EDT 2010 x86_64 AMD Athlon(tm) II X4 620 Processor AuthenticAMD GNU/Linux
I haven't noticed any issues so far.

One thing that usually causes problems, is when you compile software on one system with a newer glibc, and attempt to use that binary package on another system with an older glibc.
 
2 members found this post helpful.
Old 06-20-2010, 09:31 PM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Just as a test I built 2.6.32.15 on 13.1 and didn't notice any problems, but I didn't do much with it.
 
Old 06-21-2010, 04:11 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Thanks damgar. I wasn't aware of that compatibility option. That would seem to suggest that everything should be fine with running 2.6.32 on Slackware 13.1.

Strangely, this quote is a little bit odd:
Quote:
The other way round (compiling the GNU C library with old kernel headers and running
on a recent kernel) does not necessarily work.
Isn't that the most common way that it tends to happen? People run their distro's default libc but with newer kernels as they come out? Perhaps they're only talking about the situation when the headers used to compile the libc are older than the kernel you're running on but that kernel is still older than libc is. If the kernel is younger than libc then there's not going to be any support for any new features that are in there anyway. God this is confusing! I start to see why the OpenBSD guys insist on keeping kernel/system/headers and libc all in step with each other for each release now.

Anyway, thanks for the info. I've learnt something new here.
 
Old 06-21-2010, 05:20 AM   #6
nortonlui
LQ Newbie
 
Registered: Oct 2009
Location: Brazil
Distribution: Slackware
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks,

disturbed1, GazL and damgar.
 
Old 06-21-2010, 05:21 AM   #7
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by GazL View Post
Isn't that the most common way that it tends to happen?
I think they're referring to upgrading the kernel headers.

For years, my main OS had the headers from linux-2.4.31 installed. I had upgraded the kernel several times over the years, even into the 2.6 series. In the end, it still had the 2.4.31 headers and ran for 12 months on linux-2.6.16.22 before I started afresh with a clean install.

To answer the OP's question, your system will be perfectly stable as long as you don't touch glibc or the kernel headers. You can use any kernel you want, back to version 2.6.18.

Last edited by rkelsen; 06-21-2010 at 05:50 AM.
 
2 members found this post helpful.
Old 06-21-2010, 08:10 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by rkelsen View Post
I think they're referring to upgrading the kernel headers.
I'm not sure that's it. Re-reading that section, I think they mean exactly what they say:
Quote:
compiling the GNU C library with old kernel headers and running on a recent kernel does not necessarily work.
Their example citing "availability of new features" seems to support this.


However, nothing gets removed from the kernel without spending a significant amount of time in a 'deprecated' state, and while new kernel features will not be available to a library compiled against older headers, they'll not be getting used either. So, while it "does not necessarily work", it actually does tend to work in practice, and that is pretty much the status quo for most of our systems.

I think they're just being cautious and warning that there's no guarantee it won't break on a newer kernel.


Anyway, in summary it seems that:
  • The kernel headers used to compile libc should remain frozen at the version used to build it.
  • Compatibility with older kernels is provided by compatibility code included in the library at build time with the --enable-kernel= option.
  • Newer kernels may not necessarily work with an older libc, but in practice they do tend to, and we do it all the time.

Does that sound about right?

Last edited by GazL; 06-21-2010 at 08:15 AM.
 
Old 06-21-2010, 08:13 AM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by damgar View Post
Just as a test I built 2.6.32.15 on 13.1 and didn't notice any problems, but I didn't do much with it.
damgar, just curious. what kernel .config file did you start with?
 
Old 06-21-2010, 08:38 AM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by GazL View Post
I'm not sure that's it.
This post to the LKML might help explain it a bit. Despite it's age, the information it contains is still relevant and correct.
http://lkml.indiana.edu/hypermail/li...07.3/0587.html

To clear things up a bit, Linus is referring to the headers under /usr/include/. These are the ones used to compile glibc.

To muddy the waters, Debian breaks the kernel source tree out into several packages. To what end, I don't know... but the one containing the in-tree kernel headers is called, "kernel-headers." They call the /usr/include headers, "libc headers." I've had a couple of arguments here with Debian users, due to this confusion.

Slackware doesn't break up the kernel source tree, so the "kernel-headers" package on a Slackware box is the one used to compile glibc. This should never be upgraded unless there is a new glibc package to go with it.

Cheers,

Rob
 
1 members found this post helpful.
Old 06-21-2010, 09:57 AM   #11
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by rkelsen View Post

To muddy the waters, Debian breaks the kernel source tree out into several packages. To what end, I don't know... but the one containing the in-tree kernel headers is called, "kernel-headers." They call the /usr/include headers, "libc headers." I've had a couple of arguments here with Debian users, due to this confusion.
Hmm, those zany debian guys!

Actually, I think they have a point labelling the package containing /usr/include headers as libc headers. I don't really see the value of breaking out the in-tree headers into a separate package though. Maybe it'll allow you to build 3rd party kernel modules without having to install the full kernel source, but I don't really see why you'd be worried about that.

Thanks for the link to Linus' post Rob. I had read that before, and I'm pretty happy I understand what's going on now.
 
Old 06-21-2010, 04:31 PM   #12
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by GazL View Post
damgar, just curious. what kernel .config file did you start with?
I keep a kind of "stock-custom" kernel config. Basically it's a slackware-generic, with ext3/4 built in, PAE, timers, CPU, etc customized. It tends to get updated with the defaults from "make oldconfig" for each new kernel I build (whenever versions, RC's or boredom cause me to check out the new kernels) unless I see something that pertains to my setup particularly. I actually used the 2.6.33.3 config file because it was the oldest version I had on the machine I was working with at the time.
 
  


Reply



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
which file is the default kernel config for the slackware install cd Old_Fogie Slackware 3 12-19-2009 04:49 PM
[SOLVED] Slackware 12.2 Default Install eth0 not found sycarion Linux - Networking 8 10-09-2009 03:55 AM
Linksys gateway setup with Slackware 10.2 default kernel Flz Linux - Networking 2 03-29-2006 03:50 PM
How to install linux on a no-default-install-kernel-compatible controller ? DukeMC Linux - Hardware 2 11-20-2003 03:37 AM
Default Slackware kernel Wynd Slackware 1 06-03-2003 06:18 PM

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

All times are GMT -5. The time now is 06:37 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