[GH-ISSUE #143] Build kernel module fail on kernel 6.19.6-x64v3-xanmod1 (Debian Trixie) #88

Closed
opened 2026-10-13 21:06:26 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @AdB0kaT on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/143

Hello! The process of installing the xanmod vesria 6.19.6-x64v3-xanmod1 kernel with the amneziawg module is interrupted by a module compilation error:

Настраивается пакет linux-image-6.19.6-x64v3-xanmod1 (6.19.6-x64v3-xanmod1-0~20260304.ge0b3726) …
Sign command: /lib/modules/6.19.6-x64v3-xanmod1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Autoinstall of module amneziawg/1.0.0 for kernel 6.19.6-x64v3-xanmod1 (x86_64)
Building module(s)....(bad exit status: 2)
Failed command:
make -j16 KERNELRELEASE=6.19.6-x64v3-xanmod1 -C /lib/modules/6.19.6-x64v3-xanmod1/build M=/var/lib/dkms/amneziawg/1.0.0/build LLVM=1

Error! Bad return status for module build on kernel: 6.19.6-x64v3-xanmod1 (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information.

Autoinstall on 6.19.6-x64v3-xanmod1 failed for module(s) amneziawg(10).

Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
update-initramfs: Generating /boot/initrd.img-6.19.6-x64v3-xanmod1
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.19.6-x64v3-xanmod1
Found initrd image: /boot/initrd.img-6.19.6-x64v3-xanmod1
Found linux image: /boot/vmlinuz-6.18.4-x64v3-xanmod1
Found initrd image: /boot/initrd.img-6.18.4-x64v3-xanmod1
Found linux image: /boot/vmlinuz-6.12.63+deb13-rt-amd64
Found initrd image: /boot/initrd.img-6.12.63+deb13-rt-amd64
Found linux image: /boot/vmlinuz-6.1.0-29-amd64
Found initrd image: /boot/initrd.img-6.1.0-29-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
dpkg: ошибка при обработке пакета linux-image-6.19.6-x64v3-xanmod1 (--configure):
 подпроцесс из пакета linux-image-6.19.6-x64v3-xanmod1 установлен сценарий post-installation возвратил код ошибки 1
dpkg: зависимости пакетов не позволяют настроить пакет linux-xanmod-x64v3:
 linux-xanmod-x64v3 зависит от linux-image-6.19.6-x64v3-xanmod1, однако:
  Пакет linux-image-6.19.6-x64v3-xanmod1 пока не настроен.

dpkg: ошибка при обработке пакета linux-xanmod-x64v3 (--configure):
 проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
 linux-image-6.19.6-x64v3-xanmod1
 linux-xanmod-x64v3

Contents of /var/lib/dkms/amneziawg/1.0.0/build/make.log :

DKMS (dkms-3.2.2) make.log for amneziawg/1.0.0 for kernel 6.19.6-x64v3-xanmod1 (x86_64)
Чт 05 мар 2026 13:12:13 +05

Building module(s)
# command: make -j16 KERNELRELEASE=6.19.6-x64v3-xanmod1 -C /lib/modules/6.19.6-x64v3-xanmod1/build M=/var/lib/dkms/amneziawg/1.0.0/build LLVM=1
make: вход в каталог «/usr/src/linux-headers-6.19.6-x64v3-xanmod1»
make[1]: вход в каталог «/var/lib/dkms/amneziawg/1.0.0/build»
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: Debian clang version 19.1.7 (3)
  You are using:           Debian clang version 19.1.7 (3+b1)
  CC [M]  main.o
  CC [M]  noise.o
  CC [M]  device.o
  CC [M]  peer.o
  CC [M]  timers.o
  CC [M]  queueing.o
  CC [M]  send.o
  CC [M]  receive.o
  CC [M]  socket.o
  CC [M]  peerlookup.o
  CC [M]  allowedips.o
  CC [M]  ratelimiter.o
  CC [M]  cookie.o
  CC [M]  netlink.o
  CC [M]  junk.o
  CC [M]  magic_header.o
cookie.c:36:23: error: variable has incomplete type 'struct blake2s_state'
   36 |         struct blake2s_state blake;
      |                              ^
cookie.c:36:9: note: forward declaration of 'struct blake2s_state'
   36 |         struct blake2s_state blake;
      |                ^
cookie.c:80:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   80 |         blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN);
      |                       ^~~~~~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
cookie.c:80:42: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   80 |         blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN);
      |                                                 ^~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
