[GH-ISSUE #97] amneziawg-dkms autoinstall failed to build with linux mainline kernels 6.17/6.16 #57

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

Originally created by @rakodin on GitHub (Oct 5, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/97

Originally assigned to: @ygurov on GitHub.

Package amneziawg-dkms version 1.0.0-0~202510041931+876bf75~ubuntu22.04.1
DKMS autoinstall failed on linuxmint 22.2 (ubuntu noble)
Steps to reproduce:

  1. Install mainline utility
    sudo add-apt-repository ppa:cappelikan/ppa && sudo apt update && sudo apt install mainline
  2. Install latest mainline kernel v6.17
    sudo mainline install-latest
  3. Try to install amnesiawg-dkms from PPA
    sudo apt install amneziawg-dkms
    Build failed with errors (6.17.make.log)

Build error for 6.16.10 mainline kernel: 6.16.make.log

Originally created by @rakodin on GitHub (Oct 5, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/97 Originally assigned to: @ygurov on GitHub. Package amneziawg-dkms version `1.0.0-0~202510041931+876bf75~ubuntu22.04.1` DKMS autoinstall failed on linuxmint 22.2 (ubuntu noble) Steps to reproduce: 1. Install mainline utility `sudo add-apt-repository ppa:cappelikan/ppa && sudo apt update && sudo apt install mainline` 2. Install latest mainline kernel v6.17 `sudo mainline install-latest` 3. Try to install amnesiawg-dkms from PPA `sudo apt install amneziawg-dkms` Build failed with errors ([6.17.make.log](https://github.com/user-attachments/files/22707542/6.17.make.log)) Build error for 6.16.10 mainline kernel: [6.16.make.log](https://github.com/user-attachments/files/22707570/6.16.make.log)
Author
Owner

@olegStreejak commented on GitHub (Oct 5, 2025):

quite the same on linuxmint 22.2 with amd64 kernel 6.17 (taken from here)

Setting up amneziawg-dkms (1.0.0-0202510041931+876bf75ubuntu24.04.1) ...
Removing old amneziawg-1.0.0 DKMS files...
Deleting module amneziawg-1.0.0 completely from the DKMS tree.
Loading new amneziawg-1.0.0 DKMS files...
Deprecated feature: REMAKE_INITRD (/usr/src/amneziawg-1.0.0/dkms.conf)
Building for 6.17.0-061700-generic
Building initial module for 6.17.0-061700-generic
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/amneziawg/1.0.0/source/dkms.conf)
Error! Bad return status for module build on kernel: 6.17.0-061700-generic (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information.
dpkg: error processing package amneziawg-dkms (--configure):
installed amneziawg-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
amneziawg-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

here is /var/lib/dkms/amneziawg/1.0.0/build/make.log

Still have to stay at amneziawg-dkms_1.0.0-0~202506030003+b91faba

update: also for 6.17.1 amd64 kernel

<!-- gh-comment-id:3369212904 --> @olegStreejak commented on GitHub (Oct 5, 2025): quite the same on linuxmint 22.2 with amd64 kernel 6.17 (taken from [here](https://kernel.ubuntu.com/mainline/v6.17/)) > Setting up amneziawg-dkms (1.0.0-0~202510041931+876bf75~ubuntu24.04.1) ... > Removing old amneziawg-1.0.0 DKMS files... > Deleting module amneziawg-1.0.0 completely from the DKMS tree. > Loading new amneziawg-1.0.0 DKMS files... > Deprecated feature: REMAKE_INITRD (/usr/src/amneziawg-1.0.0/dkms.conf) > Building for 6.17.0-061700-generic > Building initial module for 6.17.0-061700-generic > Deprecated feature: REMAKE_INITRD (/var/lib/dkms/amneziawg/1.0.0/source/dkms.conf) > Error! Bad return status for module build on kernel: 6.17.0-061700-generic (x86_64) > Consult /var/lib/dkms/amneziawg/1.0.0/build/make.log for more information. > dpkg: error processing package amneziawg-dkms (--configure): > installed amneziawg-dkms package post-installation script subprocess returned error exit status 10 > Errors were encountered while processing: > amneziawg-dkms > E: Sub-process /usr/bin/dpkg returned an error code (1) here is [/var/lib/dkms/amneziawg/1.0.0/build/make.log](https://github.com/user-attachments/files/22711128/make.log) Still have to stay at amneziawg-dkms_1.0.0-0~202506030003+b91faba update: also for 6.17.1 amd64 kernel
Author
Owner

@strelok1111 commented on GitHub (Oct 8, 2025):

Same here linux 6.17.1(arch) :-(


 CC [M]  device.o
device.c: В функции «wg_pm_notification»:
device.c:94:25: ошибка: неявная декларация функции «del_timer»; имелось в виду «add_timer»? [-Wimplicit-function-declaration]
   94 |                         del_timer(&peer->timer_zero_key_material);
      |                         ^~~~~~~~~
      |                         add_timer
device.c: На верхнем уровне:
device.c:437:35: ошибка: initialization of «int (*)(struct net_device *, struct rtnl_newlink_params *, struct netlink_ext_ack *)» from incompatible pointer type «int (*)(struct net *, struct net_device *, struct nlattr **, struct nlattr **, struct netlink_ext_ack *)» [-Wincompatible-pointer-types]
  437 |         .newlink                = wg_newlink,
      |                                   ^~~~~~~~~~
device.c:437:35: замечание: (где-то рядом с инициализацией для «link_ops.newlink»)
device.c:334:12: замечание: «wg_newlink» declared here
  334 | static int wg_newlink(struct net *src_net, struct net_device *dev,
      |            ^~~~~~~~~~
make[3]: *** [/usr/lib/modules/6.16.10-arch1-1/build/scripts/Makefile.build:287: device.o] Ошибка 1
make[2]: *** [/usr/lib/modules/6.16.10-arch1-1/build/Makefile:2003: .] Ошибка 2
make[1]: *** [Makefile:248: __sub-make] Ошибка 2
make: *** [Makefile:27: module] Ошибка 2

<!-- gh-comment-id:3381598853 --> @strelok1111 commented on GitHub (Oct 8, 2025): Same here linux 6.17.1(arch) :-( ``` CC [M] device.o device.c: В функции «wg_pm_notification»: device.c:94:25: ошибка: неявная декларация функции «del_timer»; имелось в виду «add_timer»? [-Wimplicit-function-declaration] 94 | del_timer(&peer->timer_zero_key_material); | ^~~~~~~~~ | add_timer device.c: На верхнем уровне: device.c:437:35: ошибка: initialization of «int (*)(struct net_device *, struct rtnl_newlink_params *, struct netlink_ext_ack *)» from incompatible pointer type «int (*)(struct net *, struct net_device *, struct nlattr **, struct nlattr **, struct netlink_ext_ack *)» [-Wincompatible-pointer-types] 437 | .newlink = wg_newlink, | ^~~~~~~~~~ device.c:437:35: замечание: (где-то рядом с инициализацией для «link_ops.newlink») device.c:334:12: замечание: «wg_newlink» declared here 334 | static int wg_newlink(struct net *src_net, struct net_device *dev, | ^~~~~~~~~~ make[3]: *** [/usr/lib/modules/6.16.10-arch1-1/build/scripts/Makefile.build:287: device.o] Ошибка 1 make[2]: *** [/usr/lib/modules/6.16.10-arch1-1/build/Makefile:2003: .] Ошибка 2 make[1]: *** [Makefile:248: __sub-make] Ошибка 2 make: *** [Makefile:27: module] Ошибка 2 ```
Author
Owner

@ygurov commented on GitHub (Oct 8, 2025):

Hi @rakodin @strelok1111 @olegStreejak,
Could you check if #100 works for you?

<!-- gh-comment-id:3383138410 --> @ygurov commented on GitHub (Oct 8, 2025): Hi @rakodin @strelok1111 @olegStreejak, Could you check if #100 works for you?
Author
Owner

@olegStreejak commented on GitHub (Oct 8, 2025):

seems it builds, but make dkms-install fails. See log test.log
today (but later. in the day-time) can try to make dkms module or install

<!-- gh-comment-id:3383372751 --> @olegStreejak commented on GitHub (Oct 8, 2025): seems it builds, but `make dkms-install` fails. See log [test.log](https://github.com/user-attachments/files/22786491/test.log) today (but later. in the day-time) can try to make dkms module or install
Author
Owner

@ygurov commented on GitHub (Oct 8, 2025):

Thanks. Good news it compiles - 95%'s done
That's weird that make dkms-install fails, need to investigate this. Found only piped wc output, could you post here the actual logs you have? Or please point me out where did I miss it :)

<!-- gh-comment-id:3383418965 --> @ygurov commented on GitHub (Oct 8, 2025): Thanks. Good news it compiles - 95%'s done That's weird that `make dkms-install` fails, need to investigate this. Found only piped `wc` output, could you post here the actual logs you have? Or please point me out where did I miss it :)
Author
Owner

@orange-banal-pole commented on GitHub (Oct 9, 2025):

Works for me with 6.17.1

<!-- gh-comment-id:3383800385 --> @orange-banal-pole commented on GitHub (Oct 9, 2025): Works for me with 6.17.1
Author
Owner

@strelok1111 commented on GitHub (Oct 9, 2025):

Hi @rakodin @strelok1111 @olegStreejak, Could you check if #100 works for you?

yes, it compiles and install, thank you

 $ sudo make install
[sudo] пароль для strelok: 
  INSTALL /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko
  SIGN    /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko
At main.c:171:
- SSL error:FFFFFFFF80000002:system library::No such file or directory: crypto/bio/bss_file.c:67
- SSL error:10000080:BIO routines::no such file: crypto/bio/bss_file.c:75
sign-file: /usr/lib/modules/6.17.1-arch1-1/build/certs/signing_key.pem
  ZSTD    /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko.zst
  DEPMOD  /lib/modules/6.17.1-arch1-1
depmod -b "/" -a 6.17.1-arch1-1
<!-- gh-comment-id:3384198213 --> @strelok1111 commented on GitHub (Oct 9, 2025): > Hi [@rakodin](https://github.com/rakodin) [@strelok1111](https://github.com/strelok1111) [@olegStreejak](https://github.com/olegStreejak), Could you check if [#100](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/100) works for you? yes, it compiles and install, thank you ``` $ sudo make install [sudo] пароль для strelok: INSTALL /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko SIGN /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko At main.c:171: - SSL error:FFFFFFFF80000002:system library::No such file or directory: crypto/bio/bss_file.c:67 - SSL error:10000080:BIO routines::no such file: crypto/bio/bss_file.c:75 sign-file: /usr/lib/modules/6.17.1-arch1-1/build/certs/signing_key.pem ZSTD /lib/modules/6.17.1-arch1-1/updates/amneziawg.ko.zst DEPMOD /lib/modules/6.17.1-arch1-1 depmod -b "/" -a 6.17.1-arch1-1 ```
Author
Owner

@olegStreejak commented on GitHub (Oct 9, 2025):

could you post here the actual logs you have?

here you are:

$ env LANG="" sudo make dkms-install
make: /bin/sh: Argument list too long
make: *** [Makefile:44: dkms-install] Error 127
$ sudo make -n dkms-install | gzip > dkms-install.log.gz

dkms-install.log.gz

<!-- gh-comment-id:3384320902 --> @olegStreejak commented on GitHub (Oct 9, 2025): > could you post here the actual logs you have? here you are: ``` $ env LANG="" sudo make dkms-install make: /bin/sh: Argument list too long make: *** [Makefile:44: dkms-install] Error 127 $ sudo make -n dkms-install | gzip > dkms-install.log.gz ``` [dkms-install.log.gz](https://github.com/user-attachments/files/22791261/dkms-install.log.gz)
Author
Owner

@ygurov commented on GitHub (Oct 9, 2025):

could you post here the actual logs you have?

here you are:

$ env LANG="" sudo make dkms-install
make: /bin/sh: Argument list too long
make: *** [Makefile:44: dkms-install] Error 127
$ sudo make -n dkms-install | gzip > dkms-install.log.gz

dkms-install.log.gz

Could you check what does getconf ARG_MAX dump?

<!-- gh-comment-id:3384753595 --> @ygurov commented on GitHub (Oct 9, 2025): > > could you post here the actual logs you have? > > here you are: > > ``` > $ env LANG="" sudo make dkms-install > make: /bin/sh: Argument list too long > make: *** [Makefile:44: dkms-install] Error 127 > $ sudo make -n dkms-install | gzip > dkms-install.log.gz > ``` > > [dkms-install.log.gz](https://github.com/user-attachments/files/22791261/dkms-install.log.gz) Could you check what does `getconf ARG_MAX` dump?
Author
Owner

@olegStreejak commented on GitHub (Oct 9, 2025):

$ getconf ARG_MAX 
2097152
<!-- gh-comment-id:3385147387 --> @olegStreejak commented on GitHub (Oct 9, 2025): ``` $ getconf ARG_MAX 2097152 ```
Author
Owner

@olegStreejak commented on GitHub (Oct 9, 2025):

symlink. From posted above test.log: $ ln -nsf ../../linux-6.17.1 kernel

<!-- gh-comment-id:3385244792 --> @olegStreejak commented on GitHub (Oct 9, 2025): symlink. From posted above test.log: `$ ln -nsf ../../linux-6.17.1 kernel`
Author
Owner

@rakodin commented on GitHub (Oct 9, 2025):

Hi @rakodin @strelok1111 @olegStreejak, Could you check if #100 works for you?

dkms install src/ works
also builds and works on mainline 6.17.1/6.16.11/6.15.11
connection is ok

<!-- gh-comment-id:3385291788 --> @rakodin commented on GitHub (Oct 9, 2025): > Hi [@rakodin](https://github.com/rakodin) [@strelok1111](https://github.com/strelok1111) [@olegStreejak](https://github.com/olegStreejak), Could you check if [#100](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/100) works for you? dkms install src/ works also builds and works on mainline 6.17.1/6.16.11/6.15.11 connection is ok
Author
Owner

@ygurov commented on GitHub (Oct 9, 2025):

Oh, I think I clearly understand a problem now. And that's the problem of the current documentation status, actually
I recently introduced build system changes, that does not require any additional kernel sources linked within ./src folder, it just builds by using external kernel headers. So the action with kernel is redundant and should be skipped. Will update documentation soon
@olegStreejak, please proceed with removal of kernel from src and try to make dkms-install then

<!-- gh-comment-id:3385304032 --> @ygurov commented on GitHub (Oct 9, 2025): Oh, I think I clearly understand a problem now. And that's the problem of the current documentation status, actually I recently introduced build system changes, that does not require any additional kernel sources linked within ./src folder, it just builds by using external kernel headers. So the action with kernel is redundant and should be skipped. Will update documentation soon @olegStreejak, please proceed with removal of `kernel` from `src` and try to `make dkms-install` then
Author
Owner

@olegStreejak commented on GitHub (Oct 9, 2025):

please proceed with removal of kernel from src and try to make dkms-install then

yes. Now it works like a charm. All commands succeed:

sudo dkms add -m amneziawg -v 1.0.0
sudo dkms build -m amneziawg -v 1.0.0
sudo dkms install -m amneziawg -v 1.0.0

it's installed and works now as far as I can see. Thank you all for your time and efforts!

<!-- gh-comment-id:3385394944 --> @olegStreejak commented on GitHub (Oct 9, 2025): > please proceed with removal of `kernel` from `src` and try to `make dkms-install` then yes. Now it works like a charm. All commands succeed: ```sudo make dkms-install sudo dkms add -m amneziawg -v 1.0.0 sudo dkms build -m amneziawg -v 1.0.0 sudo dkms install -m amneziawg -v 1.0.0 ``` it's installed and works now as far as I can see. Thank you all for your time and efforts!
Author
Owner

@ygurov commented on GitHub (Oct 9, 2025):

Thank y'all for the tests were made!
Will try to finish this PR by the end of the day and, will merge it once it's reviewed

<!-- gh-comment-id:3385411599 --> @ygurov commented on GitHub (Oct 9, 2025): Thank y'all for the tests were made! Will try to finish this PR by the end of the day and, will merge it once it's reviewed
Author
Owner

@ygurov commented on GitHub (Oct 9, 2025):

Merged #100

<!-- gh-comment-id:3386616521 --> @ygurov commented on GitHub (Oct 9, 2025): Merged #100
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#57
No description provided.