Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard

Nicholas Kinar n.kinar at usask.ca
Wed Jan 8 00:57:18 CET 2020


Hello,

I've attempted to build Wireguard on an Asus Tinkerboard S running 
embedded Linux.  The board was initially flashed with Tinker OS (Debian 
Stretch), but I updated to the more recent version of Debian buster 
using apt-get.  This is a 32-bit processor.

Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.4.132+

linaro at clavet-server:~$ uname -a
Linux clavet-server 4.4.132+ #1 SMP Wed Aug 21 19:15:55 CST 2019 armv7l 
GNU/Linux

I've followed the installation and build instructions on the official 
website.  The kernel model does not install nor build due to a compiler 
flag that is not supported.  Apparently this flag is for a 64-bit 
build.  I've also tried to do installation using the git version and the 
same build failure occurs.  Here is the output of the make.log.

DKMS make.log for wireguard-0.0.20191219 for kernel 4.4.132+ (armv7l)
Tue Jan  7 22:24:08 UTC 2020
make: Entering directory '/usr/src/linux-headers-4.4.132+'
   LD      /var/lib/dkms/wireguard/0.0.20191219/build/built-in.o
   CC [M]  /var/lib/dkms/wireguard/0.0.20191219/build/main.o
   CC [M]  /var/lib/dkms/wireguard/0.0.20191219/build/noise.o
   CC [M]  /var/lib/dkms/wireguard/0.0.20191219/build/device.o
   CC [M]  /var/lib/dkms/wireguard/0.0.20191219/build/peer.o
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
make[1]: *** [scripts/Makefile.build:277: 
/var/lib/dkms/wireguard/0.0.20191219/build/main.o] Error 1
make[1]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
make[1]: *** [scripts/Makefile.build:277: 
/var/lib/dkms/wireguard/0.0.20191219/build/noise.o] Error 1
make[1]: *** [scripts/Makefile.build:277: 
/var/lib/dkms/wireguard/0.0.20191219/build/device.o] Error 1
make[1]: *** [scripts/Makefile.build:277: 
/var/lib/dkms/wireguard/0.0.20191219/build/peer.o] Error 1
make: *** [Makefile:1471: 
_module_/var/lib/dkms/wireguard/0.0.20191219/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.132+'

What do I have to do to compile Wireguard on this system?  I've tried to 
add various libraries (as per 
https://devtalk.nvidia.com/default/topic/906942/jetson-tx1/failed-to-compile-kernel-module-gcc-cannot-recognize-aarch64-option-mgeneral-regs-only-/), 
but the same problem occurs.

Wireguard works great on all of my 64-bit servers and it is being used 
to create research networks.  Thanks so much for creating this great tool.

Nicholas

-- 
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