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 the lockfile shipped with rust-src #255

Merged
merged 8 commits into from
Sep 18, 2019
Merged

Use the lockfile shipped with rust-src #255

merged 8 commits into from
Sep 18, 2019

Conversation

RalfJung
Copy link
Collaborator

@RalfJung RalfJung commented Sep 9, 2019

This reverts a prior revert.
compiler-builtins is nowadays pulled in via crates.io, so let's give locking another shot.

@RalfJung
Copy link
Collaborator Author

RalfJung commented Sep 9, 2019

Hm @jethrogb this makes your host_patch test fail. Any idea why? Does having a lockfile "overwrite" having a patch section? Is there anything we can do about that?

@jethrogb
Copy link
Collaborator

jethrogb commented Sep 9, 2019

Unfortunately the test framework doesn't show the test output, only that it didn't contain certain substrings... Are we passing --locked or --frozen? A [patch] section will need to change Cargo.lock

@RalfJung
Copy link
Collaborator Author

The build log looks like this:

+ "rustc" "--print" "sysroot"
+ RUSTFLAGS="--sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked"
+ "/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "build" "--manifest-path" "/tmp/xargo.ikQsOnzyK6Yk/Cargo.toml" "--target" "x86_64-unknown-linux-gnu" "-v" "-p" "std"
    Updating git repository `https://github.com/alexcrichton/cc-rs`
