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

rustc: 1.25.0 -> 1.26.2 #40356

Merged
merged 4 commits into from Jun 7, 2018
Merged

rustc: 1.25.0 -> 1.26.2 #40356

merged 4 commits into from Jun 7, 2018

Conversation

jD91mZM2
Copy link
Member

Warning: I probably did this completely incorrectly. Please check extra carefully.
One test fails when trying to build this locally, but it looks unrelated.

@jD91mZM2 jD91mZM2 requested review from LnL7 and Mic92 as code owners May 11, 2018 14:40
@@ -26,10 +26,7 @@ in rec {
# 2. Tests run out of memory for i686
doCheck = !stdenv.isAarch64 && !stdenv.isi686;

patches = [
./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch
Copy link
Member

Choose a reason for hiding this comment

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

Why was it removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, the sources changed. Not sure how to fix them.

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

x86-64_linux build failed

<3>LD_LIBRARY_PATH="/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/lib:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib:" '/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu -L /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu  -Zrelro-level=partial hello.rs
<3>readelf -l /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu/hello | grep -q GNU_RELRO
<3># Ensure that we're *not* built with RELRO when setting it to off.  We do
<3># not want to check for BIND_NOW however, as the linker might have that
<3># enabled by default.
<3>LD_LIBRARY_PATH="/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/lib:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps:/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib:" '/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu -L /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu  -Zrelro-level=off hello.rs
<3>! readelf -l /build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/relro-levels.stage2-x86_64-unknown-linux-gnu/hello | grep -q GNU_RELRO
<3>make[1]: Leaving directory '/build/rustc-1.26.0-src/src/test/run-make-fulldeps/relro-levels'
<3>
<3>------------------------------------------
<3>stderr:
<3>------------------------------------------
<3>make[1]: *** [Makefile:18: all] Error 1
<3>
<3>------------------------------------------
<3>
<3>thread '[run-make] run-make-fulldeps/relro-levels' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2901:9
<3>note: Run with `RUST_BACKTRACE=1` for a backtrace.
<3>
<3>
<3>failures:
<3>    [run-make] run-make-fulldeps/relro-levels
<3>
<3>test result: FAILED. 179 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
<3>
<3>thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:478:22
<3>
<3>
<3>command did not execute successfully: "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/build/rustc-1.26.0-src/src/test/run-make-fulldeps" "--build-base" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-make" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zmiri -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zmiri -Zunstable-options  -Lnative=/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/nix/store/l9j2jsc9flrbmpf799nw9wdq59gpwms8-python-2.7.14/bin/python2.7" "--lldb-python" "/nix/store/l9j2jsc9flrbmpf799nw9wdq59gpwms8-python-2.7.14/bin/python2.7" "--gdb" "/nix/store/xcvbwflwll9nknj8rz1k0972xzh2wpgv-gdb-8.1/bin/gdb" "--verbose" "--llvm-version" "6.0.0\n" "--cc" "gcc" "--cxx" "g++" "--cflags" "-ffunction-sections -fdata-sections -fPIC -m64" "--llvm-components" "aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils all all-targets analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel gtest gtest_main hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes powerpc powerpcasmparser powerpcasmprinter powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata runtimedyld scalaropts selectiondag sparc sparcasmparser sparcasmprinter sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzasmprinter systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target testingsupport transformutils vectorize webassembly webassemblyasmprinter webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils" "--llvm-cxxflags" "-I/build/rustc-1.26.0-src/src/llvm/include -I/build/rustc-1.26.0-src/build/x86_64-unknown-linux-gnu/llvm/build/include -ffunction-sections -fdata-sections -fPIC -m64 -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" "--ar" "ar" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" ""
<3>expected success, got: exit code: 101
<3>
<3>
<3>Traceback (most recent call last):
<3>  File "/build/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 817, in <module>
<3>    main()
<3>  File "/build/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 800, in main
<3>    bootstrap(help_triggered)
<3>  File "/build/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 791, in bootstrap
<3>    run(args, env=env, verbose=build.verbose)
<3>  File "/build/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 148, in run
<3>    raise RuntimeError(err)
<3>RuntimeError: failed to run: /build/rustc-1.26.0-src/build/bootstrap/debug/bootstrap test --jobs 4 -v
<3>make: *** [Makefile:58: check] Error 1
<3>builder for '/nix/store/s7r940ibji6bwhwkwmi6w0czrgznclkf-rustc-1.26.0.drv' failed with exit code 2

@jD91mZM2
Copy link
Member Author

jD91mZM2 commented May 11, 2018

Yup, that's the error I got. Test code. I can't really see how NixOS would affect this however... Nor what I'd do to fix it. Lemme google around

@jD91mZM2
Copy link
Member Author

I'm guessing this is because of the default NixOS hardening... So it's intended behavior? Or should there be a rust wrapper that disables the relro thing by default?

@Mic92
Copy link
Member

Mic92 commented May 11, 2018

Maybe we could disable hardening flags for the tests?

@Mic92
Copy link
Member

Mic92 commented May 11, 2018

hardeningDisable=all

@jD91mZM2
Copy link
Member Author

I'm not entirely sure how to disable hardening for only tests... but hopefully I did it correctly now.

@xeji
Copy link
Contributor

xeji commented May 12, 2018

@Mic92 should this go to staging?

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

x86_64-darwin build failure

test time.rs - time::Duration::subsec_millis (line 219) ... ok
test time.rs - time::Duration::subsec_nanos (line 259) ... ok
test unit.rs - unit::() (line 18) ... ok

failures:

---- ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256 (line 32) stdout ----
        thread 'rustc' panicked at 'test executable failed:


', librustdoc/test.rs:341:17
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256 (line 32)

test result: FAILED. 1596 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/nix/store/dkdmn9h4irdd0373xv4xwns1b6x58jhv-rustc-bootstrap-1.25.0/bin/cargo" "test" "--target" "x86_64-apple-darwin" "--release" "--frozen" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/src/libstd/Cargo.toml" "-p" "core" "--"
expected success, got: exit code: 101


Traceback (most recent call last):
  File "/private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 817, in <module>
    main()
  File "/private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 800, in main
    bootstrap(help_triggered)
  File "/private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 791, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/src/bootstrap/bootstrap.py", line 148, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /private/tmp/nix-build-rustc-1.26.0.drv-0/rustc-1.26.0-src/build/bootstrap/debug/bootstrap test --jobs 4 -v
make: *** [Makefile:58: check] Error 1
builder for '/nix/store/wrmkfjspmxzwny16j5wm4jagnqpqis4w-rustc-1.26.0.drv' failed with exit code 2

@LnL7
Copy link
Member

LnL7 commented May 12, 2018

@xeji I would say yes, but staging is in a pretty bad spot right now.

I'll try to take a look at the darwin failure tomorrow.

@Mic92
Copy link
Member

Mic92 commented May 12, 2018

I have to run a test build on aarch64 before we merge. I also would like to see the tcp test we have disabled to be disabled again to avoid random hydra build failures.

@Mic92 Mic92 closed this May 12, 2018
@Mic92
Copy link
Member

Mic92 commented May 12, 2018

wrong button

@Mic92 Mic92 reopened this May 12, 2018
@Mic92
Copy link
Member

Mic92 commented May 12, 2018

The x86 tests on macOS fail in this example: https://github.com/rust-lang-nursery/stdsimd/blob/master/coresimd/x86/mod.rs#L36

@jD91mZM2 jD91mZM2 force-pushed the rust branch 2 times, most recently from 16322fa to 5df0e7f Compare May 13, 2018 05:36
@jD91mZM2
Copy link
Member Author

jD91mZM2 commented May 13, 2018

I have re-patched the tests on darwin now :)

As for the error, I'm really not sure. According to your stack trace the commands didn't leave any sort of error in STDOUT/STDERR...

})
}

+ #[cfg_attr(target_os = "linux", ignore)]
+ #[cfg_attr(target_os = "macos", ignore)]
Copy link
Member

@Mic92 Mic92 May 13, 2018

Choose a reason for hiding this comment

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

This one should be linux unless something has changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, my bad

@Mic92
Copy link
Member

Mic92 commented May 13, 2018

@LnL7 probably take a look at the macOS error later.

@Synthetica9
Copy link
Member

Any progress on this?

Copy link
Member

@Mic92 Mic92 left a comment

Choose a reason for hiding this comment

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

linux-aarch64 and linux-x86_64 build successfully.
Now only macOS is left.

@Mic92
Copy link
Member

Mic92 commented Jun 5, 2018

I started my x86_64 test build again...

})
}

+ #[cfg_attr(target_os = "linux", ignore)]
Copy link
Member

Choose a reason for hiding this comment

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

we still need this one on Linux

Copy link
Member

Choose a reason for hiding this comment

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

also re-enabled

@LnL7
Copy link
Member

LnL7 commented Jun 5, 2018

@Mic92 That fails like this, but also isn't using the version from the compiler.

14 | / #![feature(const_fn, link_llvm_intrinsics, platform_intrinsics, repr_simd,
15 | |            simd_ffi, target_feature, cfg_target_feature, i128_type, asm,
16 | |            const_atomic_usize_new, stmt_expr_attributes, core_intrinsics,
17 | |            crate_in_paths)]
   | |___________________________^

- disable doctest for stdsimd
- disable previous and some extra extra tcp tests
@jD91mZM2
Copy link
Member Author

jD91mZM2 commented Jun 5, 2018

Nice, thanks for taking care of this!

@LnL7
Copy link
Member

LnL7 commented Jun 5, 2018

Sorry for the delay, I'm running another build with my last changes. I will merge if that didn't break anything.

@Mic92
Copy link
Member

Mic92 commented Jun 5, 2018

The x86_64 build went successfully (before you applied the patch, but disabling test should not change anything). I will start the arm64 build now.

@Mic92
Copy link
Member

Mic92 commented Jun 5, 2018

the bootstrap tarball on aarch64 currently comes without rust-docs installed.
This is a known upstream issue: rust-lang/rust#49462
I will try to disable rust-docs for the meantime.

unpacking sources
unpacking source archive /nix/store/fs08qminsi7ipkcjgpvfrvi7g3s27q73-rust-1.26.0-aarch64-unknown-linux-gnu.tar.gz
source root is rust-1.26.0-aarch64-unknown-linux-gnu
setting SOURCE_DATE_EPOCH to timestamp 1525719903 of file rust-1.26.0-aarch64-unknown-linux-gnu/version
patching sources
patching script interpreter paths in .
./install.sh: interpreter directive changed from "/bin/bash" to "/nix/store/9rv2bzx7jz6wjbaxij5qq580qvzksj4i-bash-4.4-p19/bin/bash"
./rustc/bin/rust-lldb: interpreter directive changed from "/bin/sh" to "/nix/store/9rv2bzx7jz6wjbaxij5qq580qvzksj4i-bash-4.4-p19/bin/sh"
./rustc/bin/rust-gdb: interpreter directive changed from "/bin/sh" to "/nix/store/9rv2bzx7jz6wjbaxij5qq580qvzksj4i-bash-4.4-p19/bin/sh"
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
install: error: unknown component: rust-docs
builder for '/nix/store/8xggc19aqp363scx8jrbq9hvy6gxm46d-rustc-bootstrap-1.26.0.drv' failed with exit code 1
cannot build derivation '/nix/store/zrccpaafc578109r1bxbplbssynq3384-cargo-1.26.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/5y07wm6s1xlrzs978k5kgk6lxv1j84r0-rustc-1.26.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1nvs4asig6i16m9x892w14ig8gypq8kb-ripgrep-0.8.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/1nvs4asig6i16m9x892w14ig8gypq8kb-ripgrep-0.8.1.drv' failed

@Mic92
Copy link
Member

Mic92 commented Jun 5, 2018

Probably we can disable rust-docs for all targets, if it is not needed for bootstrapping.

@jD91mZM2 jD91mZM2 changed the title rustc: 1.25.0 -> 1.26.1 rustc: 1.25.0 -> 1.26.2 Jun 5, 2018
@Mic92
Copy link
Member

Mic92 commented Jun 5, 2018

The following fixed the rust build on aarch64:

diff --git a/pkgs/development/compilers/rust/binaryBuild.nix b/pkgs/development/compilers/rust/binaryBuild.nix
index 1904c12dfdc..849917c4a0c 100644
--- a/pkgs/development/compilers/rust/binaryBuild.nix
+++ b/pkgs/development/compilers/rust/binaryBuild.nix
@@ -14,7 +14,7 @@ let
   installComponents
     = "rustc,rust-std-${platform}"
-    + (optionalString bootstrapping ",rust-docs,cargo")
+    + (optionalString bootstrapping ",cargo")
     ;
 in

@jD91mZM2
Copy link
Member Author

jD91mZM2 commented Jun 6, 2018

Oh right, that makes sense, I saw some issue with rustup some time ago that was because of broken rust docs for certain platforms or something. Might be something similar here!

}

#[test]
+ #[cfg_attr(target_os = "linux", target_os = "macos", ignore)]
Copy link
Member

Choose a reason for hiding this comment

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

This should be:

#[cfg_attr(any(target_os = "linux", target_os = "macos"), ignore)]

Copy link
Member

Choose a reason for hiding this comment

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

@LnL7 did you were able to build rust before you introduced this syntax error?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I messed up the conditional afterwards. Checking 1.26.2 now.

@Mic92
Copy link
Member

Mic92 commented Jun 7, 2018

I also started yet another build for both x86_64 and arm64 linux.

@LnL7
Copy link
Member

LnL7 commented Jun 7, 2018

I already tested x86

@Mic92 Mic92 merged commit ca6569c into NixOS:master Jun 7, 2018
@orivej
Copy link
Contributor

orivej commented Jun 7, 2018

rustc failed on x86_64-linux on Hydra (https://hydra.nixos.org/build/75678845):

thread '<unnamed>' panicked at 'output doesn't contain `RUN_TEST_NEW_ENV2=456`
…
test process::tests::test_inherit_env ... FAILED
…
test result: FAILED. 767 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out

@orivej
Copy link
Contributor

orivej commented Jun 7, 2018

@Mic92 had noted that rustc 1.25 was failing at the same test test_inherit_env (https://hydra.nixos.org/build/74824788).

@Mic92
Copy link
Member

Mic92 commented Jun 8, 2018

Mic92@54ef19a will disable it.
I will push it once it build locally.

@Mic92
Copy link
Member

Mic92 commented Jun 8, 2018

now also pushed to master: 4752959

@orivej
Copy link
Contributor

orivej commented Jun 8, 2018

It looks like this Rust bug: rust-lang/rust#42795. I have reported that it was not fixed: rust-lang/rust#42795 (comment)

@LnL7
Copy link
Member

LnL7 commented Jun 8, 2018

@Mic92 btw. we should probably also send rust to staging next time, the rebuild count is getting pretty large now.

@jD91mZM2 jD91mZM2 deleted the rust branch June 16, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants