dkms fails to build all modules #140

Closed
opened 2022-08-24 09:24:06 +02:00 by saltedcoffii · 4 comments

When pacman attempts to rebuild dkms modules, this occurs:

$ yay -S linux-hardened-headers
warning: linux-hardened-headers-5.18.19.hardened1-2.1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

warning: insufficient columns available for table display
Packages (1) linux-hardened-headers-5.18.19.hardened1-2.1

Total Installed Size:  134.10 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [---------------------] 100%
(1/1) checking package integrity                   [---------------------] 100%
(1/1) loading package files                        [---------------------] 100%
(1/1) checking for file conflicts                  [---------------------] 100%
(1/1) checking available disk space                [---------------------] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-hardened-headers          [---------------------] 100%
:: Running post-transaction hooks...
(1/6) sync all file systems
(2/6) Arming ConditionNeedsUpdate...
(3/6) Updating module dependencies...
(4/6) Install DKMS modules
==> dkms install --no-depmod ashmem/1 -k 5.18.19-hardened1-2.1-hardened
Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64)
Consult /var/lib/dkms/ashmem/1/build/make.log for more information.
==> WARNING: `dkms install --no-depmod ashmem/1 -k 5.18.19-hardened1-2.1-hardened' exited 10
==> dkms install --no-depmod lkrg/0.9.5 -k 5.18.19-hardened1-2.1-hardened
Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64)
Consult /var/lib/dkms/lkrg/0.9.5/build/make.log for more information.
==> WARNING: `dkms install --no-depmod lkrg/0.9.5 -k 5.18.19-hardened1-2.1-hardened' exited 10
==> dkms install --no-depmod cryptodev-linux/1.12 -k 5.18.19-hardened1-2.1-hardened
Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64)
Consult /var/lib/dkms/cryptodev-linux/1.12/build/make.log for more information.
==> WARNING: `dkms install --no-depmod cryptodev-linux/1.12 -k 5.18.19-hardened1-2.1-hardened' exited 10
==> dkms install --no-depmod binder/1 -k 5.18.19-hardened1-2.1-hardened
Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64)
Consult /var/lib/dkms/binder/1/build/make.log for more information.
==> WARNING: `dkms install --no-depmod binder/1 -k 5.18.19-hardened1-2.1-hardened' exited 10
(5/6) Checking which packages need to be rebuilt
(6/6) sync all file systems

This error additionally occurs when running

# dkms autoinstall

I know this happens with the linux-hardened kernel. It's probable that it also happens on the linux kernel, but I'm not sure, I haven't tested. This occurs on both an x86_64-v2 and x86_64-v3 system. (It was a fatal bug on my x86_64-v3 system as I was using the nvidia-dkms drivers that failed to build, and the graphics environment wouldn't start until I dropped to a TTY and switched to xf86-video-nouveau.) This does not occur on a non-ALHP system.

Here is an output of the DKMS build log for one of the modules. All the logs look similar (cc1 failing).

