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

Go project using go-keychain fails with GOOS=linux #4309

Open
henriquevcosta opened this issue Feb 23, 2025 · 1 comment
Open

Go project using go-keychain fails with GOOS=linux #4309

henriquevcosta opened this issue Feb 23, 2025 · 1 comment

Comments

@henriquevcosta
Copy link

I was trying to build some tooling using keybase/go-keychain to interact with keychain, since the README seemed to indicate that it also worked in Linux (I assumed that it was with a system keyring).

However, when trying to build my project on my mac I get the following.
I'm pretty new to the Go world, I apologise if this is something really dummy.

Go 1.23.6
MacOS 15.3.1 / Darwin 24.3

❯ CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -v ./...                             
runtime/cgo
# runtime/cgo
linux_syscall.c:67:13: error: call to undeclared function 'setresgid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
linux_syscall.c:67:13: note: did you mean 'setregid'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:593:6: note: 'setregid' declared here
linux_syscall.c:73:13: error: call to undeclared function 'setresuid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
linux_syscall.c:73:13: note: did you mean 'setreuid'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:595:6: note: 'setreuid' declared here
@henriquevcosta
Copy link
Author

Nevermind, I've looked inside and seen the use of buildtags, so while the README mentions linux I get that the "keychain" package is macos-only.

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