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

tarball for rustc 1.27.0 is not able to rebuildable itself #51650

Closed
semarie opened this issue Jun 20, 2018 · 12 comments
Closed

tarball for rustc 1.27.0 is not able to rebuildable itself #51650

semarie opened this issue Jun 20, 2018 · 12 comments
Labels
T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Comments

@semarie
Copy link
Contributor

semarie commented Jun 20, 2018

while preparing packaging of upcoming rustc 1.27.0 (stable) for OpenBSD, I found it is not able to fully rebuild itself.

exactly, rustc-1.27.0 fails to build rust-installer tool, due to error-chain crate, due to unused_doc_comment has been renamed to unused_doc_comments lint error.

strictly speaking, rustc 1.27.0 is able to bootstrap itself. but the distributed tarball doesn't permit such bootstrapping. it is a niche problem that could affect downstream while packaging.

   Compiling installer v0.0.0 (file:///home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/src/tools/rust-installer)
     Running `/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/bootstrap/debug/rustc --crate-name installer tools/rust-installer/src/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=cb0edbb133b08d30 -C extra-filename=-cb0edbb133b08d30 --out-dir /data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps --target x86_64-unknown-openbsd -L dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps -L dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/release/deps --extern tar=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libtar-a79879d0aaa5d01f.rlib --extern clap=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libclap-1f5fff6cd390ab26.rlib --extern xz2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libxz2-f0ab174e0a4d5fa8.rlib --extern error_chain=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/liberror_chain-e8011be67578c54d.rlib --extern rayon=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/librayon-025f5b0b00b7001b.rlib --extern walkdir=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libwalkdir-296d738a531e22af.rlib --extern flate2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libflate2-366741584a48b864.rlib -L native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/backtrace-sys-0392c0625ee93f39/out/.libs -L native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/miniz-sys-17c754f01d2fd7d7/out -L /data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/lzma-sys-ad13c785dc5afda7/out/lib`
rustc command: "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-bootstrap-amd64-1.27.0-20180619/bin/rustc" "--crate-name" "installer" "tools/rust-installer/src/lib.rs" "--crate-type" "lib" "--emit=dep-info,link" "-C" "opt-level=3" "-C" "metadata=cb0edbb133b08d30" "-C" "extra-filename=-cb0edbb133b08d30" "--out-dir" "/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps" "--target" "x86_64-unknown-openbsd" "-L" "dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps" "-L" "dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/release/deps" "--extern" "tar=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libtar-a79879d0aaa5d01f.rlib" "--extern" "clap=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libclap-1f5fff6cd390ab26.rlib" "--extern" "xz2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libxz2-f0ab174e0a4d5fa8.rlib" "--extern" "error_chain=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/liberror_chain-e8011be67578c54d.rlib" "--extern" "rayon=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/librayon-025f5b0b00b7001b.rlib" "--extern" "walkdir=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libwalkdir-296d738a531e22af.rlib" "--extern" "flate2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libflate2-366741584a48b864.rlib" "-L" "native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/backtrace-sys-0392c0625ee93f39/out/.libs" "-L" "native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/miniz-sys-17c754f01d2fd7d7/out" "-L" "/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/lzma-sys-ad13c785dc5afda7/out/lib" "--cfg" "stage1" "--sysroot" "/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-sysroot" "-C" "debug-assertions=n" "--color=always" "-Dwarnings"
sysroot: "/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-sysroot"
libdir: "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-bootstrap-amd64-1.27.0-20180619/lib"
error: lint unused_doc_comment has been renamed to unused_doc_comments
  --> tools/rust-installer/src/lib.rs:26:5
   |
26 | /     error_chain!{
27 | |         foreign_links {
28 | |             Io(::std::io::Error);
29 | |             StripPrefix(::std::path::StripPrefixError);
30 | |             WalkDir(::walkdir::Error);
31 | |         }
32 | |     }
   | |_____^
   |
   = note: `-D renamed-and-removed-lints` implied by `-D warnings`
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: lint unused_doc_comment has been renamed to unused_doc_comments
  --> tools/rust-installer/src/lib.rs:26:5
   |
26 | /     error_chain!{
27 | |         foreign_links {
28 | |             Io(::std::io::Error);
29 | |             StripPrefix(::std::path::StripPrefixError);
30 | |             WalkDir(::walkdir::Error);
31 | |         }
32 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: lint unused_doc_comment has been renamed to unused_doc_comments
  --> tools/rust-installer/src/lib.rs:26:5
   |
26 | /     error_chain!{
27 | |         foreign_links {
28 | |             Io(::std::io::Error);
29 | |             StripPrefix(::std::path::StripPrefixError);
30 | |             WalkDir(::walkdir::Error);
31 | |         }
32 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: lint unused_doc_comment has been renamed to unused_doc_comments
  --> tools/rust-installer/src/lib.rs:26:5
   |
26 | /     error_chain!{
27 | |         foreign_links {
28 | |             Io(::std::io::Error);
29 | |             StripPrefix(::std::path::StripPrefixError);
30 | |             WalkDir(::walkdir::Error);
31 | |         }
32 | |     }
   | |_____^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 4 previous errors

error: Could not compile `installer`.

Caused by:
  process didn't exit successfully: `/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/bootstrap/debug/rustc --crate-name installer tools/rust-installer/src/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=cb0edbb133b08d30 -C extra-filename=-cb0edbb133b08d30 --out-dir /data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps --target x86_64-unknown-openbsd -L dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps -L dependency=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/release/deps --extern tar=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libtar-a79879d0aaa5d01f.rlib --extern clap=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libclap-1f5fff6cd390ab26.rlib --extern xz2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libxz2-f0ab174e0a4d5fa8.rlib --extern error_chain=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/liberror_chain-e8011be67578c54d.rlib --extern rayon=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/librayon-025f5b0b00b7001b.rlib --extern walkdir=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libwalkdir-296d738a531e22af.rlib --extern flate2=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/deps/libflate2-366741584a48b864.rlib -L native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/backtrace-sys-0392c0625ee93f39/out/.libs -L native=/data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/miniz-sys-17c754f01d2fd7d7/out -L /data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/x86_64-unknown-openbsd/stage0-tools/x86_64-unknown-openbsd/release/build/lzma-sys-ad13c785dc5afda7/out/lib` (exit code: 101)
command did not execute successfully: "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-bootstrap-amd64-1.27.0-20180619/bin/cargo" "build" "--target" "x86_64-unknown-openbsd" "-j" "4" "-v" "--release" "--frozen" "--manifest-path" "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/src/tools/rust-installer/Cargo.toml" "--features" "" "--message-format" "json"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/x.py", line 20, in <module>
    bootstrap.main()
  File "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/src/bootstrap/bootstrap.py", line 800, in main
    bootstrap(help_triggered)
  File "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/src/bootstrap/bootstrap.py", line 791, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/rustc-1.27.0-src/src/bootstrap/bootstrap.py", line 148, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /data/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/build/bootstrap/debug/bootstrap dist --jobs=4 src/libstd src/librustc src/doc cargo
*** Error 1 in . (Makefile:175 'do-build')
*** Error 1 in . (/home/semarie/repos/openbsd/ports/infrastructure/mk/bsd.port.mk:2700 '/home/semarie/repos/openbsd/ports/pobj/rust-1.27.0/build-amd64/.build_done')
*** Error 1 in /home/semarie/ports/mystuff/lang/rust (/home/semarie/repos/openbsd/ports/infrastructure/mk/bsd.port.mk:2383 'all')

note:

  • the used tarball has git-commit-hash pointing to e0d93fc
  • the error-chain crate packaged has information package (in .cargo-checksum.json) ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3
@est31
Copy link
Member

est31 commented Jun 20, 2018

There isn't much we can do without a new error-chain release. #51501

Beyond switching rust-installer to failure of course :p.

@pietroalbini
Copy link
Member

cc @Mark-Simulacrum

@pietroalbini pietroalbini added T-release Relevant to the release subteam, which will review and decide on the PR/issue. I-nominated labels Jun 20, 2018
@est31
Copy link
Member

est31 commented Jun 20, 2018

Why hasn't this been caught while 1.27.0 was in beta?

@semarie
Copy link
Contributor Author

semarie commented Jun 20, 2018

@est31 it is failing in a specific configuration: rebuilding. bots are testing rustc-1.26.2 is able to build rustc-1.27.0, but not rustc-1.27.0 to be able to build rustc-1.27.0

@est31
Copy link
Member

est31 commented Jun 20, 2018

@semarie yeah but it should show up when 1.27.0 tries to build whatever is on nightly.

@semarie
Copy link
Contributor Author

semarie commented Jun 20, 2018

@est31 here my analysis.

currently nightly is build using 03fb2f4 . I downloaded a beta tarball pointed by https://github.com/rust-lang/rust/blob/master/src/stage0.txt#L15 and checked the version file.

The rename unused_doc_comment to unused_doc_comments was landed later to beta branch in #51037.

so if I didn't mess myself, it seems to me that the latest commit in the beta branch isn't used to build nightly. so not all changes are tested in beta.

@est31
Copy link
Member

est31 commented Jun 20, 2018

Oh that's unfortunate. Thanks @semarie for digging this up.

Right so I see the following options:

  1. remove (parts of) Fix naming conventions for new lints #50879 from the beta (and stable) branch... one could argue that parts of it are a breaking change and thus should ride the normal trains
  2. don't pass -D warnings for the rust-installer crate
  3. patch the rust-installer crate to add #[allow(warnings)] or #[allow(renamed_and_removed_lints)] or something like that
  4. wait for a new release of error-chain and update to it
  5. update to a git version of error-chain... cargo-vendor should support git dependencies now IIRC

@Mark-Simulacrum
Copy link
Member

This is indeed unfortunate (sorry about the problem here!) -- I think you should be able to fix this by changing config.toml to have deny-warnings set to false in the [rust] section.

@semarie
Copy link
Contributor Author

semarie commented Jun 20, 2018

Passing deny-warnings=false in config.toml workaround efficiently the problem. And patching error-chain to add rust-lang-deprecated/error-chain#247 too.

bors added a commit that referenced this issue Jun 21, 2018
[beta] Prepare 1.28.0 beta release

This feels likely to fail due to #51650 but I want to see what CI says.
@fogti
Copy link
Contributor

fogti commented Sep 2, 2018

@rossmacarthur
Copy link
Contributor

What needs to be done for this issue to be resolved?

@pietroalbini
Copy link
Member

I think the recommended fix for this issue is #51650 (comment): it's not hard for downstream users to follow it, and it's too late for us to rebuild the tarballs of 1.27.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants