WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard
@ 2020-01-07 23:57 Nicholas Kinar
  2020-01-09  8:17 ` Ilie Halip
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Kinar @ 2020-01-07 23:57 UTC (permalink / raw)
  To: wireguard

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@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@usask.ca
http://www.usask.ca/hydrology

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard
  2020-01-07 23:57 Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard Nicholas Kinar
@ 2020-01-09  8:17 ` Ilie Halip
  2020-01-09 21:20   ` Nicholas Kinar
  0 siblings, 1 reply; 3+ messages in thread
From: Ilie Halip @ 2020-01-09  8:17 UTC (permalink / raw)
  To: Nicholas Kinar; +Cc: wireguard

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.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard
  2020-01-09  8:17 ` Ilie Halip
@ 2020-01-09 21:20   ` Nicholas Kinar
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Kinar @ 2020-01-09 21:20 UTC (permalink / raw)
  To: Ilie Halip; +Cc: wireguard

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@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@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@usask.ca
http://www.usask.ca/hydrology

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 23:57 Cannot build Wireguard for ARM embedded Linux 32-bit Tinkerboard Nicholas Kinar
2020-01-09  8:17 ` Ilie Halip
2020-01-09 21:20   ` Nicholas Kinar

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git