-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Windows builds fail to link C++ static library #107162
Comments
cc @bjorn3 |
As workaround adding windows to
Could you post a hex dump of the first 16 or so bytes of the js_static.lib archive to see the magic bytes of this file. |
Here is hexdump:
Here is GitHub action of working one: https://github.com/sagudev/mozjs/actions/runs/3974783209 and here is GitHub action of defect one: https://github.com/sagudev/mozjs/actions/runs/3974683394. Artifact contains .lib file, that is produced in |
Yeah, that is indeed very much not a valid archive.
It does look like |
Do you know if this affects all Windows targets or just MSVC based?
|
Ideally we would want to find another case for regression, because mozjs is complicated. |
No, I had checked first step in the readme but the link is dead:
|
Well, those instruction would not be relevant anymore as we are still few SM versions behind if they would be available. Following GitHub Workflows is currently the best way. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
@rustbot label: -P-high +P-critical (Upgrading priority because, until we better understand the scope of this bug, it strikes me as something that might motivate a fast-tracked point release for 1.67.) |
I wonder if we have another case of this issue in #107162 |
You linked this issue itself. |
Could be #107334 |
Oh, I completely misunderstood what the issue was. I thought this was about rustc producing a malformed archive, but it is actually about rustc not being able to read thin archives produced by an external build system. Object indeed doesn't support parsing thin archives and even if it did, it would likely need to be wired up in rustc separately. I think the best course of action is to change
(This would have been so much more painful to revert if I hadn't needed to keep the old LLVM archive writer for wasm.) |
And yes #107334 is very likely a duplicate of this. |
I believe I may be encountering a similar, or related, regression between 1.67 and 1.66 when attempting to build and link against shaderc on MSVC: google/shaderc-rs#133. |
Opened #107360 to revert back to LlvmArchiveWriter, which would fix this issue for now I think. |
@rustbot label: E-needs-test |
(and any such test should probably be beta-backported; see discussion from T-compiler triage meeting) |
…n-archive-reading-for-1-68-beta, r=cuviper Backport reverts to fix thin archive reading for 1 68 beta This is a backport of PR rust-lang#107360 aimed at beta. cc rust-lang#107162, rust-lang#107334 and google/shaderc-rs#133
Downgrading to |
Untagging as a regression, since this has been fixed on beta + stable + nightly at this point as far as I can tell. |
…=jieyouxu Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang#107407 Fixes rust-lang#107162 rust-lang#107495 has been fixed in a previous PR already.
…=jieyouxu Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang#107407 Fixes rust-lang#107162 rust-lang#107495 has been fixed in a previous PR already.
…=jieyouxu Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang#107407 Fixes rust-lang#107162 rust-lang#107495 has been fixed in a previous PR already.
…try> Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang#107407 Fixes rust-lang#107162 rust-lang#107495 has been fixed in a previous PR already. try-job: dist-aarch64-msvc
…ieyouxu Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang#107407 Fixes rust-lang#107162 rust-lang#107495 has been fixed in a previous PR already.
Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang/rust#107407 Fixes rust-lang/rust#107162 rust-lang/rust#107495 has been fixed in a previous PR already.
Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes rust-lang/rust#107407 Fixes rust-lang/rust#107162 rust-lang/rust#107495 has been fixed in a previous PR already.
Code
Building the mozjs crate for any Windows target stopped working after #97485. mozjs has a build script that compiles the C++ library SpiderMonkey into
js_static.a
, which is then linked. Before #97485, these builds worked successfully. Since that PR was merged, CI using nightly and beta toolsets targeting MSVC x86_64 and UWP x86_64 now fail to build with the following error:This was first reported in servo/mozjs#327 and servo/mozjs#334.
Version it worked on
2022-12-03 nightly
Rust 1.66 beta
Version with regression
2022-12-04 nightly
Rust 1.67 beta
If you know when this regression occurred, please add a line like below, replacing
{channel}
with one of stable, beta, or nightly.@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: