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

Open
wants to merge 1 commit into
base: master
from

Conversation

@o01eg
Copy link
Contributor

commented Jul 8, 2019

Fixes #62496

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 8, 2019

r? @nikomatsakis

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

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

@o01eg o01eg force-pushed the o01eg:fix-62496 branch 2 times, most recently from 64209a3 to c1aa2a4 Jul 8, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 9, 2019

@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

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

⌛️ Trying commit c1aa2a4 with merge 661f42a...

bors added a commit that referenced this pull request Jul 9, 2019

Auto merge of #62497 - o01eg:fix-62496, r=<try>
Fix double resolving custom libdir

Fixes #62496

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

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

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

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

@bors: r+

Looks to work!

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2019

📌 Commit c1aa2a4 has been approved by alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

⌛️ Testing commit c1aa2a4 with merge 14b5d64...

bors added a commit that referenced this pull request Jul 11, 2019

Auto merge of #62497 - o01eg:fix-62496, r=alexcrichton
Fix double resolving custom libdir

Fixes #62496

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

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

💔 Test failed - checks-azure

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

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

@o01eg o01eg force-pushed the o01eg:fix-62496 branch from c1aa2a4 to fc6e5ff Jul 12, 2019

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

Tried a workaround for windows codegen path.

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

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 o01eg force-pushed the o01eg:fix-62496 branch from fc6e5ff to 7a98971 Jul 12, 2019

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Jul 12, 2019

I've added comment.

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

I'm not sure where it placed on windows.

@o01eg

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Jul 16, 2019

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

This comment has been minimized.

Copy link
Member

commented Jul 28, 2019

Ping from triage: any updates? @o01eg

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2019

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

@o01eg o01eg force-pushed the o01eg:fix-62496 branch from 7a98971 to 5d4ee06 Aug 7, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2019

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 o01eg force-pushed the o01eg:fix-62496 branch from 5d4ee06 to 31f0fee Aug 7, 2019

@o01eg o01eg force-pushed the o01eg:fix-62496 branch from 31f0fee to 8553cc0 Aug 7, 2019

@o01eg

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

@alexcrichton I've updated PR.

@hdhoang

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

ping from triage @alexcrichton could you review again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.