ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing.

Bug #1916517 reported by shemgp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm unable to build dkms packages since it errors out with:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.0-14-generic/build M=/var/lib/dkms/rtl88x2bu/git/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-14-generic'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [Makefile:745: include/config/auto.conf] Error 1
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-14-generic'
make: *** [Makefile:2378: modules] Error 2

So I run:

make oldconfig && make prepare

in /usr/src/linux-headers-5.10.0-14-generic

and it errors out with:

make[1]: *** No rule to make target 'arch/x86/tools/relocs_32.c', needed by 'arch/x86/tools/relocs_32.o'. Stop.
make: *** [arch/x86/Makefile:214: archscripts] Error 2

Thanks for your help!

ProblemType: Bug
DistroRelease: Ubuntu 21.04
ProcVersionSignature: Ubuntu 5.10.0-14.15-generic 5.10.11
Uname: Linux 5.10.0-14-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu59
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: shemgp 6098 F.... pulseaudio
 /dev/snd/controlC1: shemgp 6098 F.... pulseaudio
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Feb 23 00:59:55 2021
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-09-28 (1974 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
MachineType: LENOVO 34361A0
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.10.0-14-generic root=UUID=da81a856-84d5-4ca7-8c0a-4f20006730bc ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.10.0-14-generic N/A
 linux-backports-modules-5.10.0-14-generic N/A
 linux-firmware 1.194
SourcePackage: linux
StagingDrivers: ashmem_linux
UpgradeStatus: Upgraded to hirsute on 2021-02-16 (6 days ago)
dmi.bios.date: 09/25/2019
dmi.bios.release: 2.75
dmi.bios.vendor: LENOVO
dmi.bios.version: GCETB5WW (2.75 )
dmi.board.asset.tag: Not Available
dmi.board.name: 34361A0
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.ec.firmware.release: 1.15
dmi.modalias: dmi:bvnLENOVO:bvrGCETB5WW(2.75):bd09/25/2019:br2.75:efr1.15:svnLENOVO:pn34361A0:pvrThinkPadX220:rvnLENOVO:rn34361A0:rvrNotDefined:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.family: ThinkPad X220
dmi.product.name: 34361A0
dmi.product.sku: LENOVO_MT_3436
dmi.product.version: ThinkPad X220
dmi.sys.vendor: LENOVO

Revision history for this message
shemgp (shemgp) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
trombka (trombka) wrote :

I had a similar issue after upgrading to 21.04.
Package linux-headers-<version> silently failed to build these config files due to lack of packages flex and bison.

sudo apt install flex bison
sudo dpkg-reconfigure linux-headers-<version>

solved the problem, although the build still fails, but in a later stage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.