git -c http.sslVerify=false clone https://github.com/influxdata/telegraf.git
Then the info starts as this:
go mod download -x
# get https://proxy.golang.org/cloud.google.com/go/bigquery/@v/v1.33.0.mod
# get https://proxy.golang.org/cloud.google.com/go/@v/v0.102.1.mod
# get https://proxy.golang.org/cloud.google.com/go/@v/v0.102.1.mod: 200 OK (0.152s)
until 7488 lines later it fails with this
# get https://proxy.golang.org/sigs.k8s.io/yaml/@v/v1.2.0.zip
# get https://proxy.golang.org/sigs.k8s.io/yaml/@v/v1.2.0.zip: 200 OK (0.148s)
env -u GOOS -u GOARCH -u GOARM -- go build -o ./tools/license_checker/license_checker ./tools/license_checker
process_begin: CreateProcess(NULL, env -u GOOS -u GOARCH -u GOARM -- go build -o ./tools/license_checker/license_checker ./tools/license_checker, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [build_tools] Error 2
Probably I am doing something wrong, but can’t find out what.
I want to build telegraf on windows 10 for windows
I have seen a lot of reactions in github while I was biking back home… About MingW and other things… My setup does not have MingW (yet). If I modify the makefile in this way : (removed the env command from HOSTGO as I do not know how to change it for windows … probably a set command or so)
GOARCH ?= $(shell go env GOARCH)
#HOSTGO := env -u GOOS -u GOARCH -u GOARM -- go
HOSTGO := go
ifeq ($(GOOS), windows)
EXEEXT := .exe
How about redefining HOSTGO in the if (windows) ?
EDIT: nevermind, I see the changes have been checked in already. I will see if I can start from scratch once more and if I can get everything compiling. If not, I might be coming back here with a question.
Using git-bash works, and now is able to build the executables for windows and linux on windows.
For those looking for the information how to use it, I managed to get it working with these steps
set environment variable(s) GOOS, GOARCH, GOARM as required. If they are not set, it seems that the compilation by default is for the platform and architecture you’re running on. After setting the environment variables continue at next point