Out-of-tree kernel modules can't be built

Bug #1815176 reported by Alexander Fomichev
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Trying to build an external module with gcc 7.3.0 fails with an error similar to:

 CC [M] /home/user/....../ApiFunc.o
In file included from ./include/linux/mmdebug.h:5:0,
                from ./include/linux/gfp.h:5,
                from ./include/linux/slab.h:15,
                from /home/user/......./ApiFunc.c:51:
./include/linux/bug.h:5:10: fatal error: asm/bug.h: No such file or directory
#include <asm/bug.h>
         ^~~~~~~~~~~
compilation terminated.

This problem is already fixed in the linux kernel starting from version 4.17
We need to backport the following patch to Ubuntu kernel:
https://patchwork.kernel.org/patch/10309291/

Tested by me that it helps.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-45-generic 4.15.0-45.48
ProcVersionSignature: Ubuntu 4.15.0-45.48-generic 4.15.18
Uname: Linux 4.15.0-45-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: julia 1360 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Fri Feb 8 12:17:00 2019
InstallationDate: Installed on 2018-12-28 (41 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
MachineType: LENOVO 20M5003QRT
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=4384c2b9-39c0-41fe-a898-ef2c212df2e3 ro quiet splash vt.handoff=1
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-45-generic N/A
 linux-backports-modules-4.15.0-45-generic N/A
 linux-firmware 1.173.3
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/03/2018
dmi.bios.vendor: LENOVO
dmi.bios.version: R0RET31W (1.14 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20M5003QRT
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: None
dmi.modalias: dmi:bvnLENOVO:bvrR0RET31W(1.14):bd08/03/2018:svnLENOVO:pn20M5003QRT:pvrThinkPadL380:rvnLENOVO:rn20M5003QRT:rvrNotDefined:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad L380
dmi.product.name: 20M5003QRT
dmi.product.version: ThinkPad L380
dmi.sys.vendor: LENOVO

Revision history for this message
Alexander Fomichev (alfonder) 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
Brad Figg (brad-figg)
tags: added: bjf-tracking
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.