You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks as of rust-lang/rust#108017, upstream llvm defaults to passing -undefined-version when it detect lld, which Rustc overrides with --no-undefined-version, which Zig doesn't know about yet. (See https://reviews.llvm.org/D135402 for more details)
Could these two flag be implemented (or at least turn --no-undefined-version into a no-op for now)?
It's a bit complicated to get a reduced repro case so hopefully this is clear enough, but let me know if you really need one.
I've also run into this issue, but the solution proposed by @dbanetto isn't going to work for me, as some dependent libraries require rust_version >= 1.70.0.
Couple additional notes:
This does not occur when using cargo zigbuild, just with the hermetic bazel toolchain thing
As a result, I've opened up a PR #17326 adding this, but would really welcome a second set of eyes (it feels wrong/incomplete to me) to make sure that i'm parsing / passing the flag around correctly from the zig cc invocation to actual LLVM. I'm happy to flesh this out more and I hope this can land in zig-next to unbreak that toolchain :)
Activity
DavidZbarsky-at commentedon Aug 16, 2023
If ignoring
--no-undefined-versionfor now is an acceptable fix, I'm happy to send a PR, should be trivial.dbanetto commentedon Aug 22, 2023
Hey @DavidZbarsky-at,
I've also run into this using https://github.com/uber/hermetic_cc_toolchain with zig
0.11.0& https://github.com/bazelbuild/rules_rust with rustc1.71.I found that rolling back to rust version
1.69.0works around this issue for me due to rust-lang/rust#108017 is included 1.70.0 on-wards.DhashS commentedon Sep 29, 2023
I've also run into this issue, but the solution proposed by @dbanetto isn't going to work for me, as some dependent libraries require
rust_version >= 1.70.0.Couple additional notes:
cargo zigbuild, just with the hermetic bazel toolchain thingAs a result, I've opened up a PR #17326 adding this, but would really welcome a second set of eyes (it feels wrong/incomplete to me) to make sure that i'm parsing / passing the flag around correctly from the
zig ccinvocation to actual LLVM. I'm happy to flesh this out more and I hope this can land in zig-next to unbreak that toolchain :)NuLL3rr0r commentedon Nov 8, 2023
@DhashS thank you for mentioning cargo zigbuild. That also works for me.
atoav commentedon Nov 24, 2023
I am not sure if this is the right place, but I had a Rust/Python project that was broken by this. I build python wheels using maturin:
Using a rustc 1.74 this failed with the mentioned error.
I could get it to build again by reverting back to 1.69 as mentioned above:
Is this issue still looked into? I'd love to be able to use a newer rustc version.