warning: Patch `cc v1.0.45 (https://github.com/alexcrichton/cc-rs#66789947)` was not used in the crate graph.
Patch `rustc-std-workspace-std v1.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-std)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling core v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore)
   Compiling compiler_builtins v0.1.18
     Running `rustc --edition=2018 --crate-name core /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=e6dbc1f05834cbd6 -C extra-filename=-e6dbc1f05834cbd6 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
   Compiling libc v0.2.61
   Compiling cc v1.0.35
   Compiling build_helper v0.1.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/build_helper)
     Running `rustc --crate-name build_script_build /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.18/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=61c584d01d88092c -C extra-filename=-61c584d01d88092c --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/compiler_builtins-61c584d01d88092c -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/libc-0.2.61/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="align"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-std-workspace-core"' -C metadata=2b4d808e5fc4a2ca -C extra-filename=-2b4d808e5fc4a2ca --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/libc-2b4d808e5fc4a2ca -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --cap-lints allow`
     Running `rustc --edition=2018 --crate-name build_helper /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/build_helper/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=ad8b9760f4d8d12a -C extra-filename=-ad8b9760f4d8d12a --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/deps -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps`
     Running `rustc --crate-name cc /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cc-1.0.35/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=9f84393590e104d7 -C extra-filename=-9f84393590e104d7 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --cap-lints allow`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/compiler_builtins-61c584d01d88092c/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/libc-2b4d808e5fc4a2ca/build-script-build`
   Compiling cmake v0.1.38
     Running `rustc --crate-name cmake /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cmake-0.1.38/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=6282ea4e60652424 -C extra-filename=-6282ea4e60652424 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern cc=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcc-9f84393590e104d7.rmeta --cap-lints allow`
   Compiling unwind v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libunwind)
   Compiling rustc_asan v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_asan)
   Compiling rustc_msan v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_msan)
   Compiling rustc_tsan v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_tsan)
   Compiling rustc_lsan v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_lsan)
   Compiling std v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd)
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libunwind/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=b04c6be643ce8a6f -C extra-filename=-b04c6be643ce8a6f --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/unwind-b04c6be643ce8a6f -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern cc=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcc-9f84393590e104d7.rlib`
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_asan/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=0ae180e2906dac79 -C extra-filename=-0ae180e2906dac79 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_asan-0ae180e2906dac79 -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern build_helper=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libbuild_helper-ad8b9760f4d8d12a.rlib --extern cmake=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcmake-6282ea4e60652424.rlib`
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_msan/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=52cada8b1c9492df -C extra-filename=-52cada8b1c9492df --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_msan-52cada8b1c9492df -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern build_helper=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libbuild_helper-ad8b9760f4d8d12a.rlib --extern cmake=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcmake-6282ea4e60652424.rlib`
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_tsan/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=11821cb08a2a01ef -C extra-filename=-11821cb08a2a01ef --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_tsan-11821cb08a2a01ef -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern build_helper=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libbuild_helper-ad8b9760f4d8d12a.rlib --extern cmake=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcmake-6282ea4e60652424.rlib`
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=4ab3d2cd3376a18a -C extra-filename=-4ab3d2cd3376a18a --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/std-4ab3d2cd3376a18a -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern cc=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcc-9f84393590e104d7.rlib`
     Running `rustc --edition=2018 --crate-name build_script_build /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_lsan/build.rs --color never --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=27a343bc84f750c6 -C extra-filename=-27a343bc84f750c6 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_lsan-27a343bc84f750c6 -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern build_helper=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libbuild_helper-ad8b9760f4d8d12a.rlib --extern cmake=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps/libcmake-6282ea4e60652424.rlib`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/std-4ab3d2cd3376a18a/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_msan-52cada8b1c9492df/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_asan-0ae180e2906dac79/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/unwind-b04c6be643ce8a6f/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_lsan-27a343bc84f750c6/build-script-build`
     Running `/tmp/xargo.ikQsOnzyK6Yk/target/debug/build/rustc_tsan-11821cb08a2a01ef/build-script-build`
   Compiling rustc-std-workspace-core v1.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core)
     Running `rustc --edition=2018 --crate-name rustc_std_workspace_core /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=fe5791a0b36ce064 -C extra-filename=-fe5791a0b36ce064 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --crate-name compiler_builtins /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.18/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=93ac87251b37c74d -C extra-filename=-93ac87251b37c74d --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_std_workspace_core-fe5791a0b36ce064.rmeta --cap-lints allow --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --crate-name libc /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/libc-0.2.61/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="align"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-std-workspace-core"' -C metadata=9c4981c622e8ff41 -C extra-filename=-9c4981c622e8ff41 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern rustc_std_workspace_core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_std_workspace_core-fe5791a0b36ce064.rmeta --cap-lints allow --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_core_cvoid --cfg libc_packedN --cfg libc_thread_local`
   Compiling alloc v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc)
   Compiling cfg-if v0.1.8
   Compiling panic_abort v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libpanic_abort)
     Running `rustc --edition=2018 --crate-name alloc /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/liballoc/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=2bf559904912951e -C extra-filename=-2bf559904912951e --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --crate-name cfg_if /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cfg-if-0.1.8/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=d5060574f826e1e6 -C extra-filename=-d5060574f826e1e6 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_std_workspace_core-fe5791a0b36ce064.rmeta --cap-lints allow --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name panic_abort /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libpanic_abort/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=33e23017295925a5 -C extra-filename=-33e23017295925a5 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --extern libc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-9c4981c622e8ff41.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name unwind /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libunwind/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=28dd2d05ffe84f9b -C extra-filename=-28dd2d05ffe84f9b --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern cfg_if=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcfg_if-d5060574f826e1e6.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --extern libc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-9c4981c622e8ff41.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked -l gcc_s`
   Compiling rustc-std-workspace-alloc v1.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-alloc)
   Compiling panic_unwind v0.0.0 (/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libpanic_unwind)
     Running `rustc --edition=2018 --crate-name rustc_std_workspace_alloc /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/tools/rustc-std-workspace-alloc/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=d29ede550dab48c6 -C extra-filename=-d29ede550dab48c6 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name panic_unwind /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libpanic_unwind/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=27e1e991de6d611a -C extra-filename=-27e1e991de6d611a --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --extern cfg_if=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcfg_if-d5060574f826e1e6.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --extern libc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-9c4981c622e8ff41.rmeta --extern unwind=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libunwind-28dd2d05ffe84f9b.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name rustc_msan /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_msan/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=6d5ed1b2616cc9f5 -C extra-filename=-6d5ed1b2616cc9f5 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name rustc_tsan /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_tsan/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=c1fd1301e3860846 -C extra-filename=-c1fd1301e3860846 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name rustc_asan /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_asan/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=e04fa553b4868105 -C extra-filename=-e04fa553b4868105 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name rustc_lsan /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/librustc_lsan/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=a6f865a9f37cda72 -C extra-filename=-a6f865a9f37cda72 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rmeta --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rmeta --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
   Compiling hashbrown v0.5.0
     Running `rustc --edition=2018 --crate-name hashbrown /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/hashbrown-0.5.0/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="nightly"' --cfg 'feature="rustc-dep-of-std"' -C metadata=4cabcb65c1c647b6 -C extra-filename=-4cabcb65c1c647b6 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rmeta --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_std_workspace_alloc-d29ede550dab48c6.rmeta --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_std_workspace_core-fe5791a0b36ce064.rmeta --cap-lints allow --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked`
     Running `rustc --edition=2018 --crate-name std /home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/lib.rs --color never --crate-type dylib --crate-type rlib --emit=dep-info,link -C prefer-dynamic -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=f2ad81e4aae1da77 --out-dir /tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/tmp/xargo.ikQsOnzyK6Yk/target/debug/deps --extern alloc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liballoc-2bf559904912951e.rlib --extern cfg_if=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcfg_if-d5060574f826e1e6.rlib --extern compiler_builtins=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcompiler_builtins-93ac87251b37c74d.rlib --extern core=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libcore-e6dbc1f05834cbd6.rlib --extern hashbrown=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libhashbrown-4cabcb65c1c647b6.rlib --extern libc=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-9c4981c622e8ff41.rlib --extern panic_abort=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_abort-33e23017295925a5.rlib --extern panic_unwind=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_unwind-27e1e991de6d611a.rlib --extern rustc_asan=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_asan-e04fa553b4868105.rlib --extern rustc_lsan=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_lsan-a6f865a9f37cda72.rlib --extern rustc_msan=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_msan-6d5ed1b2616cc9f5.rlib --extern rustc_tsan=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/librustc_tsan-c1fd1301e3860846.rlib --extern unwind=/tmp/xargo.ikQsOnzyK6Yk/target/x86_64-unknown-linux-gnu/debug/deps/libunwind-28dd2d05ffe84f9b.rlib --sysroot /home/r/.xargo/HOST -Z force-unstable-if-unmarked -l dl -l rt -l pthread`
    Finished dev [unoptimized + debuginfo] target(s) in 29.14s