cookie.c:88:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   88 |         blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN);
      |                       ^~~~~~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
cookie.c:88:45: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   88 |         blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN);
      |                                                    ^~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
cookie.c:94:23: error: variable has incomplete type 'struct blake2s_state'
   94 |         struct blake2s_state state;
      |                              ^
cookie.c:94:9: note: forward declaration of 'struct blake2s_state'
   94 |         struct blake2s_state state;
      |                ^
6 errors generated.
make[3]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/scripts/Makefile.build:289: cookie.o] Ошибка 1
make[3]: *** Ожидание завершения заданий…
noise.c:39:23: error: variable has incomplete type 'struct blake2s_state'
   39 |         struct blake2s_state blake;
      |                              ^
noise.c:39:9: note: forward declaration of 'struct blake2s_state'
   39 |         struct blake2s_state blake;
      |                ^
noise.c:41:39: error: incompatible pointer to integer conversion passing 'const u8[37]' (aka 'const unsigned char[37]') to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion]
   41 |         blake2s(handshake_init_chaining_key, handshake_name, NULL,
      |                                              ^~~~~~~~~~~~~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here
  145 | static inline void blake2s(const u8 *key, size_t keylen,
      |                                                  ^
noise.c:42:19: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion]
   42 |                 NOISE_HASH_LEN, sizeof(handshake_name), 0);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here
  147 |                            u8 *out, size_t outlen)
      |                                ^
noise.c:310:23: error: variable has incomplete type 'struct blake2s_state'
  310 |         struct blake2s_state state;
      |                              ^
noise.c:310:9: note: forward declaration of 'struct blake2s_state'
  310 |         struct blake2s_state state;
      |                ^
noise.c:437:23: error: variable has incomplete type 'struct blake2s_state'
  437 |         struct blake2s_state blake;
      |                              ^
noise.c:437:9: note: forward declaration of 'struct blake2s_state'
  437 |         struct blake2s_state blake;
      |                ^
5 errors generated.
make[3]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/scripts/Makefile.build:289: noise.o] Ошибка 1
make[2]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/Makefile:2069: .] Ошибка 2
make[1]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/Makefile:248: __sub-make] Ошибка 2
make[1]: выход из каталога «/var/lib/dkms/amneziawg/1.0.0/build»
make: *** [Makefile:248: __sub-make] Ошибка 2
make: выход из каталога «/usr/src/linux-headers-6.19.6-x64v3-xanmod1»

# exit code: 2
# elapsed time: 00:00:03

However, the module for the previous kernel version (6.18.4-x64v3-xanmod1) builds without errors.

