keybase / go-keychain

Golang keychain package for iOS and macOS
MIT License
566 stars 118 forks source link

`undefined: keychain.NewItem` when building for Linux from macOS #92

Open MuweiHe opened 1 year ago

MuweiHe commented 1 year ago

Hello! I see Linux support is mentioned in readme, but when I try to build for Linux, I'm seeing many undefined errors. Is Linux support official? Thank you!

Saw a few other discussions using xgo: https://github.com/karalabe/xgo, and using different build files for different os: https://github.com/keybase/go-keychain/issues/14. Is this package only meant to be called in darwin, and not supposed to be called in other os? How to make it work like mentioned in readme, communicates to a provider of the DBUS SecretService spec like gnome-keyring or ksecretservice.?

chyroc commented 1 year ago

add env: CGO_ENABLED=1

unkaktus commented 8 months ago

@chyroc this will work compiling for macOS, but not cross-compiling for Linux. The Cgo deps require the same build and target platforms (e.g. glibc).

austince commented 1 month ago

Seems like there is a cross-platform implementation that execs the binaries directly https://github.com/zalando/go-keyring