Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Since asm-x86 has disappeared from the kernel, how to build 2.6.28 on a x86 platform ?
(i.e. make menuconfig complains about missing asm/socket.h for instance)
It's looking for /usr/include/asm/socket.h which is part of the glibc Linux headers. Make sure you've got the linux-kernel-headers or kernel-headers package installed on your system.
Well, I unbzipped the original file from kernel.org to /usr/src/linux and so far (i.e. with any previous kernels) I have symlinked /usr/include/asm to /usr/src/linux/include/asm-x86 which worked fine.
So, do you mean that I need to recompile glibc as well ?
Quote:
Originally Posted by ilikejam
Hi.
It's looking for /usr/include/asm/socket.h which is part of the glibc Linux headers. Make sure you've got the linux-kernel-headers or kernel-headers package installed on your system.
The glibc headers and the kernel headers aren't necessarily the same. Just remove the symlinks, and install the kernel-headers package and all should be well.
Sorry , I do not understand:
asm/xxx.h comes from kernel.org, why should I replace the correct headers file of the kernel with anything not related to it ?
What do you mean by "kernel-headers" packahge ? is it 2.6.28 bz2 file ?
Quote:
Originally Posted by ilikejam
The glibc headers and the kernel headers aren't necessarily the same. Just remove the symlinks, and install the kernel-headers package and all should be well.
Your copy of glibc was compiled against a certain set of Linux kernel headers. These headers should not be changed unless your compiled version of glibc changes, and it's these headers which should be in /usr/include . The kernel source is completely separate from these headers (unless you're compiling glibc yourself, in which case you may as well use the current kernel headers for this purpose). Basically, the stuff in /usr/include should match your glibc version, not the particular kernel version you happen to be running. To quote Linus:
Quote:
And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
header files, even though I haven't run a 2.2.13 kernel in a _loong_
time. But those headers were what glibc was compiled against, so those
headers are what matches the library object files.
'make menuconfig' attempts to compile the menuconfig system if it's not already been compiled, which requires glibc's version of the kernel headers to be in place (since it's compiling against glibc), and it's at this point that gcc gives up. Actually compiling the kernel itself doesn't need the /usr/include files, but the compile of 'menuconfig' does.
Your copy of glibc was compiled against a certain set of Linux kernel headers. These headers should not be changed unless your compiled version of glibc changes, and it's these headers which should be in /usr/include . The kernel source is completely separate from these headers (unless you're compiling glibc yourself, in which case you may as well use the current kernel headers for this purpose). Basically, the stuff in /usr/include should match your glibc version, not the particular kernel version you happen to be running. To quote Linus:
'make menuconfig' attempts to compile the menuconfig system if it's not already been compiled, which requires glibc's version of the kernel headers to be in place (since it's compiling against glibc), and it's at this point that gcc gives up. Actually compiling the kernel itself doesn't need the /usr/include files, but the compile of 'menuconfig' does.
People that followed the old "symlink-to-usr-from-kernel" style will have this trouble starting with 2.6.28. See the glibc INSTALL file about /usr/include/asm,linux issues (around like 388 in glibc-2.7). Actually, the old asm headers have been moved in 2.6.28. They're now under /usr/src/linux-2.6.28/arch/x86/include/asm instead of /usr/src/linux/include/asm-x86. Somewhere I saw people doing compatibility symlinking between those two (maybe a Gentoo forum?) but I don't know if that is proper or not. This kernel boots way slow. Very odd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.