Skip to content
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

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

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

mati865
Copy link
Contributor

@mati865 mati865 commented Jun 9, 2020

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
Collaborator

r? @matthewjasper

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

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

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

@bors
Copy link
Contributor

bors commented Jun 10, 2020

📌 Commit e237e02 has been approved by petrochenkov

@bors bors 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
@petrochenkov petrochenkov added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 10, 2020
@petrochenkov
Copy link
Contributor

Relevant discussion - #72241 (comment) and below.

@mati865
Copy link
Contributor Author

mati865 commented Jun 10, 2020

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
Contributor Author

mati865 commented Jun 10, 2020

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:master Jun 11, 2020
@mati865 mati865 deleted the fix-mingw-libs-order branch June 11, 2020 18:19
@petrochenkov petrochenkov 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
Member

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
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
Copy link
Member

tmandry commented Jun 27, 2020

@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
Contributor Author

mati865 commented Jun 27, 2020

@tmandry see #72241 (comment)

@pnkfelix
Copy link
Member

pnkfelix commented Jul 2, 2020

discussed in last week's T-compiler meeting

Approved for beta backport.

@mati865
Copy link
Contributor Author

mati865 commented Jul 2, 2020

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
Contributor Author

mati865 commented Jul 2, 2020

@rustbot modify labels: +beta-accepted

Label is missing.

@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2020

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.

@mati865 mati865 mentioned this pull request Jul 6, 2020
@pnkfelix
Copy link
Member

pnkfelix commented Jul 8, 2020

@rustbot modify labels: +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 8, 2020
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 10, 2020
@Mark-Simulacrum Mark-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
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.