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

ZcashLightClientKit/lib/libzcashlc.a - building for Mac Catalyst, but linking in object file built for , for architecture x86_64 #20

Open
satindergrewal opened this issue Jun 21, 2021 · 2 comments
Assignees
Labels
bug Something isn't working phase x future features to plan
Milestone

Comments

@satindergrewal
Copy link
Member

Trying to compile wallet from branch arrr-mac gives following errors for TinyQRScanner dependency under Pods:

'AVCaptureSession' is only available in Mac Catalyst 14.0 or newer

To resolve it, change the "macOS" version from 10..5.1 to 11.0.

After that when building the project, it gives errors about libzcashlc.a as follows:

ld: in /Users/satinder/repo/meshbits/pirate-chain-ios-wallet/wallet/Pods/ZcashLightClientKit/lib/libzcashlc.a(zcashlc-c99a8b34047907fb.zcashlc.cgphjfl4-cgu.10.rcgu.o), building for Mac Catalyst, but linking in object file built for , for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@satindergrewal satindergrewal added the bug Something isn't working label Jun 21, 2021
@satindergrewal satindergrewal added this to the Phase X milestone Jun 21, 2021
@satindergrewal satindergrewal self-assigned this Jun 21, 2021
@satindergrewal
Copy link
Member Author

satindergrewal commented Jun 21, 2021

found issue with rust: https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3
It does actually has support coming for Mac Catalyst, but at the moment, it's not fully supported.

target				std		host		notes
aarch64-apple-ios-macabi	?				Apple Catalyst on ARM64
? indicates the standard library support is unknown or a work-in-progress.

I'll see if I can try some hacky way in the meantime, but we have at least tracked the accurate issue and it's expected solution direct from the language
as soon as it is even available in beta, I'll try that then
right now focusing on other important tasks

Pushed relevant conditional update to ZcashLightClientKit to be ready for this update: Meshbits/ZcashLightClientKit@01b6ed0

@satindergrewal
Copy link
Member Author

satindergrewal commented Jun 24, 2021

For compiling rust code for Mac Catalyst, I found these two relevant links:
rust-lang/rust#80215

The day this github repo gives the binary compatible with Mac Catalyst we will have a usable solution for macOS App :)
https://github.com/visigoth/catalystsample

Right now compiling with nightly version of rust still gives this output:

➜  catalystsample git:(master) ✗ rustup default
nightly-x86_64-apple-darwin (default)
➜  catalystsample git:(master) ✗ rustc --version
rustc 1.55.0-nightly (6a758ea7e 2021-06-22)

➜  catalystsample git:(master) ✗ file target/x86_64-apple-ios-macabi/debug/catalystsample
target/x86_64-apple-ios-macabi/debug/catalystsample: Mach-O 64-bit executable x86_64
➜  catalystsample git:(master) ✗

Whereas like Firefox's arm64 binaries the file should show this:

➜  catalystsample git:(master) ✗ file /Applications/Firefox.app/Contents/MacOS/firefox
/Applications/Firefox.app/Contents/MacOS/firefox: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/Applications/Firefox.app/Contents/MacOS/firefox (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Applications/Firefox.app/Contents/MacOS/firefox (for architecture arm64):	Mach-O 64-bit executable arm64
➜  catalystsample git:(master) ✗

We can do simple test of that catalystsample code in future to verify when our code is ready to test zcash sdk for macOS arm64.

@satindergrewal satindergrewal added the phase x future features to plan label Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working phase x future features to plan
Projects
None yet
Development

No branches or pull requests

1 participant