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

Missing net/gso.h on Raspberry Pi Debian 11 Bullseye - dependency problem? #18

Open
1Godhell opened this issue Aug 22, 2024 · 4 comments

Comments

@1Godhell
Copy link

1Godhell commented Aug 22, 2024

Can’t compile kernel module on Raspberry Pi - missing net/gso.h from sources, although it's in place.

Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 6.1.21-v8+
Architecture: arm64

apt-get full-upgrade

cd /home/***/***
git clone --depth=1 https://github.com/raspberrypi/linux
sudo apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828
echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update

sudo apt-get install -y amneziawg

##SKIPPED##
Removing old amneziawg-1.0.0 DKMS files...

------------------------------
Deleting module version: 1.0.0
completely from the DKMS tree.
------------------------------
Done.
Loading new amneziawg-1.0.0 DKMS files...
It is likely that 6.1.21-v8+ belongs to a chroot's host
Building for 6.1.21-v8+
Building initial module for 6.1.21-v8+
Error! Bad return status for module build on kernel: 6.1.21-v8+ (aarch64)
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
dpkg: dependency problems prevent configuration of amneziawg:
 amneziawg depends on amneziawg-dkms (>= 0.0.20200121-2) | amneziawg-modules (>= 0.0.20191219); however:
  Package amneziawg-dkms is not configured yet.
  Package amneziawg-modules is not installed.

dpkg: error processing package amneziawg (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 amneziawg-dkms
 amneziawg
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Looking into the log file:

cat /var/lib/dkms/amneziawg/1.0.0/build/make.log

DKMS make.log for amneziawg-1.0.0 for kernel 6.1.21-v8+ (aarch64)
Tue Aug 20 12:05:59 MSK 2024
make: Entering directory '/var/lib/dkms/amneziawg/1.0.0/build'
CWD=$(pwd); \
cd /var/lib/dkms/amneziawg/1.0.0/build/generated; \
for patch in /var/lib/dkms/amneziawg/1.0.0/build/patches/000-initial-amneziawg.patch; do \
	patch -F3 -t -p0 -i $patch; \
done; \
cd $CWD; \
date > /var/lib/dkms/amneziawg/1.0.0/build/generated/.patches.stamp
patching file cookie.c
patching file cookie.h
patching file device.c
Hunk #1 succeeded at 380 (offset 3 lines).
Hunk #2 succeeded at 482 with fuzz 1 (offset 4 lines).
patching file device.h
patching file main.c
Hunk #1 succeeded at 9 with fuzz 3.
Hunk #2 succeeded at 43 (offset -7 lines).
Hunk #3 succeeded at 69 (offset -7 lines).
patching file messages.h
patching file netlink.c
Hunk #4 succeeded at 518 (offset -1 lines).
Hunk #5 succeeded at 563 (offset -1 lines).
Hunk #6 succeeded at 665 (offset 3 lines).
patching file noise.c
Hunk #1 succeeded at 515 (offset 31 lines).
Hunk #2 succeeded at 532 (offset 31 lines).
Hunk #3 succeeded at 665 (offset 31 lines).
Hunk #4 succeeded at 681 (offset 31 lines).
patching file noise.h
patching file receive.c
Hunk #1 succeeded at 25 (offset -8 lines).
Hunk #2 succeeded at 105 (offset -8 lines).
Hunk #3 succeeded at 128 (offset -8 lines).
Hunk #4 succeeded at 158 (offset -8 lines).
Hunk #5 succeeded at 178 (offset -8 lines).
Hunk #6 succeeded at 210 (offset -8 lines).
Hunk #7 succeeded at 566 (offset -16 lines).
Hunk #8 succeeded at 582 (offset -16 lines).
patching file send.c
Hunk #1 succeeded at 14 (offset -1 lines).
Hunk #2 succeeded at 42 (offset -1 lines).
Hunk #3 succeeded at 119 (offset -1 lines).
Hunk #4 succeeded at 135 (offset -1 lines).
Hunk #5 succeeded at 158 (offset -1 lines).
Hunk #6 succeeded at 201 (offset -1 lines).
Hunk #7 succeeded at 245 (offset -1 lines).
Hunk #8 succeeded at 332 with fuzz 3 (offset -1 lines).
Hunk #9 succeeded at 337 with fuzz 3 (offset -4 lines).
patching file socket.c
patching file socket.h
patching file uapi/wireguard.h
  CC [M]  /var/lib/dkms/amneziawg/1.0.0/build/generated/main.o
  CC [M]  /var/lib/dkms/amneziawg/1.0.0/build/generated/noise.o
  CC [M]  /var/lib/dkms/amneziawg/1.0.0/build/generated/device.o
  CC [M]  /var/lib/dkms/amneziawg/1.0.0/build/generated/peer.o
/var/lib/dkms/amneziawg/1.0.0/build/generated/device.c:23:10: fatal error: net/gso.h: No such file or directory
   23 | #include <net/gso.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/amneziawg/1.0.0/build/generated/device.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2012: /var/lib/dkms/amneziawg/1.0.0/build/generated] Error 2
make: *** [Makefile:93: module] Error 2
make: Leaving directory '/var/lib/dkms/amneziawg/1.0.0/build'

Attempted to build manually:

git clone https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
cd amneziawg-linux-kernel-module/src
ln -s /home/***/***/linux kernel
cd /home/***/***/linux
make oldconfig && make prepare
cd /home/***/***/amneziawg-linux-kernel-module/src/
make

## SKIPPED ##
patching file uapi/wireguard.h
  CC [M]  /home/***/***/amneziawg-linux-kernel-module/src/generated/main.o
  CC [M]  /home/***/***/amneziawg-linux-kernel-module/src/generated/noise.o
  CC [M]  /home/***/***/amneziawg-linux-kernel-module/src/generated/device.o
/home/***/***/amneziawg-linux-kernel-module/src/generated/device.c:23:10: fatal error: net/gso.h: No such file or directory
   23 | #include <net/gso.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /home/***/***/amneziawg-linux-kernel-module/src/generated/device.o] Error 1
make[1]: *** [Makefile:2012: /home/***/***/amneziawg-linux-kernel-module/src/generated] Error 2
make: *** [Makefile:93: module] Error 2
  • same make output, missing net/gso.h.

Of course net/gso.h is in its place inside the kernel source tree.

Thank you!

@1Godhell 1Godhell changed the title Can't compile on Raspberry Pi Bullseye Doesn't compile on Raspberry Pi Bullseye Aug 22, 2024
@1Godhell 1Godhell changed the title Doesn't compile on Raspberry Pi Bullseye Doesn't compile on Raspberry Pi Debian 11 Bullseye Aug 22, 2024
@1Godhell 1Godhell changed the title Doesn't compile on Raspberry Pi Debian 11 Bullseye Missing net/gso.h on Raspberry Pi Debian 11 Bullseye - dependency problem? Aug 26, 2024
@myanshin
Copy link

The same problem here. Raspberry PI, Debian 12. Is amneziawg supposed to work on Arm 64?

@ntoskernel
Copy link

same here

@leninalive
Copy link
Collaborator

@1Godhell you seems to be building against kernel version higher than installed (current branch in https://github.com/raspberrypi/linux repo is rpi-6.6.y while you are building on 6.1 kernel).

Obtain relevant kernel source by specifying branch in git clone command like -b rpi-6.1.y.

@int-0x03
Copy link

Obtain relevant kernel source by specifying branch in git clone command like -b rpi-6.1.y.

Tried to do this, got the same problem: net/gso.h No such file or directory. Raspberry Pi OS

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

5 participants