[Pkg-zfsonlinux-devel] Bug#1089578: zfs-dkms: fails to build on linux-image-6.12.3-amd64

Giacomo Mulas giacomo.mulas at inaf.it
Mon Dec 9 09:32:54 GMT 2024


Package: zfs-dkms
Version: 2.2.6-2
Severity: important

Dear Maintainer,

apparently some kmem_cache_* macros/functions are now defined in linux-headers-6.12.3-common/include/linux/slab.h and conflict with the ones in include/os/linux/spl/sys/kmem_cache.h of zfs-dkms.
zfs-dkms thereby fails to compile on linux-image-6.12.3-amd64 with the following error:

DKMS make.log for zfs-2.2.6 for kernel 6.12.3-amd64 (x86_64)
lun 9 dic 2024, 10:14:48, CET
make  all-recursive
make[1]: ingresso nella directory «/var/lib/dkms/zfs/2.2.6/build»
Making all in module
make[2]: ingresso nella directory «/var/lib/dkms/zfs/2.2.6/build/module»
mkdir -p os/linux/spl/
mkdir -p avl/ icp/ icp/algs/aes/ icp/algs/blake3/ icp/algs/edonr/ icp/algs/modes/ icp/algs/sha2/ icp/algs/skein/ icp/api/ icp/asm-aarch64/blake3/ icp/asm-aarch64/sha2/ icp/asm-arm/sha2/ icp/asm-ppc64/blake3/ icp/asm-ppc64/sha2/ icp/asm-x86_64/aes/ icp/asm-x86_64/blake3/ icp/asm-x86_64/modes/ icp/asm-x86_64/sha2/ icp/core/ icp/io/ icp/spi/ lua/ lua/setjmp/ nvpair/ os/linux/zfs/ unicode/ zcommon/ zfs/ zstd/ zstd/lib/common/ zstd/lib/compress/ zstd/lib/decompress/
make -C /lib/modules/6.12.3-amd64/build CC=x86_64-linux-gnu-gcc-14 \
	  \
	M="$PWD"  O=/lib/modules/6.12.3-amd64/build CONFIG_ZFS=m modules
make[3]: ingresso nella directory «/usr/src/linux-headers-6.12.3-amd64»
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-atomic.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-condvar.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-cred.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-err.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-generic.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-kmem-cache.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-kmem.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-kstat.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-proc.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-procfs-list.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-shrinker.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-taskq.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.o
In file included from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-proc.c:32:
/var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem_cache.h:205:9: warning: "kmem_cache_create" redefined
  205 | #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-6.12.3-common/include/linux/fs.h:45,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/compat.h:17,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/ia32.h:7,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/elf.h:10,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/elf.h:6,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/module.h:19,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kstat.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-proc.c:30:
/usr/src/linux-headers-6.12.3-common/include/linux/slab.h:404:9: note: this is the location of the previous definition
  404 | #define kmem_cache_create(__name, __object_size, __args, ...)           \
      |         ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-generic.c:31:
/var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem_cache.h:205:9: warning: "kmem_cache_create" redefined
  205 | #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-6.12.3-common/include/linux/fs.h:45,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/compat.h:17,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/ia32.h:7,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/elf.h:10,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/elf.h:6,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/module.h:19,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/sysmacros.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-generic.c:27:
/usr/src/linux-headers-6.12.3-common/include/linux/slab.h:404:9: note: this is the location of the previous definition
  404 | #define kmem_cache_create(__name, __object_size, __args, ...)           \
      |         ^~~~~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-trace.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-tsd.o
  CC [M]  /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-vmem.o
/var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.c: In function ‘issig’:
/var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.c:186:28: error: passing argument 1 of ‘dequeue_signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  186 |         if (dequeue_signal(task, &set, &__info) != 0) {
      |                            ^~~~
      |                            |
      |                            struct task_struct *
In file included from /usr/src/linux-headers-6.12.3-common/include/linux/rcuwait.h:6,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/percpu-rwsem.h:7,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/fs.h:33,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/compat.h:17,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/ia32.h:7,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/elf.h:10,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/elf.h:6,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/module.h:19,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/thread.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.c:26:
/usr/src/linux-headers-6.12.3-common/include/linux/sched/signal.h:279:37: note: expected ‘sigset_t *’ but argument is of type ‘struct task_struct *’
  279 | extern int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
      |                           ~~~~~~~~~~^~~~
/var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.c:186:34: error: passing argument 2 of ‘dequeue_signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  186 |         if (dequeue_signal(task, &set, &__info) != 0) {
      |                                  ^~~~
      |                                  |
      |                                  sigset_t *
/usr/src/linux-headers-6.12.3-common/include/linux/sched/signal.h:279:61: note: expected ‘kernel_siginfo_t *’ {aka ‘struct kernel_siginfo *’} but argument is of type ‘sigset_t *’
  279 | extern int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
      |                                           ~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.c:186:40: error: passing argument 3 of ‘dequeue_signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  186 |         if (dequeue_signal(task, &set, &__info) != 0) {
      |                                        ^~~~~~~
      |                                        |
      |                                        spl_kernel_siginfo_t * {aka struct kernel_siginfo *}
/usr/src/linux-headers-6.12.3-common/include/linux/sched/signal.h:279:82: note: expected ‘enum pid_type *’ but argument is of type ‘spl_kernel_siginfo_t *’ {aka ‘struct kernel_siginfo *’}
  279 | extern int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
      |                                                                   ~~~~~~~~~~~~~~~^~~~
make[5]: *** [/usr/src/linux-headers-6.12.3-common/scripts/Makefile.build:234: /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-thread.o] Errore 1
make[5]: *** Attesa per i processi non terminati....
In file included from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-generic.c:31:
/var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem_cache.h:205:9: warning: "kmem_cache_create" redefined
  205 | #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/src/linux-headers-6.12.3-common/include/linux/fs.h:45,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/compat.h:17,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/ia32.h:7,
                 from /usr/src/linux-headers-6.12.3-common/arch/x86/include/asm/elf.h:10,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/elf.h:6,
                 from /usr/src/linux-headers-6.12.3-common/include/linux/module.h:19,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/sysmacros.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-generic.c:27:
/usr/src/linux-headers-6.12.3-common/include/linux/slab.h:404:9: note: this is the location of the previous definition
  404 | #define kmem_cache_create(__name, __object_size, __args, ...)           \
      |         ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-vmem.c:27:
/var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem_cache.h:205:9: warning: "kmem_cache_create" redefined
  205 | #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
      |         ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem.h:28,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/vmem.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-vmem.c:26:
/usr/src/linux-headers-6.12.3-common/include/linux/slab.h:404:9: note: this is the location of the previous definition
  404 | #define kmem_cache_create(__name, __object_size, __args, ...)           \
      |         ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-vmem.c:27:
/var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem_cache.h:205:9: warning: "kmem_cache_create" redefined
  205 | #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
      |         ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/kmem.h:28,
                 from /var/lib/dkms/zfs/2.2.6/build/include/os/linux/spl/sys/vmem.h:27,
                 from /var/lib/dkms/zfs/2.2.6/build/module/os/linux/spl/spl-vmem.c:26:
/usr/src/linux-headers-6.12.3-common/include/linux/slab.h:404:9: note: this is the location of the previous definition
  404 | #define kmem_cache_create(__name, __object_size, __args, ...)           \
      |         ^~~~~~~~~~~~~~~~~
make[4]: *** [/usr/src/linux-headers-6.12.3-common/Makefile:1961: /var/lib/dkms/zfs/2.2.6/build/module] Errore 2
make[3]: *** [/usr/src/linux-headers-6.12.3-common/Makefile:236: __sub-make] Errore 2
make[3]: uscita dalla directory «/usr/src/linux-headers-6.12.3-amd64»
make[2]: *** [Makefile:56: modules-Linux] Errore 2
make[2]: uscita dalla directory «/var/lib/dkms/zfs/2.2.6/build/module»
make[1]: *** [Makefile:974: all-recursive] Errore 1
make[1]: uscita dalla directory «/var/lib/dkms/zfs/2.2.6/build»
make: *** [Makefile:878: all] Errore 2

If zfs-dkms can, it should use the native functions in the linux kernel, if available. If instead it needs to use its own spl_* versions of them, it should make sure to #undefine all native kernel macros, and possibly also make sure there is no conflict/superposition with the ones defined as native functions. Till then, zfs-dkms will be unusable with the default amd64 kernel in sid, hence I tagged this bug as "important".

Thanks in advance, best regards

Giacomo Mulas


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (401, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.3-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages zfs-dkms depends on:
ii  debconf [debconf-2.0]  1.5.87
ii  dkms                   3.1.0-1
ii  file                   1:5.45-3+b1
ii  libc6-dev [libc-dev]   2.40-4
ii  libpython3-stdlib      3.12.7-1
ii  lsb-release            12.1-1
ii  perl                   5.40.0-8

Versions of packages zfs-dkms recommends:
ii  linux-libc-dev  6.12.3-1
ii  zfs-zed         2.2.6-2
ii  zfsutils-linux  2.2.6-2

Versions of packages zfs-dkms suggests:
ii  debhelper  13.20

-- debconf information:
* zfs-dkms/note-incompatible-licenses:
  zfs-dkms/stop-build-for-unknown-kernel: true
  zfs-dkms/stop-build-for-32bit-kernel: true


More information about the Pkg-zfsonlinux-devel mailing list