-
Notifications
You must be signed in to change notification settings - Fork 821
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
arm64 binary does not detect Mac OS keychain #758
Comments
I can confirm the same behaviour on a MacBook Pro M1, using aws-vault v6.3.0 |
I've also been bitten by the original issue. However: I cloned the repo, built both
Obviously this is a handy workaround, and suggests there's nothing wrong with the code, but I've not worked out why the released binaries (in my case via homebrew) are missing keychain support. |
Interesting... perhaps because I'm cross-compiling? |
Yup, that looks like that's it. I cross-compiled
Now, the fun bit will be working out why. |
it might be this 99designs/keyring@756c48d |
This is an attempt to fix a lack of keychain support in darwin/arm64 binaries that have been cross-compiled on other platforms as described in 99designs#758 and hinted at in the linked 99designs/keyring@756c48d Given the keychain support from keyring[1] is provided by cgo, and CGO is disabled by default in cross-compilation, we need to enable that, and deal with dev tooling/libraries. I dug this solution from the Go issues, specifically golang/go#44112 Be warned, I am not familiar with the ins and outs of Go compilation, especially when it comes to cross-compilation of CGO code, but at least in this case, this change allows for a functional cross-compiled binary. I fully expect that attempting to cross-compile darwin/arm64 on anything other than darwin/amd64 (or the opposite way around) is going to end badly. [1] https://github.com/99designs/keyring
This is an attempt to fix a lack of keychain support in darwin/arm64 binaries that have been cross-compiled on other platforms as described in 99designs#758 and hinted at in the linked 99designs/keyring@756c48d Given the keychain support from keyring[1] is provided by cgo, and CGO is disabled by default in cross-compilation, we need to enable that, and deal with dev tooling/libraries. I dug this solution from the Go issues, specifically golang/go#44112 Be warned, I am not familiar with the ins and outs of Go compilation, especially when it comes to cross-compilation of CGO code, but at least in this case, this change allows for a functional cross-compiled binary. I fully expect that attempting to cross-compile darwin/arm64 on anything other than darwin/amd64 (or the opposite way around) is going to end badly. [1] https://github.com/99designs/keyring
#760 appears to Work For Me™, but as mentioned on the PR, it definitely needs eyes from someone with more of an idea of Go generally, Go/CGO cross-compilation and perhaps most importantly the release process for aws-vault. |
@bazbremner thank you for the quick fix ! |
.aws/config
(redacted if necessary)aws-vault --debug
(redacted if necessary)I upgraded was-vault today, and brew installed the arm64 binary (yay!), but seems like it does not work:
The x86_64 binary still works fine:
AWS config:
Debug:
The text was updated successfully, but these errors were encountered: