I get an error when trying to compile Linux kernel 3.8.0-32 on Elementary OS Luna, based on Ubuntu. I have a Lenovo S400 notebook, and the command I used is:

sudo make-kpkg --initrd --append-to-version=-sergiykhalymonkernel kernel_image kernel_headers

...which caused the following error:

exec make kpkg_version=12.036+nmu2 -f /usr/share/kernel-package/ruleset/minimal.mk debian APPEND_TO_VERSION=-sergiykhalymonkernel  INITRD=YES 
====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 12.036+nmu2.
test -d debian             || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
test -f debian/control || sed         -e 's/=V/'  \
                -e 's/=D/'         -e 's/=A/amd64/g'  \
        -e 's/=SA//g'  \
        -e 's/=I//g'                    \
        -e 's/=CV/3.8/g'                \
        -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'             \
        -e 's/=ST/linux/g'      -e 's/=B/x86_64/g'    \
                  /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/'       \
            -e 's/=D/'        -e 's/=A/amd64/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/x86_64/g'         \
            -e 's/=M/Unknown Kernel Package Maintainer <[email protected]>/g'                            \
             /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp 
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-32'
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make EXTRAVERSION=.10-sergiykhalymonkernel   ARCH=x86_64 \
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-32'
scripts/kconfig/conf --oldconfig Kconfig
# configuration written to .config
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-32'
make EXTRAVERSION=.10-sergiykhalymonkernel   ARCH=x86_64 prepare
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-32'
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-32'
make[2]: Entering directory `/usr/src/linux-headers-3.8.0-32'
make[3]: *** No rule to make target `/usr/src/linux-headers-3.8.0-32/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'.  Stop.
make[2]: *** [archheaders] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-32'
make[1]: *** [debian/stamp/conf/kernel-conf] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-32'
make: *** [debian/stamp/conf/minimal_debian] Error 2
Failed to create a ./debian directory:  at /usr/bin/make-kpkg line 984.

I have installed all the software necessary for compiling, and I don't know what could have caused the error. What can I do about it? Thanks for the help!

UPDATE I downloaded a different kernel and it is well compiled. Thanks for answer!


2 Answers 2


I am not familiar with ElementaryOS, but from the look of your error I am wondering whether you are missing the whole source code tree. In my Debian/Ubuntu sysems, I have a Makefile at

/usr/src/linux-headers-$(uname -r)/arch/x86/syscalls/

The Makefile seems to require the whole source tree: I will quote just a few lines,

 syscall32 := $(srctree)/$(src)/syscall_32.tbl
 syscall64 := $(srctree)/$(src)/syscall_64.tbl

to substantiate my suspicion.

So you will have to install the whole source code. You have two distinct possibilities,

  1. get the source package for your kernel and rebuild it
  2. get a mainline kernel directly from kernel.org and build it.

I was getting this error on Ubuntu 14.04 and I ran the following and it cleared it right up:

sudo apt-get install bc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .