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

Bump bootstrap compiler to 1.33 beta #57765

Merged
merged 5 commits into from
Jan 27, 2019

Conversation

Mark-Simulacrum
Copy link
Member

r? @alexcrichton or @pietroalbini

cc @rust-lang/release

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 19, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:076df0b6:start=1547940448615658111,finish=1547940451602466492,duration=2986808381
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:03:47]    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
[00:03:47] error: use of deprecated item 'core::str::<impl str>::trim_left_matches': superseded by `trim_start_matches`
[00:03:47]    --> src/tools/tidy/src/features.rs:191:61
[00:03:47]     |
[00:03:47] 191 |             let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) {
[00:03:47]     |
[00:03:47]     = note: `-D deprecated` implied by `-D warnings`
[00:03:47] 
[00:03:47] error: aborting due to previous error
[00:03:47] error: aborting due to previous error
[00:03:47] 
[00:03:47] error: Could not compile `tidy`.
[00:03:47] To learn more, run the command again with --verbose.
[00:03:47] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/tidy/Cargo.toml" "--message-format" "json"
[00:03:47] expected success, got: exit code: 101
[00:03:47] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:47] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:47] Build completed unsuccessfully in 0:00:36
[00:03:47] Makefile:69: recipe for target 'tidy' failed
[00:03:47] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03b3e307
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Jan 19 23:31:30 UTC 2019
---
travis_time:end:0a47d8b5:start=1547940691336788773,finish=1547940691340958475,duration=4169702
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0232cacf
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:06d2bfee
travis_time:start:06d2bfee
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:02d9e7ae
$ dmesg | grep -i kill

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:1b161299:start=1547964589949697598,finish=1547964663047858700,duration=73098161102
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[01:11:41] .................................................................................................... 1700/2942
[01:11:56] .................................................................................................... 1800/2942
[01:12:07] ................................................................................................i... 1900/2942
[01:12:23] ...................................................................i................................ 2000/2942
[01:12:50] ............................................................................F....................... 2100/2942
[01:13:08] ...................................................test [run-pass] run-pass/mpsc_stress.rs has been running for over 60 seconds
[01:13:26] .................................................................ii................................. 2300/2942
[01:13:46] ...................................i................................................................ 2400/2942
[01:14:00] .................................................................................................... 2500/2942
[01:14:34] .................................................................................................... 2600/2942
---
[01:15:16] 
[01:15:16] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:15:16] 
[01:15:16] 
[01:15:16] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:15:16] 
[01:15:16] 
[01:15:16] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:15:16] Build completed unsuccessfully in 0:11:41
[01:15:16] Build completed unsuccessfully in 0:11:41
[01:15:16] Makefile:48: recipe for target 'check' failed
[01:15:16] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:05b54c08
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sun Jan 20 07:26:29 UTC 2019
---
travis_time:end:03a716c6:start=1547969191423755130,finish=1547969191429196977,duration=5441847
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:097f2508
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:start:crashlog
obj/cores/core.27622.!checkout!obj!build!x86_64-unknown-linux-gnu!test!run-pass!panic-uninitialized-zeroed!a
[New LWP 27622]
warning: Could not load shared library symbols for 6 libraries, e.g. /lib/x86_64-linux-gnu/libgcc_s.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/panic-uninitialized-'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x000055cbf3ecb860 in std::panicking::try::do_call::h33f1b7b3e586dc57 ()
#0  0x000055cbf3ecb860 in std::panicking::try::do_call::h33f1b7b3e586dc57 ()
#1  0x00007fd8fe90753a in __rust_maybe_catch_panic () from ./checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-66c19431ed0998ac.so
#2  0x000055cbf3ecb4c3 in std::panicking::try::h7f6df1b7275ceb29 ()
#3  0x000055cbf3ecbabd in panic_uninitialized_zeroed::main::hcb2c65bae60d5582 ()
#4  0x000055cbf3ecb1b3 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hfa0f818729a575a9 ()
#5  0x00007fd8fe8f22f3 in std::panicking::try::do_call::h8adc7f0a0d00f876 () from ./checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-66c19431ed0998ac.so
#6  0x00007fd8fe90753a in __rust_maybe_catch_panic () from ./checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-66c19431ed0998ac.so
#7  0x00007fd8fe8f303a in std::rt::lang_start_internal::hb71d69d226db64fa () from ./checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-66c19431ed0998ac.so
#8  0x000055cbf3ecc5a5 in main ()
travis_time:end:097f2508:start=1547969191433941305,finish=1547969191655806489,duration=221865184
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:256f2c22
travis_time:start:256f2c22
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:05a03408
$ dmesg | grep -i kill

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)

