Skip to content

Reoder order in which MinGW libs are linked to fix recent breakage - #73184

Merged
bors merged 1 commit into
rust-lang:masterfrom
mati865:fix-mingw-libs-order
Jun 11, 2020
Merged

Reoder order in which MinGW libs are linked to fix recent breakage#73184
bors merged 1 commit into
rust-lang:masterfrom
mati865:fix-mingw-libs-order

Conversation

@mati865

Copy link
Copy Markdown
Member

Recent upstream mingw-w64 changes made libmsvcrt depend on libmingwex breaking compilation in some cases when using external MinGW.

Applying this change to the master fixes nightly and stage{1,2} build. For stage0 one has to export RUSTFLAGS_BOOTSTRAP='-C link-arg=-lmsvcrt' until this PR lands in bootstrap compiler.
Therefore I'm humbly asking to also backport it to the beta and update bootstrap compiler.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 9, 2020
@petrochenkov

Copy link
Copy Markdown
Contributor

r? @petrochenkov
@bors r+ rollup (assuming this order works with older mingw as well)

@bors

bors commented Jun 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e237e02 has been approved by petrochenkov

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2020
@petrochenkovpetrochenkov added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 10, 2020
@petrochenkov

Copy link
Copy Markdown
Contributor

Relevant discussion - #72241 (comment) and below.

@mati865

Copy link
Copy Markdown
MemberAuthor

I don't expect it to fail with old MinGW but who knows 🤷
I've started clean build but it will take some time to finish.

@mati865

Copy link
Copy Markdown
MemberAuthor

It built just fine on my PC with mingw-w64 6.3.0.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 10, 2020
Rollup of 9 pull requests
Successful merges:
- rust-lang#72706 (Add windows group to triagebot)
- rust-lang#72789 (resolve: Do not suggest imports from the same module in which we are resolving)
- rust-lang#72890 (improper ctypes: normalize return types and transparent structs)
- rust-lang#72897 (normalize adt fields during structural match checking)
- rust-lang#73005 (Don't create impl candidates when obligation contains errors)
- rust-lang#73023 (Remove noisy suggestion of hash_map )
- rust-lang#73070 (Add regression test for const generic ICE in rust-lang#72819)
- rust-lang#73157 (Don't lose empty `where` clause when pretty-printing)
- rust-lang#73184 (Reoder order in which MinGW libs are linked to fix recent breakage)
Failed merges:
r? @ghost
@bors
bors merged commit 2b8f1ec into rust-lang:masterJun 11, 2020
Comment threadsrc/librustc_target/spec/windows_gnu_base.rs
@mati865
mati865 deleted the fix-mingw-libs-order branch June 11, 2020 18:19
@petrochenkovpetrochenkov added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 12, 2020
@pnkfelix

Copy link
Copy Markdown
Contributor

discussed in T-compiler meeting; we are a little nervous about the old MinGW scenario, so we're going to wait a week and reconsider backporting this next week, to give people in the community more time to find problems via nightly.

@petrochenkov

Copy link
Copy Markdown
Contributor

CI has old mingw and this PR passed it.
I have new mingw locally and this PR fixes my build of rustc locally.
(rustc itself is a complex project using C dependencies, and it's how the issue was discovered - #72241 (comment))

@tmandry

tmandry commented Jun 27, 2020

Copy link
Copy Markdown
Member

@mati865 is there a reason we couldn't we use --start-group and --end-group as you suggested in #72241 (comment), to prevent this from breaking in the future?

EDIT: And thanks, this plus the RUSTFLAGS_BOOTSTRAP option fixed my local build as well.

@mati865

Copy link
Copy Markdown
MemberAuthor

@tmandry see #72241 (comment)

@pnkfelix

Copy link
Copy Markdown
Contributor

discussed in last week's T-compiler meeting

Approved for beta backport.

@mati865

Copy link
Copy Markdown
MemberAuthor

I should have been more explicit but

It built just fine on my PC with mingw-w64 6.3.0.

is the old mingw-w64 build (exactly the same as used on the CI).

@mati865

Copy link
Copy Markdown
MemberAuthor

@rustbot modify labels: +beta-accepted

Label is missing.

@rustbot

Copy link
Copy Markdown
Collaborator

Error: Label beta-accepted can only be set by Rust team members

Please let @rust-lang/release know if you're having trouble with this bot.

@mati865mati865 mentioned this pull request Jul 6, 2020
@pnkfelix

Copy link
Copy Markdown
Contributor

@rustbot modify labels: +beta-accepted

@rustbotrustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 8, 2020
@Mark-SimulacrumMark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 10, 2020
@Mark-SimulacrumMark-Simulacrum mentioned this pull request Jul 10, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 13, 2020
…ulacrum
[beta] next
Backports of:
* rustdoc: Fix doc aliases with crate filtering rust-lang#73644
* rustdoc: Rename invalid_codeblock_attribute lint to be plural rust-lang#74131
* rustc_lexer: Simplify shebang parsing once more rust-lang#73596
* Perform obligation deduplication to avoid buggy `ExistentialMismatch` rust-lang#73485
* Reorder order in which MinGW libs are linked to fix recent breakage rust-lang#73184
* Change how compiler-builtins gets many CGUs rust-lang#73136
* Fix wasm32 being broken due to a NodeJS version bump rust-lang#73885
@cuvipercuviper added this to the 1.46 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@mati865@rust-highfive@petrochenkov@bors@pnkfelix@tmandry@rustbot@RalfJung@cuviper@Mark-Simulacrum@matthewjasper