-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Unable to build projects on MacOSX - Error "failed to exec []string{"go", "build", "./..."}: exit status 1" is faced #1733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same issue. Building from master appears to work for me though
|
The problem is to build the project as described follows (added the description) camilamacedo@Camilas-MacBook-Pro ~/go/src/github.com/test/app-test $ operator-sdk build docker/cmacedo/test-app
/usr/local/go/src/crypto/tls/cipher_suites.go:18:2: unknown import path "golang_org/x/crypto/chacha20poly1305": cannot find module providing package golang_org/x/crypto/chacha20poly1305
/usr/local/go/src/crypto/x509/x509.go:36:2: unknown import path "golang_org/x/crypto/cryptobyte": cannot find module providing package golang_org/x/crypto/cryptobyte
/usr/local/go/src/crypto/x509/x509.go:37:2: unknown import path "golang_org/x/crypto/cryptobyte/asn1": cannot find module providing package golang_org/x/crypto/cryptobyte/asn1
/usr/local/go/src/crypto/tls/key_agreement.go:18:2: unknown import path "golang_org/x/crypto/curve25519": cannot find module providing package golang_org/x/crypto/curve25519
/usr/local/go/src/net/dnsclient.go:11:2: unknown import path "golang_org/x/net/dns/dnsmessage": cannot find module providing package golang_org/x/net/dns/dnsmessage
/usr/local/go/src/net/http/h2_bundle.go:47:2: unknown import path "golang_org/x/net/http/httpguts": cannot find module providing package golang_org/x/net/http/httpguts
/usr/local/go/src/net/http/transport.go:34:2: unknown import path "golang_org/x/net/http/httpproxy": cannot find module providing package golang_org/x/net/http/httpproxy
/usr/local/go/src/net/http/h2_bundle.go:48:2: unknown import path "golang_org/x/net/http2/hpack": cannot find module providing package golang_org/x/net/http2/hpack
/usr/local/go/src/net/http/h2_bundle.go:49:2: unknown import path "golang_org/x/net/idna": cannot find module providing package golang_org/x/net/idna
Error: failed to build operator binary: (failed to exec []string{"go", "build", "-o", "/Users/camilamacedo/go/src/github.com/test/app-test/build/_output/bin/app-test", "-gcflags", "all=-trimpath=/Users/camilamacedo/go/src/github.com/test", "-asmflags", "all=-trimpath=/Users/camilamacedo/go/src/github.com/test", "github.com/test/app-test/cmd/manager"}: exit status 1)
Usage:
operator-sdk build <image> [flags]
Flags:
--go-build-args string Extra Go build arguments as one string such as "-ldflags -X=main.xyz=abc"
-h, --help help for build
--image-build-args string Extra image build arguments as one string such as "--build-arg https_proxy=$https_proxy"
--image-builder string Tool to build OCI images. One of: [docker, podman, buildah] (default "docker")
Global Flags:
--verbose Enable verbose logging |
@camilamacedo86 how did you install it? I just did a fresh install using Below is my output and it worked correctly:
|
I can confirm the issue is there with 0.9.0 but not with 0.8.2 even if |
Hi @xlucas, Did you check your env vars? Have you more than one go env? Note that I could fix my env and now all is working with success. |
Hi @camilamacedo86. Yes I did check them, nothing sounds wrong to me:
I'm using several go envs thanks to a version manager (asdf) and I switch between them on a per-project basis. However I don't think it's relevant here since these versions are not mixed up by manual installations or anything and my tests were done on the same version. |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Bug
What did you do?
export GO111MODULE=on
What did you expect to see?
What did you see instead? Under which circumstances?
The following error when the project is created.
Following the error to build.
Environment
v0.9.0, commit: 560208dc998de497bbf59fea1b63426aec430934
go version go1.12.7 darwin/amd64
The text was updated successfully, but these errors were encountered: