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

Fix double resolving custom libdir #62497

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Fix double resolving custom libdir #62497

merged 1 commit into from
Aug 20, 2019

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented Jul 8, 2019

Fixes #62496

Related issue is https://bugs.gentoo.org/672816

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(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 Jul 8, 2019
@o01eg
Copy link
Contributor Author

o01eg commented Jul 8, 2019

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: try

I have basically no idea how this works any more and it's just a jungle of configuration and path manipulation. If it builds binaries that I can install via rustup though seems reasonable to me.

@bors
Copy link
Contributor

bors commented Jul 9, 2019

⌛ Trying commit c1aa2a4 with merge 661f42a...

bors added a commit that referenced this pull request Jul 9, 2019
Fix double resolving custom libdir

Fixes #62496

Related issue is https://bugs.gentoo.org/672816
@bors
Copy link
Contributor

bors commented Jul 9, 2019

☀️ Try build successful - checks-azure, checks-travis
Build commit: 661f42a

@alexcrichton
Copy link
Member

@bors: r+

Looks to work!

@bors
Copy link
Contributor

bors commented Jul 10, 2019

📌 Commit c1aa2a4 has been approved by alexcrichton

@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 Jul 10, 2019
@bors
Copy link
Contributor

bors commented Jul 11, 2019

⌛ Testing commit c1aa2a4 with merge 14b5d6495c04d596c07705d12d3081e215adb3db...

@bors
Copy link
Contributor

bors commented Jul 11, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 11, 2019
@o01eg
Copy link
Contributor Author

o01eg commented Jul 11, 2019

Doesn't codegen backend placed in "lib" on windows?

@o01eg
Copy link
Contributor Author

o01eg commented Jul 12, 2019

Tried a workaround for windows codegen path.

@alexcrichton
Copy link
Member

This... seems to just be getting more complicated? Could there at least be a comment as to why "bin" is handled specially? If we don't know why that block is needed other than "it failed on CI mysteriously" I don't think this is perhaps ready to land yet?

@o01eg
Copy link
Contributor Author

o01eg commented Jul 12, 2019

I've added comment.

@alexcrichton
Copy link
Member

This seems like it's just taking the previous code and just adding it to an else clause for "if windows do what previously happened", right? Could this be refactored to be less branch-y and special-case-y with perhaps the libdir function or something that already handles this?

@o01eg
Copy link
Contributor Author

o01eg commented Jul 15, 2019

I'm not sure where it placed on windows.

@o01eg
Copy link
Contributor Author

o01eg commented Jul 15, 2019

@alexcrichton Is it intended to have <sysroot>/lib in sysroot_libdir (https://github.com/rust-lang/rust/blob/master/src/bootstrap/builder.rs#L638), but in rustc_lidbir choose between <sysroot>/lib and <sysroot>/bin if windows.

@alexcrichton
Copy link
Member

Yes thinking about this I don't think this iteration is quite right. It's intentional that rustc_libdir is "bin" on Windows but sysroot_libdir is "lib" by default on Windows. That's basically rustc_libdir is "where do rustc's dlls go" and sysroot_libdir is "where do target libraries go". The former is different across platforms but the latter is the same on all platforms by default.

@JohnTitor
Copy link
Member

Ping from triage: any updates? @o01eg

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2019
@o01eg
Copy link
Contributor Author

o01eg commented Jul 30, 2019

@JohnTitor I've got ideas how to rewrite PR but I'm little busy now.

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-07T20:24:40.6224954Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-07T20:24:40.6401022Z ##[command]git config gc.auto 0
2019-08-07T20:24:40.6464682Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-07T20:24:40.6517161Z ##[command]git config --get-all http.proxy
2019-08-07T20:24:40.6643953Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62497/merge:refs/remotes/pull/62497/merge
---
2019-08-07T20:25:17.9143167Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-07T20:25:17.9143193Z 
2019-08-07T20:25:17.9143557Z   git checkout -b <new-branch-name>
2019-08-07T20:25:17.9143811Z 
2019-08-07T20:25:17.9143852Z HEAD is now at 1260a9955 Merge 5d4ee06c0cea3e6a61961e7f566f044ecad81858 into 647ed20e439e48f7ea88cebc6cad17cb85e63a3d
2019-08-07T20:25:17.9300780Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-07T20:25:17.9303310Z ==============================================================================
2019-08-07T20:25:17.9303533Z Task         : Bash
2019-08-07T20:25:17.9303589Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-07T20:29:08.4923377Z    Compiling serde_derive v1.0.81
2019-08-07T20:29:24.9751873Z    Compiling toml v0.4.10
2019-08-07T20:29:24.9752575Z    Compiling serde_json v1.0.40
2019-08-07T20:29:28.6456726Z    Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
2019-08-07T20:29:31.2787402Z error[E0599]: no method named `sysroot_libdir_relative` found for type `builder::Builder<'a>::sysroot_libdir::Libdir` in the current scope
2019-08-07T20:29:31.2788237Z    --> src/bootstrap/builder.rs:632:32
2019-08-07T20:29:31.2788678Z 618 |         struct Libdir {
2019-08-07T20:29:31.2788678Z 618 |         struct Libdir {
2019-08-07T20:29:31.2789129Z     |         ------------- method `sysroot_libdir_relative` not found for this
2019-08-07T20:29:31.2789353Z ...
2019-08-07T20:29:31.2789562Z 632 |                 let lib = self.sysroot_libdir_relative(self.compiler);
2019-08-07T20:29:31.2790079Z 
2019-08-07T20:29:31.4651171Z error: aborting due to previous error
2019-08-07T20:29:31.4651722Z 
2019-08-07T20:29:31.4652471Z For more information about this error, try `rustc --explain E0599`.
2019-08-07T20:29:31.4652471Z For more information about this error, try `rustc --explain E0599`.
2019-08-07T20:29:31.5157015Z error: Could not compile `bootstrap`.
2019-08-07T20:29:31.5157720Z 
2019-08-07T20:29:31.5158681Z To learn more, run the command again with --verbose.
2019-08-07T20:29:31.5188437Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml
2019-08-07T20:29:31.5188808Z Build completed unsuccessfully in 0:01:17
2019-08-07T20:29:35.7836554Z ##[error]Bash exited with code '1'.
2019-08-07T20:29:35.7864818Z ##[section]Starting: Checkout
2019-08-07T20:29:35.7866478Z ==============================================================================
2019-08-07T20:29:35.7866691Z Task         : Get sources
2019-08-07T20:29:35.7866740Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@o01eg
Copy link
Contributor Author

o01eg commented Aug 7, 2019

@alexcrichton I've updated PR.

@hdhoang hdhoang added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 16, 2019
@hdhoang
Copy link
Contributor

hdhoang commented Aug 16, 2019

ping from triage @alexcrichton could you review again?

@Centril
Copy link
Contributor

Centril commented Aug 18, 2019

r? @Mark-Simulacrum

@Centril
Copy link
Contributor

Centril commented Aug 18, 2019

cc @pietroalbini as backup reviewer.

@Mark-Simulacrum
Copy link
Member

I don't personally feel comfortable reviewing this as I don't really understand all the libdir manipulation in rustbuild all that well. I think @alexcrichton is probably the best reviewer (though perhaps also not a very good one, in that I'm not sure anyone really understands all of it too well).

@alexcrichton
Copy link
Member

@bors: r+

Sorry for the delay in coming back to this!

@bors
Copy link
Contributor

bors commented Aug 20, 2019

📌 Commit 8553cc0 has been approved by alexcrichton

@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 Aug 20, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
bors added a commit that referenced this pull request Aug 20, 2019
Rollup of 4 pull requests

Successful merges:

 - #62497 (Fix double resolving custom libdir)
 - #63209 (Stabilize `async_await` in Rust 1.39.0)
 - #63746 (Cherry-pick src/test changes with Centril's changes)
 - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.)

Failed merges:

r? @ghost
@bors bors merged commit 8553cc0 into rust-lang:master Aug 20, 2019
@o01eg o01eg deleted the fix-62496 branch August 21, 2019 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install.sh miplaces codegen-backends directory with libdir = "/lib/something"
10 participants