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.
I use Slackware 14.0. Trying to remove unnecessary files I uninstalled kernel-src package. I already had the source, cloned from git. But after I removed it, seems, that standard Include directories, pointing to /usr/src/linux were corrupted. And now I can't run make menuconfig to compile the new kernel:
Quote:
# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:40:0,
from /usr/include/netinet/in.h:25,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:116:
/usr/include/bits/socket.h:384:24: fatal error: asm/socket.h: No such file or directory
How to restore C_INCLUDE_PATH variable, so the compiler could find the include files from kernel source?
/usr/src/linux will symlink to your default kernel, if you remove kernel-src (/usr/src/linux-$YOUR-KERNEL-VERSION) then you have removed the kernel it was pointing too, just remake the symlink to your new downloaded source.
No, man. I have put the source directly into /usr/src/linux without a symlink. And is getting the error. It's something with Include directories for gcc.
No, man. I have put the source directly into /usr/src/linux without a symlink. And is getting the error. It's something with Include directories for gcc.
ok you don't put the source file into the /usr/src/linux directory, this is always a symlink to you kernel source, your include files are located in /usr/src/linux-your-version/include. gcc defaults to look in /usr/src/linux/include for the include files, this is why you always symlink it to what ever kernel your are using.
I did, what you suggested. But still have the same error. I think, that default gcc directories are not including /usr/src/linux. And that's the cause.
Ok if installing the kernel-header packages worked, then removing kernel-source may have remove the original header files, which are found in /usr/include directory, these are the includes that are built against the original gcc version shipped with slackware 14, that would have been my next suggestion should you still have trouble, glad it's all working now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.