From 6e22d10b02a047d7a7b678239b28c0868a393571 Mon Sep 17 00:00:00 2001 From: WGH Date: Mon, 6 May 2019 21:48:29 +0300 Subject: [PATCH] api/Makefile: remove -i flag to fix cross-compilation When -i (install) flag is passed to `go build`, it attempts to install dependencies of the target. This will usually fail during cross-compilation due to GOROOT being not writeable to non-root users: runtime/internal/sys go build runtime/internal/sys: mkdir /usr/lib/go/pkg/linux_arm: permission denied Installing dependencies makes no sense in recent Go versions, because compilation is cached anyway (see `go help cache`). --- api/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/Makefile b/api/Makefile index bff8edb..b0de4c9 100644 --- a/api/Makefile +++ b/api/Makefile @@ -26,11 +26,11 @@ clean: devel-go: dep ensure - go build -i -v -o $(GO_DEVEL_BUILD_BINARY) + go build -v -o $(GO_DEVEL_BUILD_BINARY) prod-go: dep ensure - go build -i -v -o $(GO_PROD_BUILD_BINARY) + go build -v -o $(GO_PROD_BUILD_BINARY) test-go: dep ensure