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

cargo zigbuild --target universal2-apple-darwin failed #283

Open
cherish-ltt opened this issue Oct 10, 2024 · 3 comments
Open

cargo zigbuild --target universal2-apple-darwin failed #283

cherish-ltt opened this issue Oct 10, 2024 · 3 comments

Comments

@cherish-ltt
Copy link

cherish-ltt commented Oct 10, 2024

command:
cargo zigbuild --target universal2-apple-darwin
err_msg:
rror: linking with C:\Users\Administrator\AppData\Local\cargo-zigbuild\0.19.3\zigcc-x86_64-apple-darwin-db1e.batfailed: exit code: 1 ....... = note: error: unsupported linker arg: -exported_symbols_list
use:Rust-v1.81.0,cargo-zigbuild-v0.19.3
platform:win11_64

@messense
Copy link
Member

Could you please provide full steps for repro including the Rust code you were compiling?

@runfalk
Copy link

runfalk commented Oct 16, 2024

I ran into the same issue, but for the targets x86_64-apple-darwin and aarch64-apple-darwin. This happened when I updated from Rust 1.75.0 to 1.81.0. Other versions:

  • zig 0.12.0
  • cargo-zigbuild 0.18.4

I then updated to:

  • zig 0.13.0
  • cargo-zigbuild 0.19.3

This seems to resolve the problem, but I'm seeing this warning instead:

warning: stripping debug info with `strip` failed: exit status: 1
  |
  = note: strip: /builds/org/repo/target/aarch64-apple-darwin/release/deps/libcratename.dylib: file format not recognized

Build command: cargo zigbuild --release --target x86_64-apple-darwin --package cratename

@lacker
Copy link

lacker commented Oct 17, 2024

I also have been getting a warning from strip, "file format not recognized", when targeting aarch64-apple-darwin from linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants