$ make container
CGO_ENABLED=0 GOOS=linux go build -i -installsuffix cgo -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.TAG=0.1.1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.COMMIT=778e57b067870a9f49157d47225377ff4cc50df1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.VERSION=0.1.0 -X github.com/amadeusitgroup/redis-operator/pkg/utils.BUILDTIME=2019-07-27/10:38:17 -s" -o docker/operator/operator ./cmd/operator/main.go
go build errors: mkdir /usr/local/go/pkg/linux_amd64_cgo/: permission denied
go build internal/nettrace: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build container/list: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build math/bits: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build crypto/internal/subtle: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build crypto/subtle: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/x/crypto/cryptobyte/asn1: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build runtime/internal/sys: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build unicode/utf8: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/race: open /usr/local/go/pkg/linux_amd64_cgo/internal/race.a: no such file or directory
go build unicode/utf16: open /usr/local/go/pkg/linux_amd64_cgo/unicode/utf16.a: no such file or directory
go build sync/atomic: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build runtime/internal/atomic: open /usr/local/go/pkg/linux_amd64_cgo/runtime/internal/atomic.a: no such file or directory
go build internal/cpu: open /usr/local/go/pkg/linux_amd64_cgo/internal/cpu.a: no such file or directory
go build unicode: open /usr/local/go/pkg/linux_amd64_cgo/unicode.a: no such file or directory
go build internal/x/crypto/curve25519: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build encoding: open /usr/local/go/pkg/linux_amd64_cgo/encoding.a: no such file or directory
Makefile:30: recipe for target 'buildlinux-operator' failed
make: *** [buildlinux-operator] Error 1
make plugin
CGO_ENABLED=0 go build -i -installsuffix cgo -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.TAG=0.1.1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.COMMIT=778e57b067870a9f49157d47225377ff4cc50df1 -X github.com/amadeusitgroup/redis-operator/pkg/utils.VERSION=0.1.0 -X github.com/amadeusitgroup/redis-operator/pkg/utils.BUILDTIME=2019-07-27/10:44:27 -s" -o bin/kubectl-plugin ./cmd/kubectl-plugin
go build unicode/utf8: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build internal/x/crypto/curve25519: mkdir /usr/local/go/pkg/linux_amd64_cgo: permission denied
go build encoding: open /usr/local/go/pkg/linux_amd64_cgo/encoding.a: no such file or directory
go build unicode/utf16: open /usr/local/go/pkg/linux_amd64_cgo/unicode/utf16.a: no such file or directory
go build internal/cpu: open /usr/local/go/pkg/linux_amd64_cgo/internal/cpu.a: no such file or directory
Makefile:27: recipe for target 'build-kubectl-plugin' failed
make: *** [build-kubectl-plugin] Error 1
I was able to get past this by chowning $GOROOT to the user, which is not ideal, and also by removing -i -installsuffix cgo from the go build commands in the makefile. Not sure what effect this has on the whole.
Thank you so much for this project, by the way. It works beautifully.
I was able to get past this by chowning $GOROOT to the user, which is not ideal, and also by removing
-i -installsuffix cgo
from thego build
commands in the makefile. Not sure what effect this has on the whole.Thank you so much for this project, by the way. It works beautifully.