Skip to content
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

Installation on M1 Macs #7

Closed
harshaisgud opened this issue Jan 13, 2022 · 1 comment
Closed

Installation on M1 Macs #7

harshaisgud opened this issue Jan 13, 2022 · 1 comment

Comments

@harshaisgud
Copy link
Contributor

Bug Report
Unable to Build Operator on Arm64 architecture MBP 2021
What did you do?
Cloned mondoo-operator repo and ran make test
What did you expect to see?
PASS
What did you see instead? Under which circumstances?

go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0
go get: installing executables with 'go get' in module mode is deprecated.
	To adjust and download dependencies of the current module, use 'go get -d'.
	To install using requirements of the current module, use 'go install'.
	To install ignoring the current module, use 'go install' with a version,
	like 'go install example.com/cmd@latest'.
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.
go get: added github.com/fatih/color v1.12.0
go get: added github.com/go-logr/logr v0.4.0
go get: added github.com/gobuffalo/flect v0.2.3
go get: added github.com/gogo/protobuf v1.3.2
go get: added github.com/google/go-cmp v0.5.6
go get: added github.com/google/gofuzz v1.1.0
go get: added github.com/inconshreveable/mousetrap v1.0.0
go get: added github.com/json-iterator/go v1.1.11
go get: added github.com/mattn/go-colorable v0.1.8
go get: added github.com/mattn/go-isatty v0.0.12
go get: added github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go get: added github.com/modern-go/reflect2 v1.0.1
go get: added github.com/spf13/cobra v1.2.1
go get: added github.com/spf13/pflag v1.0.5
go get: added golang.org/x/mod v0.4.2
go get: added golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
go get: added golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
go get: added golang.org/x/text v0.3.6
go get: added golang.org/x/tools v0.1.5
go get: added golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go get: added gopkg.in/inf.v0 v0.9.1
go get: added gopkg.in/yaml.v2 v2.4.0
go get: added gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go get: added k8s.io/api v0.22.2
go get: added k8s.io/apiextensions-apiserver v0.22.2
go get: added k8s.io/apimachinery v0.22.2
go get: added k8s.io/klog/v2 v2.9.0
go get: added k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
go get: added sigs.k8s.io/controller-tools v0.7.0
go get: added sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go get: added sigs.k8s.io/yaml v1.2.0
/Users/harsha/mondoo-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/harsha/mondoo-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
go get: installing executables with 'go get' in module mode is deprecated.
	To adjust and download dependencies of the current module, use 'go get -d'.
	To install using requirements of the current module, use 'go install'.
	To install ignoring the current module, use 'go install' with a version,
	like 'go install example.com/cmd@latest'.
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.
go get: added github.com/go-logr/logr v1.2.0
go get: added github.com/go-logr/zapr v1.2.0
go get: added github.com/spf13/afero v1.6.0
go get: added github.com/spf13/pflag v1.0.5
go get: added go.uber.org/atomic v1.7.0
go get: added go.uber.org/multierr v1.6.0
go get: added go.uber.org/zap v1.19.1
go get: added golang.org/x/text v0.3.6
go get: added sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220112150637-b8db76e66383
unable to find a version that was supported for platform darwin/arm64
KUBEBUILDER_ASSETS="" go test ./... -coverprofile cover.out
?   	github.com/mondoolabs/mondoo-operator	[no test files]
?   	github.com/mondoolabs/mondoo-operator/api/v1alpha1	[no test files]
Running Suite: Controller Suite
===============================
Random Seed: 1642004521
Will run 0 of 0 specs

STEP: bootstrapping test environment
2022-01-12T17:22:01.348+0100	DEBUG	controller-runtime.test-env	starting control plane
2022-01-12T17:22:01.353+0100	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 0, "error": "exec: \"etcd\": executable file not found in $PATH"}
github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113
github.com/onsi/ginkgo/internal/leafnodes.(*runner).run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64
github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runBeforeSuite
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:123
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:63
github.com/onsi/ginkgo/internal/suite.(*Suite).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79
github.com/onsi/ginkgo.runSpecsWithCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238
github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221
github.com/mondoolabs/mondoo-operator/controllers.TestAPIs
	/Users/harsha/mondoo-operator/controllers/suite_test.go:47
testing.tRunner
	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259
2022-01-12T17:22:01.354+0100	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 1, "error": "exec: \"etcd\": executable file not found in $PATH"}
github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113
github.com/onsi/ginkgo/internal/leafnodes.(*runner).run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64
github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runBeforeSuite
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:123
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:63
github.com/onsi/ginkgo/internal/suite.(*Suite).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79
github.com/onsi/ginkgo.runSpecsWithCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238
github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221
github.com/mondoolabs/mondoo-operator/controllers.TestAPIs
	/Users/harsha/mondoo-operator/controllers/suite_test.go:47
testing.tRunner
	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259
2022-01-12T17:22:01.354+0100	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 2, "error": "exec: \"etcd\": executable file not found in $PATH"}
github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113
github.com/onsi/ginkgo/internal/leafnodes.(*runner).run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64
github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runBeforeSuite
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:123
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:63
github.com/onsi/ginkgo/internal/suite.(*Suite).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79
github.com/onsi/ginkgo.runSpecsWithCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238
github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221
github.com/mondoolabs/mondoo-operator/controllers.TestAPIs
	/Users/harsha/mondoo-operator/controllers/suite_test.go:47
testing.tRunner
	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259
2022-01-12T17:22:01.355+0100	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 3, "error": "exec: \"etcd\": executable file not found in $PATH"}
github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113
github.com/onsi/ginkgo/internal/leafnodes.(*runner).run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64
github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runBeforeSuite
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:123
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:63
github.com/onsi/ginkgo/internal/suite.(*Suite).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79
github.com/onsi/ginkgo.runSpecsWithCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238
github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221
github.com/mondoolabs/mondoo-operator/controllers.TestAPIs
	/Users/harsha/mondoo-operator/controllers/suite_test.go:47
testing.tRunner
	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259
2022-01-12T17:22:01.355+0100	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 4, "error": "exec: \"etcd\": executable file not found in $PATH"}
github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113
github.com/onsi/ginkgo/internal/leafnodes.(*runner).run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64
github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runBeforeSuite
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:123
github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:63
github.com/onsi/ginkgo/internal/suite.(*Suite).Run
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79
github.com/onsi/ginkgo.runSpecsWithCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238
github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters
	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221
github.com/mondoolabs/mondoo-operator/controllers.TestAPIs
	/Users/harsha/mondoo-operator/controllers/suite_test.go:47
testing.tRunner
	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259
Failure [0.007 seconds]
[BeforeSuite] BeforeSuite
/Users/harsha/mondoo-operator/controllers/suite_test.go:52

  Unexpected error:
      <*fmt.wrapError | 0x140004a4860>: {
          msg: "unable to start control plane itself: failed to start the controlplane. retried 5 times: exec: \"etcd\": executable file not found in $PATH",
          err: <*fmt.wrapError | 0x140004a4820>{
              msg: "failed to start the controlplane. retried 5 times: exec: \"etcd\": executable file not found in $PATH",
              err: <*exec.Error | 0x140004a47c0>{
                  Name: "etcd",
                  Err: <*errors.errorString | 0x14000366f10>{
                      s: "executable file not found in $PATH",
                  },
              },
          },
      }
      unable to start control plane itself: failed to start the controlplane. retried 5 times: exec: "etcd": executable file not found in $PATH
  occurred

  /Users/harsha/mondoo-operator/controllers/suite_test.go:62
------------------------------
STEP: tearing down the test environment
Panic [0.000 seconds]
[AfterSuite] AfterSuite
/Users/harsha/mondoo-operator/controllers/suite_test.go:76

  Test Panicked
  runtime error: invalid memory address or nil pointer dereference
  /opt/homebrew/Cellar/go/1.17.5/libexec/src/runtime/panic.go:221

  Full Stack Trace
  sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane.(*APIServer).Stop(0x140001be0e0)
  	/Users/harsha/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.0/pkg/internal/testing/controlplane/apiserver.go:417 +0x24
  sigs.k8s.io/controller-runtime/pkg/internal/testing/controlplane.(*ControlPlane).Stop(0x140001e8000)
  	/Users/harsha/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.0/pkg/internal/testing/controlplane/plane.go:87 +0x40
  sigs.k8s.io/controller-runtime/pkg/envtest.(*Environment).Stop(0x140001e8000)
  	/Users/harsha/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.0/pkg/envtest/server.go:194 +0xfc
  github.com/mondoolabs/mondoo-operator/controllers.glob..func2()
  	/Users/harsha/mondoo-operator/controllers/suite_test.go:78 +0x50
  github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0x140001134a0)
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113 +0x9c
  github.com/onsi/ginkgo/internal/leafnodes.(*runner).run(0x140001134a0)
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64 +0xe8
  github.com/onsi/ginkgo/internal/leafnodes.(*simpleSuiteNode).Run(0x140001806e0, 0x1, 0x1, {0x0, 0x0})
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/suite_nodes.go:25 +0x64
  github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runAfterSuite(0x14000166dc0)
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:138 +0x90
  github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run(0x14000166dc0)
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:71 +0xc8
  github.com/onsi/ginkgo/internal/suite.(*Suite).Run(0x14000393490, {0x10342b978, 0x14000212b60}, {0x101cb0ece, 0x10}, {0x1400007f9a0, 0x2, 0x2}, {0x10213cc78, 0x14000467780}, ...)
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79 +0x3e0
  github.com/onsi/ginkgo.runSpecsWithCustomReporters({0x1021002c0, 0x14000212b60}, {0x101cb0ece, 0x10}, {0x1400007f980, 0x2, 0x2})
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238 +0x13c
  github.com/onsi/ginkgo.RunSpecsWithDefaultAndCustomReporters({0x1021002c0, 0x14000212b60}, {0x101cb0ece, 0x10}, {0x140004f8758, 0x1, 0x1})
  	/Users/harsha/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:221 +0x180
  github.com/mondoolabs/mondoo-operator/controllers.TestAPIs(0x14000212b60)
  	/Users/harsha/mondoo-operator/controllers/suite_test.go:47 +0xe4
  testing.tRunner(0x14000212b60, 0x1020f4e78)
  	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1259 +0x104
  created by testing.(*T).Run
  	/opt/homebrew/Cellar/go/1.17.5/libexec/src/testing/testing.go:1306 +0x328
------------------------------


Ran 0 of 0 Specs in 0.007 seconds
FAIL! -- 0 Passed | 0 Failed | 0 Pending | 0 Skipped
You're using deprecated Ginkgo functionality:
=============================================
Ginkgo 2.0 is under active development and will introduce (a small number of) breaking changes.
To learn more, view the migration guide at https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md
To comment, chime in at https://github.com/onsi/ginkgo/issues/711

  You are using a custom reporter.  Support for custom reporters will likely be removed in V2.  Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter.  In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports.

  If this change will be impactful to you please leave a comment on https://github.com/onsi/ginkgo/issues/711
  Learn more at: https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md#removed-custom-reporters

To silence deprecations that can be silenced set the following environment variable:
  ACK_GINKGO_DEPRECATIONS=1.16.4

--- FAIL: TestAPIs (0.01s)
FAIL
coverage: 0.0% of statements
FAIL	github.com/mondoolabs/mondoo-operator/controllers	0.287s
FAIL
make: *** [test] Error 1

Environment

Kubernetes cluster type:
minikube

$ operator-sdk version
operator-sdk version: "v1.15.0", commit: "f6326e832a8a5e5453d0ad25e86714a0de2c0fc8", kubernetes version: "v1.21", go version: "go1.17.5", GOOS: "darwin", GOARCH: "arm64"

This bug is possibly related to an underlying open issue(operator-framework/operator-sdk#5090) with kubebuilder. Operator SDK depends on kubebuilder

@harshaisgud
Copy link
Contributor Author

harshaisgud commented Jan 13, 2022

Fixed by using amd64 binaries and Rosetta2 translation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant