Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Cannot compile DKMS modules (Read 2117 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Cannot compile DKMS modules

Using `linux{,-headers} 5.16.8.artix1-2` and `gcc 11.2.0-3`, DKMS fails on module compilation.

Relevant info (from zenpower3, but it applies to other modules such as v4l2loopback and vmware-dkms):

Code: [Select]
DKMS make.log for zenpower3-0.2.0 for kernel 5.16.8-artix1-2 (x86_64)
Tue 15 Feb 06:02:03 CET 2022
make[1]: Entering directory '/usr/lib/modules/5.16.8-artix1-2/build'
  CC [M]  /var/lib/dkms/zenpower3/0.2.0/build/zenpower.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/zenpower3/0.2.0/build/zenpower.o] Error 1
make[1]: *** [Makefile:1846: /var/lib/dkms/zenpower3/0.2.0/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.16.8-artix1-2/build'
make: *** [Makefile:27: modules] Error 2


It seems like the kernel was compiled with a different revision of GCC than the one we have in the repos, or something like that.

I am legit worried for nvidia users lol

Edit by qontinuum: add code formatting

Re: Cannot compile DKMS modules

Reply #1
Same problem here with bbswitch DKMS module.
Code: [Select]
DKMS make.log for bbswitch-0.8 for kernel 5.16.8-artix1-2 (x86_64)
Tue Feb 15 10:01:41 *** 2022
make -C /lib/modules/5.16.8-artix1-2/build M="$(pwd)" modules
make[1]: Entering directory '/usr/lib/modules/5.16.8-artix1-2/build'
  CC [M]  /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/bbswitch/0.8/build/bbswitch.o] Error 1
make[1]: *** [Makefile:1846: /var/lib/dkms/bbswitch/0.8/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.16.8-artix1-2/build'
make: *** [Makefile:13: default] Error 2

Re: Cannot compile DKMS modules

Reply #2
Same here, for nvidia-dkms and virtualbox-host-dkms. Solved by downgrading these packages (maybe overkill):

Code: [Select]
# ls -1
binutils-2.36.1-3-x86_64.pkg.tar.zst
gcc-11.1.0-3-x86_64.pkg.tar.zst
gcc-libs-11.1.0-3-x86_64.pkg.tar.zst
lib32-gcc-libs-11.1.0-3-x86_64.pkg.tar.zst
linux-lts-5.15.22-1-x86_64.pkg.tar.zst
linux-lts-headers-5.15.22-1-x86_64.pkg.tar.zst
# pacman -U *

Re: Cannot compile DKMS modules

Reply #3
Code: [Select]
sudo dkms install vboxhost/6.1.32_OSE

Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.15.22-2-lts -C /usr/lib/modules/5.15.22-2-lts/build M=/var/lib/dkms/vboxhost/6.1.32_OSE/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.22-2-lts (x86_64)
Consult /var/lib/dkms/vboxhost/6.1.32_OSE/build/make.log for more information.

Code: [Select]
DKMS make.log for vboxhost-6.1.32_OSE for kernel 5.15.22-2-lts (x86_64)
marți 15 februarie 2022, 10:47:56 +0200
make: Entering directory '/usr/lib/modules/5.15.22-2-lts/build'
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/linux/SUPDrv-linux.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [scripts/Makefile.build:540: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt] Error 2
make[1]: *** Waiting for unfinished jobs....
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrv.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrv.o] Error 1
make[1]: *** [scripts/Makefile.build:540: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv] Error 2
make: *** [Makefile:1868: /var/lib/dkms/vboxhost/6.1.32_OSE/build] Error 2
make: Leaving directory '/usr/lib/modules/5.15.22-2-lts/build'

Re: Cannot compile DKMS modules

Reply #4
The linux and linux-lts kernels have been built with the wrong toolchain so it needs a kernel rebuild.
It should already be fixed in linux-zen and linux-hardened that will reach the stable repos on your mirrors soon if you need to fix it up temporarily..



Re: Cannot compile DKMS modules

Reply #7
I've been using dkms with 5.16.8 for several days now on the newest gcc/glibc version. Not sure what's going on here.

Re: Cannot compile DKMS modules

Reply #8
I've been using dkms with 5.16.8 for several days now on the newest gcc/glibc version. Not sure what's going on here.
I am not sure either, but I just rebuilt the kernel on my local machine and now it all works fine

Re: Cannot compile DKMS modules

Reply #9
If there is need for another dkms module with different kernels.

Code: [Select]
(2/3) Install DKMS modules
==> dkms install --no-depmod acpi_call/1.2.2 -k 5.16.9-zen1-1-zen
==> dkms install --no-depmod acpi_call/1.2.2 -k 5.15.22-2-lts
Error! Bad return status for module build on kernel: 5.15.22-2-lts (x86_64)
Consult /var/lib/dkms/acpi_call/1.2.2/build/make.log for more information.
==> WARNING: `dkms install --no-depmod acpi_call/1.2.2 -k 5.15.22-2-lts' exited 10
==> dkms install --no-depmod acpi_call/1.2.2 -k 5.15.21-hardened1-2.1-hardened
==> dkms install --no-depmod acpi_call/1.2.2 -k 5.16.8-artix1-2
Error! Bad return status for module build on kernel: 5.16.8-artix1-2 (x86_64)
Consult /var/lib/dkms/acpi_call/1.2.2/build/make.log for more information.
==> WARNING: `dkms install --no-depmod acpi_call/1.2.2 -k 5.16.8-artix1-2' exited 10
==> depmod 5.16.9-zen1-1-zen
==> depmod 5.15.21-hardened1-2.1-hardened

