4

Summary

I recently upgraded from Ubuntu 20.04 to 22.04, and ever since then, I have been unable to install the kernel headers without an error. Originally, I had errors from missing flex and bison. After manually installing those, I've run into the error below, which I am unable to resolve.

Error

Trying to install linux-headers-5.15.0-47-generic (and several older versions) fails with a bad return status from make during the dkms module build.

Apt says to check the make log, which has the following error:

No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl',
             needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'

Full apt output

$ sudo apt install --reinstall linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 2,898 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-5.15.0-47-generic amd64 5.15.0-47.51 [2,898 kB]
Fetched 2,898 kB in 0s (6,016 kB/s)                       
(Reading database ... 191529 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.15.0-47-generic_5.15.0-47.51_amd64.deb ...
Unpacking linux-headers-5.15.0-47-generic (5.15.0-47.51) over (5.15.0-47.51) ...
Setting up linux-headers-5.15.0-47-generic (5.15.0-47.51) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-47-generic

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area...(bad exit status: 2) make -j4 KERNELRELEASE=5.15.0-47-generic all INCLUDEDIR=/lib/modules/5.15.0-47-generic/build/include KVERSION=5.15.0-47-generic DKMS_BUILD=1....(bad exit status: 2) Error! Bad return status for module build on kernel: 5.15.0-47-generic (x86_64) Consult /var/lib/dkms/evdi/5.2.14/build/make.log for more information. ...done.

Full contents of the make log

$ sudo cat /var/lib/dkms/evdi/5.2.14/build/make.log
DKMS make.log for evdi-5.2.14 for kernel 5.15.0-47-generic (x86_64)
Sat Sep  3 09:55:26 AM CDT 2022
make KBUILD_VERBOSE=1 SUBDIRS=/var/lib/dkms/evdi/5.2.14/build SRCROOT=/var/lib/dkms/evdi/5.2.14/build CONFIG_MODULE_SIG= -C /lib/modules/5.15.0-47-generic/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-47-generic'
: "  SYNC    include/config/auto.conf.cmd"
make -f ./Makefile syncconfig
make -f ./scripts/Makefile.build obj=scripts/basic
  gcc -Wp,-MMD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89         -o scripts/basic/fixdep scripts/basic/fixdep.c   
make -f ./scripts/Makefile.build obj=scripts/kconfig syncconfig
  gcc -Wp,-MMD,scripts/kconfig/.conf.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/conf.o scripts/kconfig/conf.c
  gcc -Wp,-MMD,scripts/kconfig/.confdata.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/confdata.o scripts/kconfig/confdata.c
  gcc -Wp,-MMD,scripts/kconfig/.expr.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/expr.o scripts/kconfig/expr.c
  flex -oscripts/kconfig/lexer.lex.c -L scripts/kconfig/lexer.l
  bison -o scripts/kconfig/parser.tab.c --defines=scripts/kconfig/parser.tab.h -t -l scripts/kconfig/parser.y
  gcc -Wp,-MMD,scripts/kconfig/.menu.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/menu.o scripts/kconfig/menu.c
  gcc -Wp,-MMD,scripts/kconfig/.parser.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89      -I ./scripts/kconfig -c -o scripts/kconfig/parser.tab.o scripts/kconfig/parser.tab.c
  gcc -Wp,-MMD,scripts/kconfig/.preprocess.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/preprocess.o scripts/kconfig/preprocess.c
  gcc -Wp,-MMD,scripts/kconfig/.symbol.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/symbol.o scripts/kconfig/symbol.c
  gcc -Wp,-MMD,scripts/kconfig/.util.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89       -c -o scripts/kconfig/util.o scripts/kconfig/util.c
  gcc -Wp,-MMD,scripts/kconfig/.lexer.lex.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89      -I ./scripts/kconfig -c -o scripts/kconfig/lexer.lex.o scripts/kconfig/lexer.lex.c
  gcc   -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kconfig/lexer.lex.o scripts/kconfig/menu.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/kconfig/symbol.o scripts/kconfig/util.o   
scripts/kconfig/conf  --syncconfig Kconfig
make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
make -f ./scripts/Makefile.build obj=scripts/basic
set -e; mkdir -p include/config/; trap "rm -f include/config/.kernel.release.tmp" EXIT; { echo "5.15.46$(sh ./scripts/setlocalversion .)"; } > include/config/.kernel.release.tmp; if [ ! -r include/config/kernel.release ] || ! cmp -s include/config/kernel.release include/config/.kernel.release.tmp; then : '  UPD     include/config/kernel.release'; mv -f include/config/.kernel.release.tmp include/config/kernel.release; fi
make -f ./scripts/Makefile.asm-generic obj=arch/x86/include/generated/uapi/asm \
generic=include/uapi/asm-generic
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'.  Stop.
make[1]: *** [arch/x86/Makefile:217: archheaders] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-47-generic'
make: *** [Makefile:22: all] Error 2

1 Answers1

6

Kernel headers do not need to be "built". They are installed as a deb package.

They are properly installed. Installation of kernel packages triggers dkms build that fails.

The make.log is about building a dkms module that you've previously installed.

The module is called evdi. I am not familiar with this module and don't know what it is for.

It seems to be incompatible with the running kernel.

You can remove the module by

sudo dkms remove evdi/5.2.14 --all

and the error will go away.

Pilot6
  • 92,041