Originally created by @AdB0kaT on GitHub (Mar 5, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/143 Hello! The process of installing the xanmod vesria 6.19.6-x64v3-xanmod1 kernel with the amneziawg module is interrupted by a module compilation error: ``` Настраивается пакет linux-image-6.19.6-x64v3-xanmod1 (6.19.6-x64v3-xanmod1-0~20260304.ge0b3726) … Sign command: /lib/modules/6.19.6-x64v3-xanmod1/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Autoinstall of module amneziawg/1.0.0 for kernel 6.19.6-x64v3-xanmod1 (x86_64) Building module(s)....(bad exit status: 2) Failed command: make -j16 KERNELRELEASE=6.19.6-x64v3-xanmod1 -C /lib/modules/6.19.6-x64v3-xanmod1/build M=/var/lib/dkms/amneziawg/1.0.0/build LLVM=1 Error! Bad return status for module build on kernel: 6.19.6-x64v3-xanmod1 (x86_64) Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information. Autoinstall on 6.19.6-x64v3-xanmod1 failed for module(s) amneziawg(10). Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. run-parts: /etc/kernel/postinst.d/dkms exited with return code 1 update-initramfs: Generating /boot/initrd.img-6.19.6-x64v3-xanmod1 Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.19.6-x64v3-xanmod1 Found initrd image: /boot/initrd.img-6.19.6-x64v3-xanmod1 Found linux image: /boot/vmlinuz-6.18.4-x64v3-xanmod1 Found initrd image: /boot/initrd.img-6.18.4-x64v3-xanmod1 Found linux image: /boot/vmlinuz-6.12.63+deb13-rt-amd64 Found initrd image: /boot/initrd.img-6.12.63+deb13-rt-amd64 Found linux image: /boot/vmlinuz-6.1.0-29-amd64 Found initrd image: /boot/initrd.img-6.1.0-29-amd64 Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done dpkg: ошибка при обработке пакета linux-image-6.19.6-x64v3-xanmod1 (--configure): подпроцесс из пакета linux-image-6.19.6-x64v3-xanmod1 установлен сценарий post-installation возвратил код ошибки 1 dpkg: зависимости пакетов не позволяют настроить пакет linux-xanmod-x64v3: linux-xanmod-x64v3 зависит от linux-image-6.19.6-x64v3-xanmod1, однако: Пакет linux-image-6.19.6-x64v3-xanmod1 пока не настроен. dpkg: ошибка при обработке пакета linux-xanmod-x64v3 (--configure): проблемы зависимостей — оставляем не настроенным При обработке следующих пакетов произошли ошибки: linux-image-6.19.6-x64v3-xanmod1 linux-xanmod-x64v3 ``` Contents of /var/lib/dkms/amneziawg/1.0.0/build/make.log : ``` DKMS (dkms-3.2.2) make.log for amneziawg/1.0.0 for kernel 6.19.6-x64v3-xanmod1 (x86_64) Чт 05 мар 2026 13:12:13 +05 Building module(s) # command: make -j16 KERNELRELEASE=6.19.6-x64v3-xanmod1 -C /lib/modules/6.19.6-x64v3-xanmod1/build M=/var/lib/dkms/amneziawg/1.0.0/build LLVM=1 make: вход в каталог «/usr/src/linux-headers-6.19.6-x64v3-xanmod1» make[1]: вход в каталог «/var/lib/dkms/amneziawg/1.0.0/build» warning: the compiler differs from the one used to build the kernel The kernel was built by: Debian clang version 19.1.7 (3) You are using: Debian clang version 19.1.7 (3+b1) CC [M] main.o CC [M] noise.o CC [M] device.o CC [M] peer.o CC [M] timers.o CC [M] queueing.o CC [M] send.o CC [M] receive.o CC [M] socket.o CC [M] peerlookup.o CC [M] allowedips.o CC [M] ratelimiter.o CC [M] cookie.o CC [M] netlink.o CC [M] junk.o CC [M] magic_header.o cookie.c:36:23: error: variable has incomplete type 'struct blake2s_state' 36 | struct blake2s_state blake; | ^ cookie.c:36:9: note: forward declaration of 'struct blake2s_state' 36 | struct blake2s_state blake; | ^ cookie.c:80:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion] 80 | blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN); | ^~~~~~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here 145 | static inline void blake2s(const u8 *key, size_t keylen, | ^ cookie.c:80:42: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion] 80 | blake2s(mac1, message, key, COOKIE_LEN, len, NOISE_SYMMETRIC_KEY_LEN); | ^~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here 147 | u8 *out, size_t outlen) | ^ cookie.c:88:16: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion] 88 | blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN); | ^~~~~~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here 145 | static inline void blake2s(const u8 *key, size_t keylen, | ^ cookie.c:88:45: error: incompatible integer to pointer conversion passing 'size_t' (aka 'unsigned long') to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion] 88 | blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN); | ^~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here 147 | u8 *out, size_t outlen) | ^ cookie.c:94:23: error: variable has incomplete type 'struct blake2s_state' 94 | struct blake2s_state state; | ^ cookie.c:94:9: note: forward declaration of 'struct blake2s_state' 94 | struct blake2s_state state; | ^ 6 errors generated. make[3]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/scripts/Makefile.build:289: cookie.o] Ошибка 1 make[3]: *** Ожидание завершения заданий… noise.c:39:23: error: variable has incomplete type 'struct blake2s_state' 39 | struct blake2s_state blake; | ^ noise.c:39:9: note: forward declaration of 'struct blake2s_state' 39 | struct blake2s_state blake; | ^ noise.c:41:39: error: incompatible pointer to integer conversion passing 'const u8[37]' (aka 'const unsigned char[37]') to parameter of type 'size_t' (aka 'unsigned long') [-Wint-conversion] 41 | blake2s(handshake_init_chaining_key, handshake_name, NULL, | ^~~~~~~~~~~~~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:145:50: note: passing argument to parameter 'keylen' here 145 | static inline void blake2s(const u8 *key, size_t keylen, | ^ noise.c:42:19: error: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'u8 *' (aka 'unsigned char *') [-Wint-conversion] 42 | NOISE_HASH_LEN, sizeof(handshake_name), 0); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/src/linux-headers-6.19.6-x64v3-xanmod1/include/crypto/blake2s.h:147:11: note: passing argument to parameter 'out' here 147 | u8 *out, size_t outlen) | ^ noise.c:310:23: error: variable has incomplete type 'struct blake2s_state' 310 | struct blake2s_state state; | ^ noise.c:310:9: note: forward declaration of 'struct blake2s_state' 310 | struct blake2s_state state; | ^ noise.c:437:23: error: variable has incomplete type 'struct blake2s_state' 437 | struct blake2s_state blake; | ^ noise.c:437:9: note: forward declaration of 'struct blake2s_state' 437 | struct blake2s_state blake; | ^ 5 errors generated. make[3]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/scripts/Makefile.build:289: noise.o] Ошибка 1 make[2]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/Makefile:2069: .] Ошибка 2 make[1]: *** [/usr/src/linux-headers-6.19.6-x64v3-xanmod1/Makefile:248: __sub-make] Ошибка 2 make[1]: выход из каталога «/var/lib/dkms/amneziawg/1.0.0/build» make: *** [Makefile:248: __sub-make] Ошибка 2 make: выход из каталога «/usr/src/linux-headers-6.19.6-x64v3-xanmod1» # exit code: 2 # elapsed time: 00:00:03 ``` However, the module for the previous kernel version (6.18.4-x64v3-xanmod1) builds without errors.
Author
Owner

@noctuum commented on GitHub (Mar 6, 2026):

This is fixed in #145 - the blake2s API was refactored in kernel 6.19 (blake2s_state -> blake2s_ctx + argument order change). The PR adds compat macros following the existing patterns in compat.h.

<!-- gh-comment-id:4009728833 --> @noctuum commented on GitHub (Mar 6, 2026): This is fixed in #145 - the blake2s API was refactored in kernel 6.19 (blake2s_state -> blake2s_ctx + argument order change). The PR adds compat macros following the existing patterns in compat.h.
Author
Owner

@AdB0kaT commented on GitHub (Mar 7, 2026):

Thank you!

<!-- gh-comment-id:4015774257 --> @AdB0kaT commented on GitHub (Mar 7, 2026): Thank you!
Author
Owner

@dmitrykvasnikov commented on GitHub (Mar 16, 2026):

Wasn't it changed back in kernel 6.19.8? I just recompiled it for 6.19.8 and it's working ...

<!-- gh-comment-id:4067740838 --> @dmitrykvasnikov commented on GitHub (Mar 16, 2026): Wasn't it changed back in kernel 6.19.8? I just recompiled it for 6.19.8 and it's working ...
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#88
No description provided.