Go project using go-keychain fails with GOOS=linux

未关闭
#4,309 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
go
领域
build-system

调研方向

首先重现报告的 GOOS=linux GOARCH=arm64 构建命令,并将其行为与 go-keychain README 中描述的 Linux 支持进行比较。检查 runtime/cgo/linux_syscall.c 中的引用以及 macOS SDK 的 unistd.h 声明。完成的标准是确定此交叉构建是否受支持,并记录或解决报告的失败。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
没有语言数据
星标
899
派生
40
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

keybase/keybase-issues 的其他 Issue

查看 keybase/keybase-issues 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。