On 09/10/2018 11:00, wireguard-request@lists.zx2c4.com wrote:
In fact :

[nicolas@linux wireguard-go-0.0.20180613]$ printf 'package main\nconst
UseTheKernelModuleInstead = 0xdeadbabe\n' > ireallywantobuildon_linux.go
[nicolas@linux wireguard-go-0.0.20180613]$ make
Makefile:7: *** Do not build this for Linux. Instead use the Linux kernel
module. See wireguard.com/install/ for more info..  Stop.

Look in the Makefile:

ifeq ($(shell go env GOOS),linux)
ifeq ($(wildcard .git),)
$(error Do not build this for Linux. Instead use the Linux kernel module. See wireguard.com/install/ for more info.)
else
$(shell printf 'package main\nconst UseTheKernelModuleInstead = 0xdeadbabe\n' > ireallywantobuildon_linux.go)
endif
endif

Also see https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html

It looks like you need to move the .git directory out of the way before you build - or just modify the Makefile. And you shouldn't need to manually create ireallywantobuildon_linux.go, because the Makefile does it for you.