non-fatal error right after login (just upgraded the kernel to 4.1)

Bug #1487666 reported by Gábor Berényi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bbswitch (Ubuntu)
Confirmed
Undecided
Unassigned
linux (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

During kernel install, the log said (see attachment for the complete log):
[...]
Entering directory '/var/lib/dkms/nvidia-340/340.76/build'
NVIDIA: calling KBUILD...
make[2]: Entering directory '/usr/src/linux-headers-4.1.0-040100rc2-generic'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
[...]

but following that instruction I get more errors:
/usr/src/linux-headers-4.1.0-040100rc2-generic$ sudo make oldconfig && make prepare
[sudo] password for presence:
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
arch/x86/Makefile:129: CONFIG_X86_X32 enabled but no binutils support
Makefile:657: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
scripts/kconfig/conf --silentoldconfig Kconfig

*** Error during update of the configuration.

scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:541: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target 'arch/x86/syscalls/syscall_32.tbl', needed by 'arch/x86/syscalls/../include/generated/asm/syscalls_32.h'. Stop.
arch/x86/Makefile:181: recipe for target 'archheaders' failed
make: *** [archheaders] Error 2

ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: bbswitch-dkms 0.7-2ubuntu1
Uname: Linux 4.1.0-040100rc2-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.3
Architecture: amd64
DKMSKernelVersion: 4.1.0-040100rc2-generic
Date: Fri Aug 21 21:43:25 2015
InstallationDate: Installed on 2014-05-31 (447 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
PackageVersion: 0.7-2ubuntu1
RelatedPackageVersions:
 dpkg 1.17.25ubuntu1
 apt 1.0.9.7ubuntu4.2
SourcePackage: bbswitch
Title: bbswitch-dkms 0.7-2ubuntu1: bbswitch kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gábor Berényi (gabor-berenyi-44) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bbswitch (Ubuntu):
status: New → Confirmed
Revision history for this message
James Cuzella (trinitronx) wrote :
Download full text (3.3 KiB)

After trying to build a different kernel module on Ubuntu 17.04 (Zesty), I can replicate these errors.

The first "error" isn't really an error unless the echo statements are triggered if the "test" command fails:

    test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( [...SNIP...] )

Notice in the part with parentheses that each line is prefixed by: echo >&2 " ... "

This behavior of GNU Make is normal. It will print back the commands it runs unless told not to. If you saw this message without 'echo >&2' in front, it would immediately exit afterwards with a message like:

    make: *** [all] Error 1

This "test -e [...]" command is checking that the mentioned files exist within the Linux Kernel source directory. This directory is mentioned above when Make changes into it: "/usr/src/linux-headers-4.1.0-040100rc2-generic"

The two files it is checking exist are therefore:

    /usr/src/linux-headers-4.1.0-040100rc2-generic/include/generated/autoconf.h
    # AND:
    /usr/src/linux-headers-4.1.0-040100rc2-generic/include/config/auto.conf

You can look for these files yourself to make sure they exist. If so, this particular output from Make can be ignored. If they don't exist, then you can usually follow the instructions for running "make oldconfig && make prepare" within the Linux Kernel source directory to create them.

The second error message you are getting looks like the real one:

    make[1]: *** No rule to make target 'arch/x86/syscalls/syscall_32.tbl', needed by 'arch/x86/syscalls/../include/generated/asm/syscalls_32.h'. Stop.
    arch/x86/Makefile:181: recipe for target 'archheaders' failed
    make: *** [archheaders] Error 2

This error is listed around the Internet surrounding building Linux Kernel modules on Debian (and Fedora) against Linux Kernel source that is missing "syscalls_32.tbl" and "syscalls_32.h" files.

These files should exist in the "Vanilla" Linux Kernel source code which can always be found at kernel.org. However, it appears that some distributions such as Debian and Ubuntu are missing these files in their newer "linux-headers-*" packages.

This appears to be a packaging bug which can be filed against "linux-headers-*" package. The "linux-headers" packages should include these files in order to build kernel modules using them.

The workaround is to get a full copy of the appropriate version of the Linux Kernel source tree by whatever means, and to use this directory to build your modules against.

Note that I'm answering this question based on my personal experience with the linux-headers-4.10.0-37-generic package on Ubuntu 17.04 "Zesty Zapus". I'm under the assumption that this file has been missing from the "linux-headers-*" packages for a while now based on the many instances of people running into this error since 2013 posted on the internet.

If you can somehow locate the "syscalls_32.tbl" and "syscalls_32.h" files within your /usr/src/linux-headers-4.1.0-040100rc2-generic/ directory, then you should check the bbswitch module's source directory Makefile. Sometimes the way an external Kernel Module's Makefile is written prevents it from finding the right linux-headers or /lib/...

Read more...

Changed in linux-meta (Ubuntu):
status: New → Confirmed
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
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.