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

Documented build process fails for vault plugin with current golang 1.15 #3

Closed
priyanknarvekar opened this issue Nov 30, 2020 · 2 comments · Fixed by #4
Closed

Documented build process fails for vault plugin with current golang 1.15 #3

priyanknarvekar opened this issue Nov 30, 2020 · 2 comments · Fixed by #4

Comments

@priyanknarvekar
Copy link

It appears that as of golang 1.15, the arch support for darwin/386 was removed (golang/go#37610)

Documentation does not indicate the golang version it has been tested with.

We need to document the golang version that the code and build process has been tested with and/or update the build scripts to not build for arch darwin/386

Build Output:

$ make
==> Checking that code complies with gofmt requirements...
==> Removing old directory...
==> Building...
Number of parallel builds: 7

-->      netbsd/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     windows/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->    darwin/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     linux/arm64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->   openbsd/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->   freebsd/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     freebsd/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->    netbsd/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->       linux/arm: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     linux/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->   windows/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     openbsd/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->       linux/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->      netbsd/arm: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->     freebsd/arm: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->      darwin/386: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud
-->   solaris/amd64: vault-plugin-auth-ibmcloud/cmd/vault-plugin-auth-ibmcloud

1 errors occurred:
--> darwin/386 error: exit status 2
Stderr: cmd/go: unsupported GOOS/GOARCH pair darwin/386

Makefile:10: recipe for target 'bin' failed
make: *** [bin] Error 1
@smatzek
Copy link
Contributor

smatzek commented Nov 30, 2020

In my testing I used Go 1.14.2 and Vault 1.5.0.

The build scripts match what is in the GCP and Azure plugins, which do contain "darwin/386". The build process used to build Vault, which pulls in the plugins and builds them is setting up the arch differently than how it defaults when called by make.

I can recreate this problem at Go 1.15.5. To build this with Go 1.15.5, remove "darwin/386" from
https://github.com/ibm-cloud-security/vault-plugin-auth-ibmcloud/blob/main/scripts/build.sh#L26

@smatzek
Copy link
Contributor

smatzek commented Nov 30, 2020

Another, simpler workaround is to run make dev which will build the binary for your local architecture and will skip all of the others, including the problematic darwin/386 arch.

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

Successfully merging a pull request may close this issue.

2 participants