cosmos-sdk: [Bug]: Build for iOS fails on keyring package dependency
Summary of Bug
Building to iOS target fails because of building errors of keyring.
Version
Using v0.47.3
Steps to Reproduce
- Try to build for iOS target using
gomobile bind -ldflags='-s -w' -target=ios
Output:
/nix/store/gizbq4q5h49ryijyhzx7arlrnkxpf47y-gomobile-unstable-2023-03-01/bin/gomobile: iossimulator/amd64: go build -ldflags -s -w -buildmode=c-archive -o /var/folders/m6/fx641jqn0lq3pzwqkkh60p4c0000gn/T/gomobile-work-3352046974/signing-iossimulator-amd64.a ./gobind failed: exit status 1
# github.com/99designs/keyring
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:56:9: query.SetMatchSearchList undefined (type keychain.Item has no field or method SetMatchSearchList)
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:56:39: undefined: gokeychain.NewWithPath
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:116:45: undefined: gokeychain.Keychain
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:125:13: queryItem.SetMatchSearchList undefined (type keychain.Item has no field or method SetMatchSearchList)
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:137:9: kcItem.SetAccess undefined (type keychain.Item has no field or method SetAccess)
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:147:20: undefined: gokeychain.Keychain
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:167:10: kcItem.UseKeychain undefined (type keychain.Item has no field or method UseKeychain)
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:182:10: kcItem.SetAccess undefined (type keychain.Item has no field or method SetAccess)
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:182:32: undefined: gokeychain.Access
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:268:47: undefined: gokeychain.Keychain
/Users/user/go/pkg/mod/github.com/99designs/keyring@v1.2.1/keychain.go:182:32: too many errors
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15 (9 by maintainers)
One use-case that I’d advocate for would be running celestia-node (in light client mode) on an IPhone.
Currently, this dependency seems blocking this. Similarly, compiling the code to wasm seems blocked on this. I think this can be worked around in celestia-node as well but I’ll see what I can find out. Once I have more info, I’ll post here too.
as you can see we asked to better understand the goals the author is trying to achieve. Opening an issue with something we never said we supported and then not providing any information is the reason this issue was closed.
If youd like us to help in solving this issue, could you provide some context on why the sdk should be compiled to ios besides your comment on the amount of users? What are you building? what are you trying to achieve
@raynaudoe Actually I got it working after all , building celestia on iPhone and things worked just fine
https://github.com/fxfactorial/celestia-iphone
I commented out all the things breaking the compile,
https://github.com/fxfactorial/keyring/commit/2d2058e167eced903cab1cab1e6229b8fbc889ee