+ RUSTFLAGS="--sysroot /home/r/.xargo/HOST"
+ "/home/r/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "build" "-v"
   Compiling host v0.1.0 (/tmp/xargo.oq2OBqkDBBhL)
     Running `rustc --edition=2018 --crate-name host src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=106190ad56297e91 -C extra-filename=-106190ad56297e91 --out-dir /tmp/xargo.oq2OBqkDBBhL/target/debug/deps -C incremental=/tmp/xargo.oq2OBqkDBBhL/target/debug/incremental -L dependency=/tmp/xargo.oq2OBqkDBBhL/target/debug/deps --sysroot /home/r/.xargo/HOST`
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s

@RalfJung
Copy link
Collaborator Author

In particular it says

warning: Patch `cc v1.0.45 (https://github.com/alexcrichton/cc-rs#66789947)` was not used in the crate graph.

The lockfile references v1.0.35 of that crate, which likely is why the patch does not apply.

@RalfJung
Copy link
Collaborator Author

Seems like that worked! CI is green.

@RalfJung
Copy link
Collaborator Author

@jethrogb what do you think? Should we try to use the lockfile shipped with rust-src?

@jethrogb
Copy link
Collaborator

Not if we have to keep changing the test so we match the version with whatever std is using now.

@RalfJung
Copy link
Collaborator Author

I think the benefits far outweigh this cost. Right now, a new release of any of the crates libstd depends on can break the build any time. This has happened recently (when a new rustc-std-workspace-std was released), and it has happened before last year.

Maybe we should run that test only on a pinned version of nightly. But I think being able to reliably and reproducibly build old versions of libstd is important, more important than having this particular test work with zero maintenance.

@RalfJung
Copy link
Collaborator Author

bors try

Let's see which version the pinned 2018-12-01 nightly needs, then we can just pin the test to that.

bors bot added a commit that referenced this pull request Sep 18, 2019
@bors
Copy link
Contributor

bors bot commented Sep 18, 2019

try

Build failed

@RalfJung
Copy link
Collaborator Author

bors try

bors bot added a commit that referenced this pull request Sep 18, 2019
@bors
Copy link
Contributor

bors bot commented Sep 18, 2019

try

Build succeeded

@RalfJung
Copy link
Collaborator Author

That seems to have worked. With this, the patch test should not fail as nightly Rust changes.

@jethrogb
Copy link
Collaborator

Ok but you're using the same cc version for every pinned nightly, this will break if we ever add another one.

@jethrogb
Copy link
Collaborator

Can we parse the needed cc version from Cargo.lock?

@RalfJung
Copy link
Collaborator Author

RalfJung commented Sep 18, 2019

this will break if we ever add another one.

It will. I can update the test then (make it depend on which nightly is pinned).
I find it unlikely that we will add another pinned nightly, though...

Can we parse the needed cc version from Cargo.lock?

We probably can. I am just not convinced that's worth the effort.

But if you insist, I can work on that. Not sure when I will have the time, though.

src/sysroot.rs Outdated
@@ -98,6 +99,10 @@ version = "0.0.0"
stoml.push_str(&profile.to_string())
}

// rust-src comes with a lockfile for libstd. Use it.
let lockfile = src.path().join("..").join("Cargo.lock");
fs::copy(lockfile, &td.join("Cargo.lock")).chain_err(|| "couldn't copy lock file")?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be a hard error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why not? All versions of rust-src that we support have this file. It is present since 2017.

Copy link
Collaborator

@jethrogb jethrogb Sep 18, 2019

Choose a reason for hiding this comment

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

What if you're getting your source not from the rust-src package? Like git? Or a local git clone?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then the lock file exists in the same place.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure but the user may have deleted it. I'm ok with forcing that it exists, but the error message should be slightly clearer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair. I made it "Cargo.lock file is missing from source dir".

@jethrogb
Copy link
Collaborator

r=me after minor change

@RalfJung
Copy link
Collaborator Author

bors r=jethrogb

bors bot added a commit that referenced this pull request Sep 18, 2019
255: Use the lockfile shipped with rust-src r=jethrogb a=RalfJung

This reverts a [prior revert](#190).
compiler-builtins is nowadays pulled in via crates.io, so let's give locking another shot.

Co-authored-by: Ralf Jung <post@ralfj.de>
@bors
Copy link
Contributor

bors bot commented Sep 18, 2019

Build succeeded

@bors bors bot merged commit 668d8b0 into japaric:master Sep 18, 2019
@RalfJung RalfJung deleted the lock branch September 18, 2019 13:33
bors bot added a commit that referenced this pull request Nov 8, 2019
262: version bump for 0.3.17 release r=jethrogb a=RalfJung

Right now Miri is broken on macOS and Windows because an updated compiler_builtins has problems, and we don't use the lockfile that would make us use the old version.

So, it's time to release a xargo with #255.

Co-authored-by: Ralf Jung <post@ralfj.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants