Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-04-2006, 11:15 AM
|
#1
|
Member
Registered: Feb 2006
Distribution: Gentoo, Slackware, Debian, Suse
Posts: 86
Rep:
|
Kernel compiling
I've a few questions about subject:
now I'm working under 2.4.29 kernel, but I want to compile a 2.6.15.6
The problem is that I'll do it for the first time and I don't know how to do it right (universal manuals didn't help, for example in books and README file said about /usr/src/linux but I don't have such a directory)
Also some people told me that usage of kernel 2.6 after 2.4 may cause troubles with dependencies.
|
|
|
05-04-2006, 12:24 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Quote:
n books and README file said about /usr/src/linux but I don't have such a directory
|
You should d/l the sources from kernel.org
Quote:
Also some people told me that usage of kernel 2.6 after 2.4 may cause troubles with dependencies.
|
You only need the newest module-init-tools
As for compiling a 2.6.x kernel there is a nice guide in the top of this forum.
Regards
|
|
|
05-04-2006, 12:46 PM
|
#3
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
/usr/src/linux is just a link to the source of the kernel version. Once you download the kernel source and extract to /usr/src/, create a link to it like so:
Code:
#ln -s /usr/src/linux-2.6.15.6 /usr/src/linux
regards,
...drkstr
|
|
|
05-04-2006, 03:20 PM
|
#4
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
Quote:
Originally Posted by drkstr
/usr/src/linux is just a link to the source of the kernel version. Once you download the kernel source and extract to /usr/src/, create a link to it like so:
Code:
#ln -s /usr/src/linux-2.6.15.6 /usr/src/linux
regards,
...drkstr
|
that link is not needed.
just skip it...
egag
|
|
|
05-04-2006, 03:52 PM
|
#5
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
this is correct, it's use is for simplicity only. I have many different kernel source versions in my /usr/src directory and like to keep the link updated so I don't have to remember which version I currently have installed.
regards,
...drkstr
|
|
|
05-04-2006, 05:27 PM
|
#6
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
`uname -a` would probably save you the hassle of constantly updating your symlink 
|
|
|
05-04-2006, 05:31 PM
|
#7
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
...and that link is also advised in a lot of kernel-howtos.
btw. if you read the README file in the kernel-source tree
you'll see they ( L. T. ) suggest to compile a kernel in your home-dir.
you can do that as a normal user and it keeps the /usr/src clean.
egag
|
|
|
05-04-2006, 11:31 PM
|
#8
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
iptables, cdrtools and a few others completely crap out on the make if you have /usr/src/linux.... Just a bad idea in general to have that link around IMO... I always ignored the kernel devs the past couple years on the subject untill I started to build lots of packages. The 'convienence' factor went right out the window along with my headaches... 
|
|
|
05-05-2006, 12:09 AM
|
#9
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
That's strange, I've had no problems whatsoever with it. I have both iptables and cdrtools and have upgraded to many different kernel versions starting with 2.4.29. I am curious to know what exactly would cause the problem, it is after all just a link. Maybe certain things think it has the same kernel source version in two different directories and gets confused? Can any one expand a little bit more on the reasoning behind this? Or perhaps suggest some reading that specifically states the conflicts it creates? I learn by doing, and until I see a direct problem with the /usr/src/linux, I am going to keep using it. It's not that I don't value your advice, you are probably right about it, I'm just a learn the hard way kind of person.
regards,
...drkstr
|
|
|
05-05-2006, 01:14 AM
|
#10
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Yea, I'm the same way. That's why I used it for so long.
What seems to be happening is that some programs look for the kernel headers by way of /usr/src/linux/include when they should be looking in /usr/include. I'm not entirely sure to tell you the truth but I believe thats what is happening. I was talking about building iptables/cdrtools yourself, not just having it installed. Compile iptables and cdrtools yourself and watch it bomb. I forget what it spit out at me. It basically states the wrong kernel headers were found.
Here's a link that somewhat explains it.
http://linuxmafia.com/faq/Kernel/usr...x-symlink.html
Linus is mostly talking about header symlinks but also mentions the /usr/src symlink. They are infact both directly related. If you use /usr/src/linux your stating (to certain progs) that the kernel headers that were used to build glibc can be found in /usr/src/linux/include. 9 times out of ten we are NEVER using the same kernel that was used against our running glibc.
I could be a little off in my explanation. Regardless of what is really happening, I don't have any more problems since I ditched the symlink.
Incase you missed the very last link in the link I posted above...
"Some source packages indeed search for /usr/src/linux for configuration purposes.If this is not just a default which could, and should, be adjusted then they are simply wrong."
Seems that this is what is happening with iptables/cdrtools. Those maintainers are still using old 'standards' of finding headers. Hmm... Maybe I had 2 kernel versions is /usr/src at the time with a symlink pointing to the wrong one. I forget now. I'm half-tempted to track it down again now that you got me thinking about it.
Last edited by jong357; 05-05-2006 at 01:34 AM.
|
|
|
05-05-2006, 02:06 AM
|
#11
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Well, I just tried to compile both progs and they worked..  Make a liar out of me will ya'?!!
I think what happened with iptables is that I was booting with 2 different kernels and my /usr/src/linux symlink was stale.
-I/usr/src/linux/include
Obviously thats a problem if your symlink isn't point to the running kernel. Use it if you wish or not.... At most, It's just a weak link that has the potential for failure...
|
|
|
05-05-2006, 02:07 AM
|
#12
|
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191
Rep:
|
Thanks for the good info. I'm going to play around with it a bit and see what happens. I'm glad I started posting on LQ, I always seem to be learning new stuff when I least expect it.
regards,
...drkstr
|
|
|
All times are GMT -5. The time now is 12:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|