Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DKMS Install on Fedora Server 39 #5

Open
AndrewKhitrin opened this issue Apr 7, 2024 · 10 comments
Open

DKMS Install on Fedora Server 39 #5

AndrewKhitrin opened this issue Apr 7, 2024 · 10 comments

Comments

@AndrewKhitrin
Copy link

AndrewKhitrin commented Apr 7, 2024

I have installed amneziwg linux kernel module from amneziavpn repository as as described in the readme :

dnf install amneziawg-dkms amneziawg-tools

The module is displayed in DKMS in the status "added" :

# dkms status

amneziawg/1.0.20240213: added

I'm getting a error, while building amneziawg kernel module via DKMS (dkms build -m amneziawg/1.0.20240213, BTW package python3-devel is required for some build steps) :

..........
Building module:
Cleaning build area...
Building module(s)...(bad exit status: 2)
Failed command:
make -j4 KERNELRELEASE=6.8.4-200.fc39.x86_64 -C /var/lib/dkms/amneziawg/1.0.0/build
Error! Bad return status for module build on kernel: 6.8.4-200.fc39.x86_64 (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.20240213/build/make.log for more information.

Content of make.log :

# cat /var/lib/dkms/amneziawg/1.0.20240213/build/make.log

DKMS make.log for amneziawg-1.0.20240213 for kernel 6.8.4-200.fc39.x86_64 (x86_64)
Sun Apr  7 01:08:13 PM MSK 2024
make: Entering directory '/var/lib/dkms/amneziawg/1.0.20240213/build'
make: *** /var/lib/dkms/amneziawg/1.0.0/build: No such file or directory.  Stop.
make: Leaving directory '/var/lib/dkms/amneziawg/1.0.20240213/build'

Content of /var/lib/dkms/amneziawg/ directory :

# ls -l /var/lib/dkms/amneziawg

total 0
drwxr-xr-x 3 root root 48 Apr  7 13:07 1.0.20240213

Looks like some package and Makefile version mismatch.

My Fedora version :

# cat /etc/fedora-release

Fedora release 39 (Thirty Nine)

# uname -a

Linux hostname 6.8.4-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr  4 20:45:21 UTC 2024 x86_64 GNU/Linux
@tiaga
Copy link
Collaborator

tiaga commented Jul 17, 2024

Installation scripts were improved. Is it reproduced on the latest version?

@0x48415a484952
Copy link

[0x@l ~]$ sudo dnf install amneziawg-dkms amneziawg-tools
Last metadata expiration check: 0:20:45 ago on Sun 18 Aug 2024 11:58:34 PM +0330.
Error: 
 Problem: conflicting requests
  - nothing provides kernel-devel needed by amneziawg-dkms-1:1.0.20240711-1.el9.noarch from copr:copr.fedorainfracloud.org:amneziavpn:amneziawg
  - nothing provides dkms needed by amneziawg-dkms-1:1.0.20240711-1.el9.noarch from copr:copr.fedorainfracloud.org:amneziavpn:amneziawg
  - nothing provides python3-devel needed by amneziawg-dkms-1:1.0.20240711-1.el9.noarch from copr:copr.fedorainfracloud.org:amneziavpn:amneziawg
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

seems like problem in both RHEL9.4 and AlmaLinux9.4 i have already installed the needed dependency the name in the official repost is: python3-3.9.18-3.el9_4.1.x86_64 and it is identified as so.

@stanislavsay
Copy link

I have installed kernel packages:

#dnf list kernel-*
kernel-core.x86_64                                                                  6.10.10-100.fc39
kernel-core.x86_64                                                                  6.10.11-100.fc39
kernel-core.x86_64                                                                  6.10.11-200.fc40
kernel-debug.x86_64                                                                 6.10.11-200.fc40
kernel-debug-core.x86_64                                                            6.10.11-200.fc40
kernel-debug-devel.x86_64                                                           6.10.11-200.fc40
kernel-debug-devel-matched.x86_64                                                   6.10.11-200.fc40
kernel-debug-modules.x86_64                                                         6.10.11-200.fc40
kernel-debug-modules-core.x86_64                                                    6.10.11-200.fc40
kernel-debug-modules-extra.x86_64                                                   6.10.11-200.fc40
kernel-debug-modules-internal.x86_64                                                6.10.11-200.fc40
kernel-debug-uki-virt.x86_64                                                        6.10.11-200.fc40
kernel-devel.x86_64                                                                 6.10.10-100.fc39
kernel-devel.x86_64                                                                 6.10.11-100.fc39
kernel-devel.x86_64                                                                 6.10.11-200.fc40
kernel-devel-matched.x86_64                                                         6.10.11-200.fc40
kernel-headers.x86_64                                                               6.10.3-200.fc40
kernel-modules.x86_64                                                               6.10.10-100.fc39
kernel-modules.x86_64                                                               6.10.11-100.fc39
kernel-modules.x86_64                                                               6.10.11-200.fc40
kernel-modules-core.x86_64                                                          6.10.10-100.fc39
kernel-modules-core.x86_64                                                          6.10.11-100.fc39
kernel-modules-core.x86_64                                                          6.10.11-200.fc40
kernel-modules-extra.x86_64                                                         6.10.11-200.fc40
kernel-modules-internal.x86_64                                                      6.10.11-200.fc40
kernel-selftests-internal.x86_64                                                    6.10.11-200.fc40
kernel-srpm-macros.noarch                                                           1.0-23.fc40
kernel-tools.x86_64                                                                 6.10.11-200.fc40
kernel-tools-libs.x86_64                                                            6.10.11-200.fc40
kernel-tools-libs-devel.x86_64                                                      6.10.11-200.fc40
kernel-uki-virt.x86_64                                                              6.10.11-200.fc40

I have installed amneziwg linux kernel module from amneziavpn repository as as described in the readme:

sudo dnf copr enable amneziavpn/amneziawg
sudo dnf install python3-devel amneziawg-dkms 

The module is displayed in DKMS in the status "added" :

#dkms status
amneziawg/1.0.20240711: added

I'm getting a error, while building amneziawg kernel module via DKMS:

#sudo dkms build -m amneziawg -v 1.0.20240711
Sign command: /lib/modules/6.10.11-200.fc40.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/amneziawg/1.0.20240711/source/dkms.conf)