@@ -626,8 +625,6 @@ pub unsafe fn zeroed<T>() -> T {
#[rustc_deprecated(since = "2.0.0", reason = "use `mem::MaybeUninit::uninitialized` instead")]
#[stable(feature = "rust1", since = "1.0.0")]
pub unsafe fn uninitialized<T>() -> T {
#[cfg(not(stage0))]
intrinsics::panic_if_uninhabited::<T>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should not have been deleted.

@Mark-Simulacrum
Copy link
Member Author

@bors try

Testing LLVM build - I suspect it'll fail based on local testing

@bors
Copy link
Contributor

bors commented Jan 20, 2019

⌛ Trying commit d3c6665 with merge 28ffe58...

bors added a commit that referenced this pull request Jan 20, 2019
@bors
Copy link
Contributor

bors commented Jan 20, 2019

☀️ Test successful - checks-travis
State: approved= try=True

@Mark-Simulacrum
Copy link
Member Author

@alexcrichton I can't reproduce on Travis, but locally, whenever I try to build this I run into the following (including in the docker containers). I'm hesitant to land this as-is, but haven't yet managed to track down the reason why Travis works but it doesn't locally. I have a few more ideas but thought I'd post here in case you'd seen this before.

As far as I can tell, the LD_LIBRARY_PATH is being set to rust/build/x86_64-unknown-linux-gnu/stage0-codegen/release/deps:rust/build/x86_64-unknown-linux-gnu/stage0/lib which makes llvm-config load the llvm in stage0/lib instead of the freshly built one which makes this (among other) errors arise.

error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)`
process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-codegen/release/build/rustc_llvm-32ba2d0adcc10f37/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config
cargo:rerun-if-env-changed=LLVM_CONFIG

--- stderr
/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: relocation error: /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: symbol _ZN4llvm6Triple9normalizeB5cxx11ENS_9StringRefE version LLVM_8 not defined in file libLLVM-8svn.so with link time reference
thread 'main' panicked at 'command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version"
expected success, got: exit code: 127', src/build_helper/lib.rs:113:9

@Mark-Simulacrum
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Jan 21, 2019

⌛ Trying commit 26fd045ef8654b0a1888b9b11efe2c919e872e81 with merge 88bdd43be4bb2fee4bfffed750fb12f21d38ced9...

@Mark-Simulacrum
Copy link
Member Author

Okay, so https://travis-ci.com/rust-lang/rust/jobs/171725268#L6034 has the error reproduced on Travis. I'm probably off for the night but will try to dig in more tomorrow -- I suspect we'll just want to not have the LD_LIBRARY_PATH set at all during build script execution (or perhaps any run of llvm-config).

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu of your PR failed on Travis (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.
travis_fold:end:services

travis_fold:start:git.checkout
travis_time:start:09ac31e8
$ git clone --depth=2 --branch=try https://github.com/rust-lang/rust.git rust-lang/rust
---
[00:30:13]    Compiling rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)
[00:30:14] error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)`
[00:30:14] process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-codegen/release/build/rustc_llvm-32ba2d0adcc10f37/build-script-build` (exit code: 101)
[00:30:14] --- stdout
[00:30:14] cargo:rerun-if-changed=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config
[00:30:14] cargo:rerun-if-env-changed=LLVM_CONFIG
[00:30:14] --- stderr
[00:30:14] --- stderr
[00:30:14] /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: relocation error: /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: symbol _ZN4llvm6Triple9normalizeB5cxx11ENS_9StringRefE version LLVM_8 not defined in file libLLVM-8svn.so with link time reference
[00:30:14] thread 'main' panicked at 'command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version"
[00:30:14] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[00:30:14] 
[00:30:14] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/librustc_codegen_llvm/Cargo.toml" "--features" "" "--message-format" "json"
[00:30:14] expected success, got: exit code: 101
---
travis_time:end:150eff50:start=1548038091862288996,finish=1548038091872647896,duration=10358900
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:025d2977
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:3029743d
travis_time:start:3029743d
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:05b4e950
$ dmesg | grep -i kill

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu of your PR failed on Travis (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.
travis_time:end:2925f054:start=1548037272419408147,finish=1548037343674922585,duration=71255514438
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu
---
[00:30:33]    Compiling rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)
[00:30:34] error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)`
[00:30:34] process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-codegen/release/build/rustc_llvm-32ba2d0adcc10f37/build-script-build` (exit code: 101)
[00:30:34] --- stdout
[00:30:34] cargo:rerun-if-changed=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config
[00:30:34] cargo:rerun-if-env-changed=LLVM_CONFIG
[00:30:34] --- stderr
[00:30:34] --- stderr
[00:30:34] Some("/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-codegen/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib")
[00:30:34] "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config"
[00:30:34] /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: relocation error: /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config: symbol _ZN4llvm6Triple9normalizeB5cxx11ENS_9StringRefE version LLVM_8 not defined in file libLLVM-8svn.so with link time reference
[00:30:34] thread 'main' panicked at 'command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--version"
[00:30:34] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[00:30:34] 
[00:30:34] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/librustc_codegen_llvm/Cargo.toml" "--features" "" "--message-format" "json"
[00:30:34] expected success, got: exit code: 101
---
travis_time:end:005b73a8:start=1548039189310355193,finish=1548039189314571869,duration=4216676
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:11eee28c
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1f47cce0
travis_time:start:1f47cce0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:14be83e8
$ dmesg | grep -i kill

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)

@Mark-Simulacrum
Copy link
Member Author

I have confirmed that the problem is that Cargo adds the stage0/lib directory to the dynamic library search path (i.e., LD_LIBRARY_PATH), presumably because that's the directory that contains std (and I suppose we'd need that to be in the path if we're dynamically, or maybe even statically, linking against std).

Unfortunately, Cargo prepends this to the search path so we can't really do anything in rustbuild to override that -- at least as far as I can tell. This behavior was added forever ago in rust-lang/cargo#2891.

At this point, I'm honestly somewhat not sure if there's a good solution to this. The llvm-config binary specifies the RUNPATH (presumably, equivalent to DT_RUNPATH) header, which is what we want to use to resolve the libLLVM dependency, but according to https://blog.qt.io/blog/2011/10/28/rpath-and-runpath/, LD_LIBRARY_PATH will take precedence over the RUNPATH header.

One solution is to simply run llvm-config without any LD_LIBRARY_PATH set. On a standard configuration with our built-in LLVM, this'll work -- but I assume that some distros and other configurations that want to use their own LLVM won't work with this option, though I have no concrete evidence of such.

We could also stop including the libLLVM-8svn.so just raw, I suppose, adding some form of hash to it's symbols or moving it to a sub-directory somehow.

I'm going to implement what I see as a "presumably good" variant: never execute llvm_config in build scripts. We don't do this much anyway and so feeding that information through environment variables doesn't seem terrible; it should also solve the problems here. As such this post is primarily a documentation of thought process.

@Mark-Simulacrum
Copy link
Member Author

r? @alexcrichton

This is ready for review; local testing shows that I've resolved the LLVM issue -- see the second commit (b569309f5db6b7ed9d7c7d14d24954590604a1f3 as of this time) and #57765 (comment) for some more rational.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 22, 2019

📌 Commit b569309f5db6b7ed9d7c7d14d24954590604a1f3 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 Jan 22, 2019
@alexcrichton
Copy link
Member

Good find!

@ehuss
Copy link
Contributor

ehuss commented Jan 27, 2019

I can take a look.

bors added a commit to rust-lang/cargo that referenced this pull request Jan 27, 2019
Remove deprecated ATOMIC initializers.

Required for rust-lang/rust#57765.

cc @Mark-Simulacrum
@Mark-Simulacrum
Copy link
Member Author

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Jan 27, 2019

📌 Commit b3ddcbcaa4b997d1107c44f3b586ed4b03537542 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 Jan 27, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:13d18f76:start=1548603936775340049,finish=1548604009288696772,duration=72513356723
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:01:26] extracting /checkout/obj/build/cache/2019-01-18/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:26] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:01:26] 
[00:01:26] Caused by:
[00:01:26]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:26] Build completed unsuccessfully in 0:00:13
[00:01:26] make: *** [prepare] Error 1
[00:01:26] Makefile:70: recipe for target 'prepare' failed
[00:01:27] Command failed. Attempt 2/5:
[00:01:27] Command failed. Attempt 2/5:
[00:01:28] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:01:28] 
[00:01:28] Caused by:
[00:01:28]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:28] Build completed unsuccessfully in 0:00:00
[00:01:28] make: *** [prepare] Error 1
[00:01:28] Makefile:70: recipe for target 'prepare' failed
[00:01:30] Command failed. Attempt 3/5:
[00:01:30] Command failed. Attempt 3/5:
[00:01:30] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:01:30] 
[00:01:30] Caused by:
[00:01:30]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:30] Build completed unsuccessfully in 0:00:00
[00:01:30] Makefile:70: recipe for target 'prepare' failed
[00:01:30] make: *** [prepare] Error 1
[00:01:33] Command failed. Attempt 4/5:
[00:01:33] Command failed. Attempt 4/5:
[00:01:33] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:01:33] 
[00:01:33] Caused by:
[00:01:33]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:33] Build completed unsuccessfully in 0:00:00
[00:01:33] make: *** [prepare] Error 1
[00:01:33] Makefile:70: recipe for target 'prepare' failed
[00:01:37] Command failed. Attempt 5/5:
[00:01:37] Command failed. Attempt 5/5:
[00:01:37] error: failed to resolve patches for `https://github.com/rust-lang/cargo`
[00:01:37] 
[00:01:37] Caused by:
[00:01:37]   patch for `cargo` in `https://github.com/rust-lang/cargo` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:37] Build completed unsuccessfully in 0:00:00
[00:01:37] Makefile:70: recipe for target 'prepare' failed
[00:01:37] make: *** [prepare] Error 1
[00:01:37] The command has failed after 5 attempts.
---
travis_time:end:27a6b93c:start=1548604119722505057,finish=1548604119728398779,duration=5893722
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:03375e3e
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:10ac8f20
travis_time:start:10ac8f20
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:09e0c85c
$ dmesg | grep -i kill

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)

