Skip to content

Problem when linux-lts-6.6.20, warning is treated as error and fails compilation

Description:

Yesterday, during full system upgrade linux-lts-headers reach 6.6.19 (now is 6.6.20) upgrade over DDE, the computer freeze and forced to shutdown. At restart /vmlinuz-linux-lts was not found, then after arch-chroot /mnt I upgrade again but the following issue arise.

Additional info:

Steps to reproduce:

  1. sudo pacman -Syu # new lts kernel is arriving or sudo pacman -Syu linux-lts-headers
warning: linux-lts-headers-6.6.20-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-lts-headers-6.6.20-1

Total Installed Size:  124.34 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-lts-headers                                                                                                           [----------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating module dependencies...
(3/4) Install DKMS modules
==> dkms install --no-depmod deepin-anything/5.0.18 -k 6.6.20-1-lts
Error! Bad return status for module build on kernel: 6.6.20-1-lts (x86_64)
Consult /var/lib/dkms/deepin-anything/5.0.18/build/make.log for more information.
==> WARNING: `dkms install --no-depmod deepin-anything/5.0.18 -k 6.6.20-1-lts' exited 10
DKMS make.log for deepin-anything-5.0.18 for kernel 6.6.20-1-lts (x86_64)
Sun Mar  3 11:49:59 -05 2024
make: Entering directory '/usr/lib/modules/6.6.20-1-lts/build'
  CC [M]  /var/lib/dkms/deepin-anything/5.0.18/build/vfs_utils.o
  CC [M]  /var/lib/dkms/deepin-anything/5.0.18/build/arg_extractor.o
  CC [M]  /var/lib/dkms/deepin-anything/5.0.18/build/vfs_change.o
  CC [M]  /var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.o
In file included from ./include/linux/string.h:294,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/paravirt.h:17,
                 from ./arch/x86/include/asm/cpuid.h:62,
                 from ./arch/x86/include/asm/processor.h:19,
                 from ./arch/x86/include/asm/timex.h:5,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /var/lib/dkms/deepin-anything/5.0.18/build/vfs_utils.c:24:
In function ‘strcpy’,
    inlined from ‘parse_mounts_info’ at /var/lib/dkms/deepin-anything/5.0.18/build/vfs_utils.c:120:3:
./include/linux/fortify-string.h:798:17: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter)
  798 |                 __write_overflow();
      |                 ^~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/deepin-anything/5.0.18/build/vfs_utils.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ./include/linux/linkage.h:7,
                 from ./include/linux/kernel.h:17,
                 from /var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.c:23:
/var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.c: In function ‘init_module’:
./include/linux/export.h:29:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   29 | #define THIS_MODULE (&__this_module)
      |                     ~^~~~~~~~~~~~~~~
      |                      |
      |                      struct module *
/var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.c:778:35: note: in expansion of macro ‘THIS_MODULE’
  778 |     class_wrbuffer = class_create(THIS_MODULE, CLASS_NAME);
      |                                   ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
                 from ./include/linux/cdev.h:8,
                 from /var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.c:36:
./include/linux/device/class.h:230:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
  230 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.c:778:22: error: too many arguments to function ‘class_create’
  778 |     class_wrbuffer = class_create(THIS_MODULE, CLASS_NAME);
      |                      ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
  230 | struct class * __must_check class_create(const char *name);
      |                             ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/deepin-anything/5.0.18/build/vfs_kretprobes.o] Error 1
make[1]: *** [/usr/lib/modules/6.6.20-1-lts/build/Makefile:1913: /var/lib/dkms/deepin-anything/5.0.18/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.6.20-1-lts/build'

Comment

In GitHub repository, I list some patches related with looks like error.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information