Running the pre_build script:
Downloading source for Linux kernel version 6.10.11-200.fc40.x86_64
......
Building module:
Cleaning build area...
Building module(s)...(bad exit status: 2)
Failed command:
make -j4 KERNELRELEASE=6.10.11-200.fc40.x86_64 -C /var/lib/dkms/amneziawg/1.0.20240711/build
Error! Bad return status for module build on kernel: 6.10.11-200.fc40.x86_64 (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.20240711/build/make.log for more information.

Content of make.log :

cat /var/lib/dkms/amneziawg/1.0.20240711/build/make.log
DKMS make.log for amneziawg-1.0.20240711 for kernel 6.10.11-200.fc40.x86_64 (x86_64)
Пт 27 сен 2024 15:35:24 MSK
make: вход в каталог «/var/lib/dkms/amneziawg/1.0.20240711/build»
Makefile:80: ***
You're running a modern Linux Kernel (version 6.10.11-200.fc40.x86_64).
In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel
by yourself and make a symlink to them into this directory:

    ln -s <path to kernel sources> kernel

After that please run make script again

But I have link to this directory

# ls -l /usr/src/amneziawg-1.0.20240711/
.....
lrwxrwxrwx  1 root root    41 сен 27 15:22 kernel -> /usr/src/kernels/6.10.11-200.fc40.x86_64/

My Fedora version:

#cat /etc/fedora-release
Fedora release 40 (Forty)
#uname -a
Linux nucsrv 6.10.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep 18 21:09:58 UTC 2024 x86_64 GNU/Linux

@pppppppo98
Copy link

Trouble goes on....

kernel 6.10.12. Fedora 40

#dkms build -m amneziawg -v 1.0.20240711

............
/var/lib/dkms/amneziawg/1.0.20240711/build/prepare-sources.sh: строка 86: cd: $'kernel-6.10.12/\nkernel-6.10.12-SPECPARTS/':_ Нет такого файла или каталога (Absent file or directory)_
in line 86 see
*cd "$(ls -d /)" || exit 255 - this command incorrect. Fix it

#cd /tmp/amneziawg/BUILD
#ls -l

drwxr-xr-x 3 root root 60 окт 8 12:38 kernel-6.10.12
drwxr-xr-x 2 root root 40 окт 8 12:38 kernel-6.10.12-SPECPARTS

@EugeneSmile
Copy link

As temporary workaround:
In /var/lib/dkms/amneziawg/1.0.20240711/source/prepare-sources.sh:
Change line 86 from cd "$(ls -d */)" || exit 255 to cd "$(ls -I '*SPECPARTS' ./)" || exit 255
And then

# dkms build amneziawg/1.0.20240711
# dkms install amneziawg/1.0.20240711

@leninalive
Copy link
Collaborator

leninalive commented Oct 24, 2024

prepare-sources was improved specially for Fedora in latest packages, please check it out.

@Shulyaka
Copy link

Shulyaka commented Nov 1, 2024

prepare-sources works fine for me with Fedora 40

@orungrau
Copy link

orungrau commented Nov 7, 2024

Fedora 41

Cleaning build area... done.
Building module(s)...(bad exit status: 2)
Failed command:
make -j8 KERNELRELEASE=6.11.5-300.fc41.x86_64 -C /var/lib/dkms/amneziawg/1.0.20241023/build
Error! Bad return status for module build on kernel: 6.11.5-300.fc41.x86_64 (x86_64)
Consult /var/lib/dkms/amneziawg/1.0.20241023/build/make.log for more information.
Autoinstall on 6.11.5-300.fc41.x86_64 succeeded for module(s) nvidia.
Autoinstall on 6.11.5-300.fc41.x86_64 failed for module(s) amneziawg(10).

Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.

make.log:

DKMS make.log for amneziawg-1.0.20241023 for kernel 6.11.5-300.fc41.x86_64 (x86_64)
Thu Nov  7 03:37:27 PM MSK 2024
make: Entering directory '/var/lib/dkms/amneziawg/1.0.20241023/build'
Makefile:81: *** 
You're running a modern Linux Kernel (version 6.11.5-300.fc41.x86_64).

In order to build AmneziaWG kernel module for this kernel you must obtain sources of your kernel
by yourself and make a symlink to them into this directory:

    ln -s <path to kernel sources> kernel

After that please run make script again.  Stop.
make: Leaving directory '/var/lib/dkms/amneziawg/1.0.20241023/build'

@Shulyaka
Copy link

Shulyaka commented Nov 7, 2024

@orungrau

Try my fix for Fedora 41: #47

@orungrau
Copy link

orungrau commented Nov 7, 2024

@Shulyaka It's working! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants