rust-cross/cargo-zigbuild

cargo zigbuild --target universal2-apple-darwin failed

Opened this issue · 3 comments

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

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

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

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