-
Notifications
You must be signed in to change notification settings - Fork 459
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
cc 1.0.85
breaks cross-compilation x86_64 Linux -> {x86_64,aarch64} Darwin
#948
Comments
Is it possible that zig doesn't support |
@NobodyXu Why'd you yank the latest |
Interested to see how this even worked before. Is the problem
Seems unlikely? The It would be helpful to get a verbose cargo build log from your CI or local machines when this actually worked to compare the flags passed to |
Hello @rvolosatovs we need more information to solve this. |
After checking the build log, I believe it probably doesn't have |
I think this might be a zig issue, so it should not block the new release of cc. |
I've set For comparison, this is the same build, that succeeds with 1.0.83: |
Hmmm, I can't find the compilation output for ring, it seems to be cached? |
Here's something a bit more useful with
|
Here's 1.0.85:
|
Side-by-side:
1.0.85:
I am not sure if that's the only issue, but I'm quite sure Zig would not be too happy about the I'm curious why |
That was it, sprinkled a little
in the I would really like not having to string-replace the compiler args in the script, any idea how this could be fixed? (it appears that the |
(Sorry that's wrong) Since clang supports it, and zig-cc is based on clang and is supposed to be a thin-wrapper to make cross-compilation easier while retaining compatibility, I think the reasonable fix is for zig-cc to fix it. |
I dont actually know which PR introduced the passing of Thank you for the side-by-side text @rvolosatovs. It will make bisecting this easier. |
In theory |
Agree that this is a |
Just string-replacing for the time being and waiting for a fix upstream sounds good to me, closing |
Strange enough, this doesn't cause in the |
can you elaborate please? Do you mean that compiling on macOS with zig-cc does not have this problem? |
It works fine on local Mac ( |
Are you using zig-cc for cross compilation to mac? If so, then I can't imagine why it would success to local mac running Linux VM but not ubuntu-latest, given that the zig-cc still hasn't got support for --target |
stripping out |
You mean removing --target from cargo-build makes it work? Or is it removing it from zig-cc? |
removing from |
I see, so not setting --target in cargo also avoids passing --target ti zig-cc
|
Small note here, since I was already setting the The right-most zig cc flag seems to override any previously supplied-values |
We use Zig as a C compiler and
rust-lld
as linker to cross-compile Rust from x86_64 (or aarch64) Linux to {x86_64,aarch64} Darwin.Updating cc from 1.0.83 to 1.0.85 breaks compilation for these.
Not sure if that's caused by
cc
directly or whether that's a problem in Ring.x86_64-unknown-linux-gnu -> aarch64-apple-darwin
x86_64-unknown-linux-gnu -> x86_64-apple-darwin
Refs bytecodealliance/wit-deps#118
For reference, the zigcc script is defined at https://github.com/rvolosatovs/nixify/blob/3e34d28daa53c41ae615360f4c106cc1771ae869/lib/rust/mkAttrs.nix#L297-L312
The text was updated successfully, but these errors were encountered: