Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard

Nicholas Kinar n.kinar at usask.ca
Thu Jan 9 22:20:51 CET 2020


On 1/9/2020 2:17 AM, Ilie Halip wrote:
> CAUTION: This email originated from outside of the University of Saskatchewan. Do not click links or open attachments unless you recognize the sender and know the content is safe. If in doubt, please forward suspicious emails to phishing at usask.ca
>
>
> You could just cd into /var/lib/dkms/wireguard/0.0.20191219 and run
> "make V=1" manually in there as root. That should give more information.
>
> I.H.

Hello Ilie:

Thanks for your help, I did this and it showed that the compiler doesn't 
recognize a command-line option ( ‘-mgeneral-regs-only’). The output is 
pasted below.

linaro at clavet-server:/var/lib/dkms/wireguard/0.0.20191219/build$ sudo 
make V=1
ver="#define WIREGUARD_VERSION \"\"" && \
[ "$(cat version.h 2>/dev/null)" != "$ver" ] && \
echo "$ver" > version.h || true
make[1]: Entering directory '/usr/src/linux-headers-4.4.132+'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || 
(                \
echo >&2; \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or 
include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to 
fix it.";      \
echo >&2 ;                                                      \
/bin/false)
mkdir -p /var/lib/dkms/wireguard/0.0.20191219/build/.tmp_versions ; rm 
-f /var/lib/dkms/wireguard/0.0.20191219/build/.tmp_versions/*
make -f ./scripts/Makefile.build 
obj=/var/lib/dkms/wireguard/0.0.20191219/build
   ./scripts/gcc-wrapper.py gcc 
-Wp,-MD,/var/lib/dkms/wireguard/0.0.20191219/build/.main.o.d -nostdinc 
-isystem /usr/lib/gcc/arm-linux-gnueabihf/8/include 
-I./arch/arm64/include -Iarch/arm64/include/generated/uapi 
-Iarch/arm64/include/generated  -Iinclude -I./arch/arm64/include/uapi 
-Iarch/arm64/include/generated/uapi -I./include/uapi 
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ 
-mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration 
-Wno-format-security -std=gnu89 -fno-PIE -mgeneral-regs-only -fno-pic 
-fno-asynchronous-unwind-tables -Os -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -g -pg -O3 -fvisibility=hidden 
-D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' -Wframe-larger-than=2048 
-I/var/lib/dkms/wireguard/0.0.20191219/build/crypto/include 
-DCONFIG_ZINC_ARCH_ARM -include 
/var/lib/dkms/wireguard/0.0.20191219/build/compat/compat.h 
-I/var/lib/dkms/wireguard/0.0.20191219/build/compat/ptr_ring/include 
-I/var/lib/dkms/wireguard/0.0.20191219/build/compat/siphash/include 
-I/var/lib/dkms/wireguard/0.0.20191219/build/compat/simd-asm/include 
-I/var/lib/dkms/wireguard/0.0.20191219/build/compat/simd/include 
-DCOMPAT_CANNOT_USE_DEV_CNF  -DMODULE  -DKBUILD_BASENAME='"main"' 
-DKBUILD_MODNAME='"wireguard"' -c -o 
/var/lib/dkms/wireguard/0.0.20191219/build/main.o 
/var/lib/dkms/wireguard/0.0.20191219/build/main.c
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
make[2]: *** [scripts/Makefile.build:278: 
/var/lib/dkms/wireguard/0.0.20191219/build/main.o] Error 1
make[1]: *** [Makefile:1471: 
_module_/var/lib/dkms/wireguard/0.0.20191219/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.132+'
make: *** [Makefile:33: module] Error 2

-- 
Dr. Nicholas J. Kinar, PhD
Research Scientist | Global Water Futures
Assistant Director | Smart Water Systems Lab
University of Saskatchewan
306-966-2092 | n.kinar at usask.ca
http://www.usask.ca/hydrology



More information about the WireGuard mailing list