[SOLVED] Compiling Older kernel with new kernel headers
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
For reasons that I have no control over I am having to compile a Linux 2.6.19 kernel. This kernel has been fiddled with by linksys so upgrading it may or may not be possible. The problem I am having is when I attempt to compile it I am getting an error saying 'PATH_MAX' undeclared in sumversion.c. I suspect that this is due to me having sanitized kernel headers from Linux 2.6.30. One good note is that linksys provided in the tarball a tool chain but I am having issues being able to get the make file in the kernel to use the that tool chain instead of mine. Anyone got any ideas on what I can do?
What do you mean by "having sanitized kernel headers from Linux 2.6.30". Are you saying that you've removed the header files that linksys supplied and replaced them with something else? If so, that's not too likely to compile as they make changes to kernel structures with just about every version. If you're talking about some externel header folder (outside of your kernel source tree), then that's irrelevant to the compilation to the kernel.
No my kernel headers that I used to build glibc with is from kernal 2.6.30 I have not replaced them but I thought GCC will link with whatever it has for its spec. Unless the kernel make file does things differently. Again my question remains even if all this talk of headers is nonsense why is the kernel not building?
Again my question remains even if all this talk of headers is nonsense why is the kernel not building?
What command are you using? What exactly is the error response? If it's a generic type of error, maybe I can help. If it's something specific to gentoo, maybe not.
Hehe I fixed my own issue. Apparently back in the 2.6.1 - 22 kernels sumversion.c did not have a required include in it and it would cause this error on newer compiles for some reason. The file is mising a #include<limits.h> in the header. I added it back in and now it seams to be compiling fine. Thanks for responding tho.
Last edited by exvor; 12-13-2009 at 07:57 PM.
Reason: Clarifying some stuff
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.