Code: [Select]
DKMS make.log for acpi_call-1.2.2 for kernel 5.16.8-artix1-2 (x86_64)
Tue Feb 15 03:13:00 PM CET 2022
make -C /lib/modules/5.16.8-artix1-2/build M=/var/lib/dkms/acpi_call/1.2.2/build modules
make[1]: Entering directory '/usr/lib/modules/5.16.8-artix1-2/build'
  CC [M]  /var/lib/dkms/acpi_call/1.2.2/build/acpi_call.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/acpi_call/1.2.2/build/acpi_call.o] Error 1
make[1]: *** [Makefile:1846: /var/lib/dkms/acpi_call/1.2.2/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.16.8-artix1-2/build'
make: *** [Makefile:8: default] Error 2

Cannot build kernel modules after gcc update

Reply #10
After updating gcc to 11.2.0-3, building kernel modules fail with
Quote
cc1: error: incompatible gcc/plugin versions
as the error message. For example, building vboxhost fails with the following error:

Code: [Select]
DKMS make.log for vboxhost-6.1.32_OSE for kernel 5.16.8-artix1-2 (x86_64)
Tue Feb 15 06:19:44 PM +0330 2022
make: Entering directory '/usr/lib/modules/5.16.8-artix1-2/build'
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetadp/VBoxNetAdp.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/linux/SUPDrv-linux.o
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/SUPR0IdcClient.o] Error 1
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/VBoxNetFlt.o] Error 1
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrv.o
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetadp/VBoxNetAdp.o] Error 1
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/SUPR0IdcClientComponent.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o] Error 1
make[1]: *** [scripts/Makefile.build:549: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetadp] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvSem.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt/linux/SUPR0IdcClient-linux.o] Error 1
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:549: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxnetflt] Error 2
  CC [M]  /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvTracer.o
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrv.o] Error 1
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvGip.o] Error 1
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvSem.o] Error 1
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:287: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv/SUPDrvTracer.o] Error 1
make[1]: *** [scripts/Makefile.build:549: /var/lib/dkms/vboxhost/6.1.32_OSE/build/vboxdrv] Error 2
make: *** [Makefile:1846: /var/lib/dkms/vboxhost/6.1.32_OSE/build] Error 2
make: Leaving directory '/usr/lib/modules/5.16.8-artix1-2/build'

I have also updated linux-headers to 5.16.8.artix1-2.

Edit: Also, I get the same error when I tell dkms to use gcc-10 to build kernel modules.
So, I suspect there's something wrong with linux-headers package, because it supplies the files in "/usr/lib/modules/5.16.8-artix1-2/build/scripts/gcc-plugins/" .

Edit 2: According to https://lkml.org/lkml/2021/3/3/167, the plugins need to be rebuilt because gcc was updated and these modules haven't been built with the latest gcc.
Curiously though, it looks like they've been built by gcc 11.2 .
Code: [Select]
$  readelf -p .comment /usr/lib/modules/5.16.8-artix1-2/build/scripts/gcc-plugins/structleak_plugin.so

String dump of section '.comment':
  [     0]  GCC: (GNU) 11.2.0

Re: Cannot compile DKMS modules

Reply #11
Seems caused by GCC plugin check after the toolchain update. A lot of pkgs may have to be rebuilt. 

Nvidia-dkms broken

Reply #12
Hey guys, Nvidia-dkms seems to be broken. What's up with that? I can't find the downgraded package, having trouble even finding Arch Linux's old repo site

Code: [Select]
==> dkms install --no-depmod nvidia/510.47.03 -k 5.16.8-artix1-2
Error! Bad return status for module build on kernel: 5.16.8-artix1-2 (x86_64)
Consult /var/lib/dkms/nvidia/510.47.03/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/510.47.03 -k 5.16.8-artix1-2' exited 10

 

Re: Nvidia-dkms broken

Reply #13
I managed to have luck with the 'nvidia' package, but that package doesn't work for linux-lts kernel, so I'd be happy to hear when 'nvidia-dkms' is working again

Re: Nvidia-dkms broken

Reply #14
I'm trying the earlier packages but they fail too! I don't know what's going on!
Code: [Select]
==> dkms install --no-depmod nvidia/495.46 -k 5.16.8-artix1-2
Error! Bad return status for module build on kernel: 5.16.8-artix1-2 (x86_64)
Consult /var/lib/dkms/nvidia/495.46/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/495.46 -k 5.16.8-artix1-2' exited 10