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

Use libunwind from llvm-project submodule for musl targets #63173

Merged
merged 1 commit into from
Aug 16, 2019

Conversation

malbarbo
Copy link
Contributor

This avoid downloading libunwind by using the scheme introduced in #61544

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(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 31, 2019
@alexcrichton
Copy link
Member

Nice! Definitely seems like a nice extension of what we have already. I think though this may need to keep the #[link] directive for the embedded cfg though, could the cc builder disable cargo metadata output and the #[link] directives would remain the same in the code?

@alexcrichton
Copy link
Member

(it may also be worthwhile to enable temporarily for this PR the builders exercising musl tests to ensure those still work)

@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-07-31T20:06:56.5672458Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-31T20:06:57.4620774Z ##[command]git config gc.auto 0
2019-07-31T20:06:57.4624230Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-31T20:06:57.4626070Z ##[command]git config --get-all http.proxy
2019-07-31T20:06:57.4629729Z ##[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/63173/merge:refs/remotes/pull/63173/merge
---
2019-07-31T20:07:31.6978927Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-31T20:07:31.6978953Z 
2019-07-31T20:07:31.6979122Z   git checkout -b <new-branch-name>
2019-07-31T20:07:31.6979145Z 
2019-07-31T20:07:31.6979183Z HEAD is now at 7cd479b37 Merge 5c8eba2e31c5cb14b977b080628dbb02c5009852 into e3976fff44e6ce14c2f92252e6a807800b9aa7c0
2019-07-31T20:07:31.7123970Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-31T20:07:31.7126483Z ==============================================================================
2019-07-31T20:07:31.7126529Z Task         : Bash
2019-07-31T20:07:31.7126579Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-31T20:16:46.9275607Z configure: build.locked-deps    := True
2019-07-31T20:16:46.9275676Z configure: llvm.ccache          := sccache
2019-07-31T20:16:46.9275894Z configure: build.cargo-native-static := True
2019-07-31T20:16:46.9276108Z configure: dist.missing-tools   := True
2019-07-31T20:16:46.9276556Z configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
2019-07-31T20:16:46.9276704Z configure: writing `config.toml` in current directory
2019-07-31T20:16:46.9276753Z configure: 
2019-07-31T20:16:46.9277084Z configure: run `python /checkout/x.py --help`
2019-07-31T20:16:46.9277135Z configure: 
---
2019-07-31T20:18:36.0218719Z 87 | #![feature(const_generics)]
2019-07-31T20:18:36.0223457Z    |            ^^^^^^^^^^^^^^
2019-07-31T20:18:36.0226952Z 
2019-07-31T20:18:36.3576562Z     Checking panic_abort v0.0.0 (/checkout/src/libpanic_abort)
2019-07-31T20:18:36.4902365Z error[E0658]: kind="static-nobundle" is feature gated
2019-07-31T20:18:36.4909335Z   |
2019-07-31T20:18:36.4913723Z   = note: for more information, see ***/issues/37403
2019-07-31T20:18:36.4919604Z   = help: add #![feature(static_nobundle)] to the crate attributes to enable
2019-07-31T20:18:36.4981682Z error: aborting due to previous error
2019-07-31T20:18:36.4981759Z 
2019-07-31T20:18:36.4987006Z For more information about this error, try `rustc --explain E0658`.
2019-07-31T20:18:36.5022417Z error: Could not compile `unwind`.
2019-07-31T20:18:36.5022417Z error: Could not compile `unwind`.
2019-07-31T20:18:36.5034501Z warning: build failed, waiting for other jobs to finish...
2019-07-31T20:18:38.2352730Z error: build failed
2019-07-31T20:18:38.2370543Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "i686-pc-windows-gnu" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
2019-07-31T20:18:38.2380657Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu
2019-07-31T20:18:38.2381070Z Build completed unsuccessfully in 0:00:26
2019-07-31T20:18:38.2381070Z Build completed unsuccessfully in 0:00:26
2019-07-31T20:18:44.5642891Z ##[error]Bash exited with code '1'.
2019-07-31T20:18:44.5674451Z ##[section]Starting: Checkout
2019-07-31T20:18:44.5676125Z ==============================================================================
2019-07-31T20:18:44.5676182Z Task         : Get sources
2019-07-31T20:18:44.5676250Z 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)

@malbarbo malbarbo changed the title Use libunwind from llvm-project submodule for musl targets [WIP] Use libunwind from llvm-project submodule for musl targets Aug 2, 2019
@malbarbo
Copy link
Contributor Author

malbarbo commented Aug 2, 2019

I tested it locally and was able to produce static and dynamic binaries. I also enabled test-various, which run musl tests.

@bors
Copy link
Contributor

bors commented Aug 3, 2019

☔ The latest upstream changes (presumably #63242) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

Looks great to me!

r=me with the PR cleaned up slightly

@bors
Copy link
Contributor

bors commented Aug 5, 2019

@malbarbo: 🔑 Insufficient privileges: Not in reviewers

1 similar comment
@bors
Copy link
Contributor

bors commented Aug 5, 2019

@malbarbo: 🔑 Insufficient privileges: Not in reviewers

@malbarbo
Copy link
Contributor Author

malbarbo commented Aug 5, 2019

Done.

@alexcrichton
Copy link
Member

@bors: r+ delegate+

@bors
Copy link
Contributor

bors commented Aug 6, 2019

📋 Looks like this PR is still in progress, ignoring approval.

Hint: Remove [WIP] from this PR's title when it is ready for review.

@bors
Copy link
Contributor

bors commented Aug 6, 2019

✌️ @malbarbo can now approve this pull request

@alexcrichton alexcrichton changed the title [WIP] Use libunwind from llvm-project submodule for musl targets Use libunwind from llvm-project submodule for musl targets Aug 6, 2019
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 6, 2019

📌 Commit e54b575 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 6, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 7, 2019
…hton

Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in rust-lang#61544
@nikic
Copy link
Contributor

nikic commented Aug 7, 2019

@bors r-

Failed in rollup #63345 on dist-i586-gnu-i586-i686-musl:

2019-08-07T09:31:26.2317594Z    Compiling libc v0.2.60
2019-08-07T09:31:26.2509078Z    Compiling compiler_builtins v0.1.18
2019-08-07T09:31:31.4941891Z    Compiling backtrace-sys v0.1.30
2019-08-07T09:31:33.3554962Z    Compiling unwind v0.0.0 (/checkout/src/libunwind)
2019-08-07T09:31:33.3555404Z error: failed to run custom build command for `unwind v0.0.0 (/checkout/src/libunwind)`
2019-08-07T09:31:33.3555915Z Caused by:
2019-08-07T09:31:33.3555915Z Caused by:
2019-08-07T09:31:33.3556485Z   process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/build/unwind-a04f9435c6eb75e3/build-script-build` (exit code: 101)
2019-08-07T09:31:33.3556711Z --- stdout
2019-08-07T09:31:33.3556938Z cargo:rerun-if-changed=build.rs
2019-08-07T09:31:33.3557262Z cargo:rustc-link-search=native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/i686-unknown-linux-musl/release/build/unwind-3b3aa3b1105b96b5/out
2019-08-07T09:31:33.3558000Z running: "musl-g++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m32" "-static" "-march=i686" "-Wl,-melf_i386" "-I" "../llvm-project/libunwind/include" "-std=c99" "-std=c++11" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/i686-unknown-linux-musl/release/build/unwind-3b3aa3b1105b96b5/out/../llvm-project/libunwind/src/Unwind-EHABI.o" "-c" "../llvm-project/libunwind/src/Unwind-EHABI.cpp"
2019-08-07T09:31:33.3558842Z --- stderr
2019-08-07T09:31:33.3559052Z thread 'main' panicked at '
2019-08-07T09:31:33.3559217Z 
2019-08-07T09:31:33.3559217Z 
2019-08-07T09:31:33.3559475Z Internal error occurred: Failed to find tool. Is `musl-g++` installed?
2019-08-07T09:31:33.3559806Z ', /cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.35/src/lib.rs:2398:5

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 7, 2019
bors added a commit that referenced this pull request Aug 15, 2019
Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in #61544
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…hton

Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in rust-lang#61544
@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

@bors retry rolled up.

@bors
Copy link
Contributor

bors commented Aug 15, 2019

⌛ Testing commit 5941acd with merge 76751f45a3eab3a4aea033c58044e2611e056e3d...

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…hton

Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in rust-lang#61544
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…hton

Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in rust-lang#61544
@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

@bors retry rolled up.

bors added a commit that referenced this pull request Aug 15, 2019
Rollup of 5 pull requests

Successful merges:

 - #63173 (Use libunwind from llvm-project submodule for musl targets)
 - #63462 (Opaque builtin derive macros)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63545 (Feature gate 'yield $expr?' pre-expansion)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Aug 15, 2019

⌛ Testing commit 5941acd with merge 1b5bc8ee7c06742731b0684c0c19f642fa129c5d...

@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

I think this failed in #63607 (comment) but I'm not 100% sure. @bors r- meanwhile.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 15, 2019
@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

@bors retry

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 15, 2019
@Centril
Copy link
Contributor

Centril commented Aug 15, 2019

Seems like this PR wasn't to blame after all... @bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Aug 15, 2019

📌 Commit 5941acd has been approved by alexcrichton

Centril added a commit to Centril/rust that referenced this pull request Aug 16, 2019
…hton

Use libunwind from llvm-project submodule for musl targets

This avoid downloading libunwind by using the scheme introduced in rust-lang#61544
bors added a commit that referenced this pull request Aug 16, 2019
Rollup of 7 pull requests

Successful merges:

 - #62593 (Group all ABI tests.)
 - #63173 (Use libunwind from llvm-project submodule for musl targets)
 - #63535 (Continue refactoring resolve and hygiene)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)
 - #63612 (Do not suggest `try_into` for base types inside of macro expansions)
 - #63615 (Fix typo in DoubleEndedIterator::nth_back doc)

Failed merges:

r? @ghost
@bors bors merged commit 5941acd into rust-lang:master Aug 16, 2019
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.

7 participants