No rule to make target 'scripts/module.lds' while building out-of-tree modules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| linux (Debian) |
Fix Released
|
Unknown
|
||
| linux (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
kernel v5.10-rc1 introduced a change ( 596b0474d3d9 "kbuild: preprocess module linker script" ) that affects where and how scripts/module.lds is used and causes external modules to fail to build since that linker script is not shipped in the linux-{
I've been testing the mainline PPA kernel v5.10-rc5 and today installed v4l2loopback-dkms and hit this issue.
It will affect all DKMS packages. Ubuntu carries 39 DKMS packages.
See the LKML discussion:
https:/
DKMS make.log for v4l2loopback-0.12.3 for kernel 5.10.0-
Sun 29 Nov 02:48:58 GMT 2020
Building v4l2-loopback driver...
make -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
MODPOST /var/lib/
make[3]: *** No rule to make target 'scripts/
make[3]: *** Waiting for unfinished jobs....
CC [M] /var/lib/
make[2]: *** [scripts/
make[1]: *** [Makefile:1703: modules] Error 2
make[1]: Leaving directory '/usr/src/
make: *** [Makefile:43: v4l2loopback.ko] Error 2
description: | updated |
description: | updated |
Changed in linux (Ubuntu): | |
status: | New → Incomplete |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Jags Desai (jagsdesai) wrote : | #2 |
I too am getting the same error:
make[3]: *** No rule to make target 'scripts/
while trying to install wireless drivers for (1) RTL88x2BU and (2) RTL8192EU for Kernel 5.10 RC6 on Ubuntu MATE 20.10
(1) Error and "make.log" for RTL88x2BU:
Building module fails on Kernel 5.10 RC6 in Ubuntu MATE Groovy 20.10 with the following error message:
````
root@um:
root@um:
Creating symlink /var/lib/
DKMS: add completed.
root@um:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' -j12 KVER=5.
Error! Bad return status for module build on kernel: 5.10.0-
Consult /var/lib/
root@um:
````
/var/lib/
````
DKMS make.log for rtl88x2bu-git for kernel 5.10.0-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
Jags Desai (jagsdesai) wrote : | #3 |
(2) Error and "make.log" for RTL8192EU:
Building module fails on Kernel 5.10 RC6 in Ubuntu MATE Groovy 20.10 with the following error message:
````
admn@um:
admn@um:
admn@um:
Creating symlink /var/lib/
DKMS: add completed.
admn@um:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' all KVER=5.
Error! Bad return status for module build on kernel: 5.10.0-
Consult /var/lib/
admn@um:
````
/var/lib/
````
DKMS make.log for rtl8192eu-1.0 for kernel 5.10.0-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
Timo Aaltonen (tjaalton) wrote : | #4 |
fixed since Ubuntu-
d599f8f68c47774 UBUNTU: [Debian] Include scripts/module.lds from builddir in headers package
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
kamiccolo (kamicc) wrote : | #5 |
Still got similar issue even trying to install linux-modules-
Building module:
cleaning build area...
KVER=5.
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.10.1-
Consult /var/lib/
...done.
And relevant build log:
DKMS make.log for fwts-efi-
Sat Dec 19 06:24:24 EET 2020
make -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
MODPOST /var/lib/
CC [M] /var/lib/
make[3]: *** No rule to make target 'scripts/
scripts/
make[2]: *** [__modpost] Error 2
Makefile:1709: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/usr/src/
Makefile:23: recipe for target 'all' failed
make: *** [all] Error 2
Jags Desai (jagsdesai) wrote : | #6 |
I too am getting errors with kernel 5.10.2 while building wireless driver modules:
/etc/kernel/
* dkms: running auto installation service for kernel 5.10.2-
Error-1 for RTL8192EU:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' all KVER=5.
Error! Bad return status for module build on kernel: 5.10.2-
Consult /var/lib/
Make.log:
DKMS make.log for rtl8192eu-1.0 for kernel 5.10.2-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M]...
Jags Desai (jagsdesai) wrote : | #7 |
Error-2 for RTL88x2BU:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' -j12 KVER=5.
Error! Bad return status for module build on kernel: 5.10.2-
Consult /var/lib/
Make.log:
DKMS make.log for rtl88x2bu-git for kernel 5.10.2-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
Jags Desai (jagsdesai) wrote : | #8 |
If anyone come across this looking for a workaround, here's a quick fix I've found on a GitHub repo for RTL8192EU
https:/
sudo wget https:/
sudo sed -i '$ d' /usr/src/
I had already reported this as bug 1906072 two days before this bug was opened.
But I guess since this is where the activity happens, someone should mark my bug as duplicate of this.
I'm still getting this error on https:/
kamiccolo (kamicc) wrote : | #11 |
Interestingly, it wasn't the issue with 5.10.0-rc5.
Jags Desai (jagsdesai) wrote : | #12 |
Still getting errors with kernel 5.11 RC2 while building wireless driver modules.
Though the quick fix still works as detailed in comment #8:
https:/
Error:
'make' -j12 KVER=5.
Error! Bad return status for module build on kernel: 5.11.0-
Consult /var/lib/
...done.
Make.log:
DKMS make.log for rtl88x2bu-git for kernel 5.11.0-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
CC [M] /var/lib/
...
Nguyen Khanh Long (longengie) wrote : | #13 |
Got this issue when update Ubuntu kernel to 5.10.7-051007 and got this problem when install rtl8821ce driver.
Seem like new Debian kernel including 5.10 > 5.11 trying to change module.lsb to module.lsb.S but the dkms cannot read the S file extension and trying to grab the lsb file and that where the problem occur.
So here the solution that I use to fix this issue. Go to usr/src/
The file that I attached here is for 5.10 kernel, if you're in 5.10, you can use this module. Maybe I will create the issue in DKMS.
Axel Siebenwirth (asiebenwirth) wrote : | #14 |
This is happening to my NVIDIA module build with kernel 5.10.12 as well.
root@jaxel:~# dpkg-reconfigure nvidia-dkms-460
Removing all DKMS Modules
Done.
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.
INFO:Enable nvidia
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
DEBUG:Parsing /usr/share/
Loading new nvidia-460.39 DKMS files...
Building for 5.9.16-
Building for architecture x86_64
Building initial module for 5.9.16-
Secure Boot not enabled on this system.
Done.
nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
depmod...
DKMS: install completed.
Building initial module for 5.10.12-
ERROR (dkms apport): kernel package linux-headers-
Error! Bad return status for module build on kernel: 5.10.12-
Consult /var/lib/
--- /var/lib/
make -f ./scripts/
sed 's/ko$/o/' /var/lib/
make -f ./scripts/
make[3]: *** No rule to make target 'scripts/
make[3]: *** Waiting for unfinished jobs....
cc -Wp,-MMD,
https:/
This is NOT_A_BUG , just a new feature starting from the kernels 5.10.0 onwards.
The patch which made this mess is the following:
https:/
Please, read the following net pointer how to handle the patch:
https:/
For the practical implementation, please, read the following net pointer (answer 2):
https:/
Zee
Here is practical explanation how to add this feature to the kernel modules (modules_prepare) compilation/
https:/
Zee
Changed in linux (Debian): | |
status: | Unknown → Fix Released |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1906131
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.