$ cat /var/lib/dkms/cryptodev-linux/1.12/build/make.log  saltedcoffee@octopus
DKMS make.log for cryptodev-linux-1.12 for kernel 5.18.19-hardened1-2.1-hardened (x86_64)
Wed Aug 24 10:17:07 AM EEST 2022
make -C /lib/modules/5.18.19-hardened1-2.1-hardened/build M=/var/lib/dkms/cryptodev-linux/1.12/build modules
make[1]: Entering directory '/usr/lib/modules/5.18.19-hardened1-2.1-hardened/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.1.1 20220730
  You are using:           gcc (GCC) 12.2.0
  CC [M]  /var/lib/dkms/cryptodev-linux/1.12/build/ioctl.o
  CC [M]  /var/lib/dkms/cryptodev-linux/1.12/build/main.o
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
make[2]: *** [scripts/Makefile.build:289: /var/lib/dkms/cryptodev-linux/1.12/build/main.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:289: /var/lib/dkms/cryptodev-linux/1.12/build/ioctl.o] Error 1
make[1]: *** [Makefile:1844: /var/lib/dkms/cryptodev-linux/1.12/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.18.19-hardened1-2.1-hardened/build'
make: *** [Makefile:27: build] Error 2

This started happening right around the GCC update to 12.2. Perhaps it's because the kernel is built with GCC 12.1 and DKMS is using GCC 12.2? I will test that theory by building linux-hardened using GCC 12.2 and the ALHP makepkg.conf file and report back when the build finishes.

When pacman attempts to rebuild dkms modules, this occurs: ``` $ yay -S linux-hardened-headers warning: linux-hardened-headers-5.18.19.hardened1-2.1 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... warning: insufficient columns available for table display Packages (1) linux-hardened-headers-5.18.19.hardened1-2.1 Total Installed Size: 134.10 MiB Net Upgrade Size: 0.00 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [---------------------] 100% (1/1) checking package integrity [---------------------] 100% (1/1) loading package files [---------------------] 100% (1/1) checking for file conflicts [---------------------] 100% (1/1) checking available disk space [---------------------] 100% :: Running pre-transaction hooks... (1/1) Remove upgraded DKMS modules :: Processing package changes... (1/1) reinstalling linux-hardened-headers [---------------------] 100% :: Running post-transaction hooks... (1/6) sync all file systems (2/6) Arming ConditionNeedsUpdate... (3/6) Updating module dependencies... (4/6) Install DKMS modules ==> dkms install --no-depmod ashmem/1 -k 5.18.19-hardened1-2.1-hardened Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64) Consult /var/lib/dkms/ashmem/1/build/make.log for more information. ==> WARNING: `dkms install --no-depmod ashmem/1 -k 5.18.19-hardened1-2.1-hardened' exited 10 ==> dkms install --no-depmod lkrg/0.9.5 -k 5.18.19-hardened1-2.1-hardened Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64) Consult /var/lib/dkms/lkrg/0.9.5/build/make.log for more information. ==> WARNING: `dkms install --no-depmod lkrg/0.9.5 -k 5.18.19-hardened1-2.1-hardened' exited 10 ==> dkms install --no-depmod cryptodev-linux/1.12 -k 5.18.19-hardened1-2.1-hardened Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64) Consult /var/lib/dkms/cryptodev-linux/1.12/build/make.log for more information. ==> WARNING: `dkms install --no-depmod cryptodev-linux/1.12 -k 5.18.19-hardened1-2.1-hardened' exited 10 ==> dkms install --no-depmod binder/1 -k 5.18.19-hardened1-2.1-hardened Error! Bad return status for module build on kernel: 5.18.19-hardened1-2.1-hardened (x86_64) Consult /var/lib/dkms/binder/1/build/make.log for more information. ==> WARNING: `dkms install --no-depmod binder/1 -k 5.18.19-hardened1-2.1-hardened' exited 10 (5/6) Checking which packages need to be rebuilt (6/6) sync all file systems ``` This error additionally occurs when running ``` # dkms autoinstall ``` I know this happens with the `linux-hardened` kernel. It's probable that it also happens on the `linux` kernel, but I'm not sure, I haven't tested. This occurs on both an x86_64-v2 and x86_64-v3 system. (It was a fatal bug on my x86_64-v3 system as I was using the `nvidia-dkms` drivers that failed to build, and the graphics environment wouldn't start until I dropped to a TTY and switched to `xf86-video-nouveau`.) This does not occur on a non-ALHP system. Here is an output of the DKMS build log for one of the modules. All the logs look similar (cc1 failing). ``` $ cat /var/lib/dkms/cryptodev-linux/1.12/build/make.log saltedcoffee@octopus DKMS make.log for cryptodev-linux-1.12 for kernel 5.18.19-hardened1-2.1-hardened (x86_64) Wed Aug 24 10:17:07 AM EEST 2022 make -C /lib/modules/5.18.19-hardened1-2.1-hardened/build M=/var/lib/dkms/cryptodev-linux/1.12/build modules make[1]: Entering directory '/usr/lib/modules/5.18.19-hardened1-2.1-hardened/build' warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc (GCC) 12.1.1 20220730 You are using: gcc (GCC) 12.2.0 CC [M] /var/lib/dkms/cryptodev-linux/1.12/build/ioctl.o CC [M] /var/lib/dkms/cryptodev-linux/1.12/build/main.o cc1: error: incompatible gcc/plugin versions cc1: error: incompatible gcc/plugin versions cc1: error: failed to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so cc1: error: failed to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so cc1: error: incompatible gcc/plugin versions cc1: error: incompatible gcc/plugin versions cc1: error: failed to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so cc1: error: failed to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so make[2]: *** [scripts/Makefile.build:289: /var/lib/dkms/cryptodev-linux/1.12/build/main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:289: /var/lib/dkms/cryptodev-linux/1.12/build/ioctl.o] Error 1 make[1]: *** [Makefile:1844: /var/lib/dkms/cryptodev-linux/1.12/build] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.18.19-hardened1-2.1-hardened/build' make: *** [Makefile:27: build] Error 2 ``` This started happening right around the GCC update to 12.2. Perhaps it's because the kernel is built with GCC 12.1 and DKMS is using GCC 12.2? I will test that theory by building `linux-hardened` using GCC 12.2 and the ALHP `makepkg.conf` file and report back when the build finishes.
Author

Rebuilding the kernel using GCC 12.2 worked! Perhaps ALHP just needs to rebuild all the linux kernels using GCC 12.2. I'm glad the issue is as simple as a rebuild :)

Rebuilding the kernel using GCC 12.2 worked! Perhaps ALHP just needs to rebuild all the linux kernels using GCC 12.2. I'm glad the issue is as simple as a rebuild :)
Owner

The kernel was built by: gcc (GCC) 12.1.1 20220730
You are using: gcc (GCC) 12.2.0

Yep, this right here is the problem. This is also the reason why we do not build gcc in ALHP, since this would result in the same problem.

Not sure why gcc 12.2 was not used while building linux-hardened, but I'll requeue it.

> The kernel was built by: gcc (GCC) 12.1.1 20220730 > You are using: gcc (GCC) 12.2.0 Yep, this right here is the problem. This is also the reason why we do not build `gcc` in ALHP, since this would result in the same problem. Not sure why gcc 12.2 was not used while building `linux-hardened`, but I'll requeue it.
anonfunc added the bug label 2022-08-24 12:32:24 +02:00
Owner

I removed linux-hardened, so the next build-cycle should pick it up and build it with gcc 12.2. In the meantime pacman should fetch the Archlinux build (may need to downgrade with pacman -Suuy).

I removed `linux-hardened`, so the next build-cycle should pick it up and build it with gcc 12.2. In the meantime pacman should fetch the Archlinux build (may need to downgrade with `pacman -Suuy`).
Author

This is fixed

This is fixed
Sign in to join this conversation.