[wireguard-dkms] Wireguard dkms module not building

Problems with packages? Post here, using [tags] of the package name.

[wireguard-dkms] Wireguard dkms module not building

Postby ambrice » Sat Sep 07, 2019 5:14 pm

I did a fresh install onto a Raspberry Pi 4. I installed wireguard-dkms, which installed with no errors, but does not seem to build the module. It returned quickly on install, and find -name wireguard* /lib/modules returns nothing. I tried dkms autoinstall which returns immediately without building anything. I see the module source in /usr/src/wireguard-0.0.20190905, how does dkms find it?
ambrice
 
Posts: 2
Joined: Wed Apr 15, 2015 8:28 pm

Re: [wireguard-dkms] Wireguard dkms module not building

Postby graysky » Sat Sep 07, 2019 6:43 pm

Do you have the headers installed? FYI, you can build from this PKGBUILD just fine:
$this->bbcode_second_pass_code('', 'pkgbase=wireguard
pkgname=(wireguard-module wireguard-tools)
pkgver=0.0.20190905
pkgrel=1
_pkgname=WireGuard
pkgdesc='next generation secure network tunnel'
arch=('x86_64' 'aarch64' 'armv7h')
url='http://www.wireguard.com/'
license=('GPL')
makedepends=('libmnl' 'linux-raspberrypi4-headers')
validpgpkeys=('AB9942E6D4A4CFC3412620A749FC7012A5DE03AE')
source=("https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${pkgver}.tar"{.xz,.asc})
sha256sums=('78767ceeb5286beaa851145f072d920a340a9f1b771a2943b8efd638cee1a8f6'
'SKIP')

# look at ls `/usr/lib/modules`
_extramodules=4.19-raspberrypi4

prepare() {
cd WireGuard-${pkgver}/

find contrib/examples/ -name '.gitignore' -delete

# get currently installed KERNELDIR
export _RIGHTPATH=$(cat /usr/lib/modules/extramodules-$_extramodules/version)
}

build() {
cd WireGuard-${pkgver}/
make -C src KERNELDIR="/lib/modules/$_RIGHTPATH/build"
}

package_wireguard-module() {
provides=('WIREGUARD-MODULE')

cd "$_pkgname-$pkgver"
xz src/wireguard.ko
install -Dm644 src/wireguard.ko.xz "$pkgdir/usr/lib/modules/extramodules-$_extramodules/wireguard.ko.xz"
}

package_wireguard-tools() {
depends=('libmnl')

cd WireGuard-${pkgver}/

make -C src/tools/ \
DESTDIR="${pkgdir}/" \
WITH_BASHCOMPLETION=yes \
WITH_WGQUICK=yes \
WITH_SYSTEMDUNITS=yes install
}')
graysky
Developer
 
Posts: 1872
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [wireguard-dkms] Wireguard dkms module not building

Postby ambrice » Sat Sep 07, 2019 10:44 pm

Yeah, that was it, the headers weren't installed. I would think that they would be listed as a dependency of dkms, or that if you ran dkms without the headers it would give you a relevant error message. But it's working now.
ambrice
 
Posts: 2
Joined: Wed Apr 15, 2015 8:28 pm

Re: [wireguard-dkms] Wireguard dkms module not building

Postby graysky » Sun Sep 08, 2019 12:04 am

$this->bbcode_second_pass_quote('ambrice', 'Y')eah, that was it, the headers weren't installed. I would think that they would be listed as a dependency of dkms, or that if you ran dkms without the headers it would give you a relevant error message. But it's working now.


Glad it's working... the dkms package does have the headers listed as opt deps:
$this->bbcode_second_pass_code('', '% pacman -Si dkms
Repository : extra
Name : dkms
Version : 2.7.1-1
Description : Dynamic Kernel Modules System
Architecture : any
URL : https://github.com/dell/dkms
Licenses : GPL2
Groups : None
Provides : None
Depends On : bash kmod gcc make patch
Optional Deps : linux-headers: build modules against the Arch kernel
linux-lts-headers: build modules against the LTS kernel
linux-zen-headers: build modules against the ZEN kernel
linux-hardened-headers: build modules against the HARDENED kernel
')
graysky
Developer
 
Posts: 1872
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Packages

Who is online

Users browsing this forum: No registered users and 1 guest