When I tried to enable PPP in the Ubuntu machine the following error occurred after menuconfig
and trying to make the kernel:
$ sudo make
make[1]: *** No rule to make target `arch/x86/entry/syscalls/syscall_32.tbl', needed by `arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop.
make: *** [archheaders] Error 2
Ubuntu version linux-headers-4.2.0-27-generic was used.
Please help me to fix it.
This could be a syntax error when using $(PWD)
. Consider changing this:
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
to this:
all:
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
This solved my problem.
Short version:
This is not the complete kernel you are building. Maybe it's just the headers, or something else incomplete. Make sure it's the full kernel sources.
Long version:
Not sure on the Ubuntu way of doing it... it seems the normal way doesn't work on ubuntu, eg just for modules (not what you want):
apt-get install linux-headers-...
cd /lib/modules/$(uname -r)/build
make modules_prepare
Or for a whole kernel like you want, also doesn't work for me (Ubuntu 16.04):
apt-get install linux-source-...
cd /lib/modules/$(uname -r)/build
make menuconfig
make bindeb-pkg
(note that make bindeb-pkg
is not the pure ubuntu/debian way to build... you use the make-kpkg
command or something else)
They don't have the build link made for you, and the build fails like yours if you symlink the headers there and copy the .config file. So here's the alternative I have so far, eg. for ubuntu 16.04 with kernel 4.4.16):
cd /usr/src
apt-get source linux-image-4.4.0
cd linux-4.4.16
cp /boot/config-$(uname -r) .config
make modules_prepare
but the last method is for a kernel that does not match the running one... I don't know if that works for you (It didn't for me, to build an out of tree module, so I also did make bindeb-pkg
and dpkg -i ../linux-...
installed the result)
Alternative to using apt-get source ...
, for the ubuntu sources, you can get the vanilla sources as tgz files from kernel.org or via git.