keybase / keybase/keybase-issues
Go project using go-keychain fails with GOOS=linux
- Dominant language
- No language data
- Stars
- 899
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported GOOS=linux GOARCH=arm64 build command and compare its behavior with the Linux support described in the go-keychain README. Inspect the runtime/cgo/linux_syscall.c references and the macOS SDK unistd.h declarations. Done means establishing whether this cross-build is supported and documenting or resolving the reported failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100