@pietroalbini
Copy link
Member

@bors r-

That was fast to fail.

@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 Jan 27, 2019
@Mark-Simulacrum
Copy link
Member Author

@bors r=alexcrichton

Cargo... wants more than I suspected.

@bors
Copy link
Contributor

bors commented Jan 27, 2019

📌 Commit cd39cf7 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 27, 2019
@@ -15,7 +15,40 @@ macro_rules! dup {
((* $($exp:tt)*) $($val:tt)*) => (dup!( ($($exp)*) $($val)* $($val)* ));
(() $($val:tt)*) => ([$($val),*])
}
static TLS_DESTRUCTOR: [AtomicUsize; TLS_KEYS] = dup!((* * * * * * *) ATOMIC_USIZE_INIT);
static TLS_DESTRUCTOR: [AtomicUsize; TLS_KEYS] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: 😭, we need #49147 yesterday... ;)

@bors
Copy link
Contributor

bors commented Jan 27, 2019

⌛ Testing commit cd39cf7 with merge 8611577...

bors added a commit that referenced this pull request Jan 27, 2019
@bors
Copy link
Contributor

bors commented Jan 27, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing 8611577 to master...

@bors bors merged commit cd39cf7 into rust-lang:master Jan 27, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #57765!

Tested on commit 8611577.
Direct link to PR: #57765

💔 miri on windows: test-pass → test-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → test-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jan 27, 2019
Tested on commit rust-lang/rust@8611577.
Direct link to PR: <rust-lang/rust#57765>

💔 miri on windows: test-pass → test-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → test-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0), AtomicUsize::new(0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mark-Simulacrum is there any particular reason you expanded this macro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant was deprecated so we needed to switch to the function call, and I didn't manage to fix the macro to permit that fast enough so I decided to just expand it.

elebihan added a commit to elebihan/buildroot that referenced this pull request Mar 12, 2019
Bump rust to 1.33.0 with the following changes:

- drop support for jemalloc
- add dependency on host-openssl
- add a patch to fix bootstraping with rust 1.33.0 [1]

[1] rust-lang/rust#57765
bkuhls pushed a commit to bkuhls/buildroot that referenced this pull request Apr 11, 2019
Bump rust to 1.33.0 with the following changes:

- drop support for jemalloc
- add dependency on host-openssl
- add a patch to fix bootstraping with rust 1.33.0 [1]

[1] rust-lang/rust#57765

Signed-off-by: Eric Le Bihan <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
@Mark-Simulacrum Mark-Simulacrum deleted the bootstrap-bump branch June 8, 2019 13:49
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.

10 participants