-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
can not cross build for aarch64-apple-darwin and x86_64-apple-darwin #50
Comments
No, the error is from |
You can supply a |
I think you can use
if you are building on macOS. |
Thanks for the quick reply. It works 👍 |
Unfortunately, the artifacts of zigbuild are not executable on macOS.
But the result of How can I help you debug this problem? |
Can you run it through |
I tried some parameters and finally found that the build profile was the problem. When I removed [profile.release]
strip = true
lto = true
codegen-units = 1
panic = "abort" Could you please describe in more detail some of the operations of lldb if you need some additional information? |
lldb ./target/aarch64-apple-darwin/release/binary
run If it crashes lldb should stop and present you a stacktrace, run |
Something strange happened: When I run But when I execute it the second time using lldb it exits directly.
|
After simple testing, the problem appears to exist only in target on Intel Macbook Pro: on M1 Pro: |
FYI, if you are already building on macOS, |
Thanks, I mainly use |
I suspect it's a zig issue, consider report to zig if you can reproduce it with |
Might still be helpful because of this issue: rust-lang/rust#55235. Just stumbled over this today... currently not able to build a x86_64 Apple binary on M1 MacBook Pro :( EDIT: found a workaround.... install the x86_64 toolchain along with the aarch64 one
and then run
Worked even with some C (-sys) crates involved. |
Rust version: rustc 1.62.1 (e092d0b6b 2022-07-16)
OS: macOS Monterey
Arch: aarch64
It fails on cross build (x86_64-apple-darwin and aarch64-apple-darwin)
seems it's a zig linker args issue: ziglang/zig#10999?
The text was updated successfully, but these errors were encountered: