Page MenuHomeFreeBSD

lang/rust: Update to 1.43.0
ClosedPublic

Authored by tobik on Apr 21 2020, 12:38 PM.

Details

Summary

Scheduled to be released on 2020-04-23.

https://internals.rust-lang.org/t/1-43-0-prerelease-testing/12209
https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1430-2020-04-23

This also adds the patches from PR 245583 and PR 238556.

Test Plan

11.3 amd64 ok, consumers ok
11.3 i386 ok
12.1 amd64 ok
12.1 i386 ok, consumers ok
12.1 ppc64 elfv1 ok
13.0 amd64 ok
13.0 i386 ok
13.0 ppc64 elfv2 ok

arm64 ok
armv6 ok
armv7 ok
rust-bootstrap ok

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tobik created this revision.Apr 21 2020, 12:38 PM
tobik edited the test plan for this revision. (Show Details)Apr 21 2020, 12:41 PM
mikael added a subscriber: mikael.Apr 21 2020, 2:38 PM

aarch64 is broken:

  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/etc/bash_completion.d/cargo
  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/bin/cargo
  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/share/zsh/site-functions/_cargo
running: /usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/cargo build --manifest-path /usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/Cargo.toml --verbose --frozen
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/rustc - --crate-name ___ --print=file-names -Cdebuginfo=2 -C linker=cc -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
rustc: Unknown command line argument '-generate-arange-section'.  Try: 'rustc --help'
rustc: Unknown command line argument '-mergefunc-use-aliases'.  Try: 'rustc --help'
rustc: Unknown command line argument '-preserve-alignment-assumptions-during-inlining=false'.  Try: 'rustc --help'

Traceback (most recent call last):
  File "x.py", line 11, in <module>
    bootstrap.main()
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 950, in main
    bootstrap(help_triggered)
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 919, in bootstrap
    build.build_bootstrap()
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 711, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/cargo build --manifest-path /usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/Cargo.toml --verbose --frozen

armv7 is broken, caused by https://github.com/rust-lang/stdarch/commit/9fad9649a117ecbf1a84be3953183bba36f62f23:

error[E0432]: unresolved import `self::arm::check_for`
  --> src/libstd/../stdarch/crates/std_detect/src/detect/os/freebsd/mod.rs:11:17
   |            
11 |         pub use self::arm::check_for;
   |                 ^^^^^^^^^^^^^^^^^^^^ no `check_for` in `std_detect::detect::os::arm`
                                                    
error[E0425]: cannot find value `detect_features` in module `self::os`
   --> src/libstd/../stdarch/crates/std_detect/src/detect/mod.rs:121:37
    |
121 |     cache::test(x as u32, self::os::detect_features)
    |                                     ^^^^^^^^^^^^^^^ not found in `self::os`
    |                                     
help: possible candidate is found in another module, you can import it into scope
    |
20  | use crate::std_detect::detect::os::arm::detect_features;

I suppose powerpc will have the same failure as the armv7 but I can't test.

This patch seems to fix the problem for armv7:

--- src/stdarch/crates/std_detect/src/detect/mod.rs.orig        2020-04-21 17:22:57.068560000 +0200
+++ src/stdarch/crates/std_detect/src/detect/mod.rs     2020-04-21 17:23:16.831854000 +0200
@@ -100,7 +100,7 @@ cfg_if! {
     } else if #[cfg(all(target_os = "linux", feature = "use_std"))] {
         #[path = "os/linux/mod.rs"]
         mod os;
-    } else if #[cfg(target_os = "freebsd")] {
+    } else if #[cfg(all(target_os = "freebsd", feature = "use_std"))] {
         #[cfg(target_arch = "aarch64")]
         #[path = "os/aarch64.rs"]
         mod aarch64;

similar to the linux change in https://github.com/rust-lang/stdarch/commit/4c66d966e803ddbde36ead7a56d3e4b863053e4c

tobik added a comment.Apr 21 2020, 5:33 PM

aarch64 is broken:

  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/etc/bash_completion.d/cargo
  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/bin/cargo
  extracting cargo-0.43.0-aarch64-unknown-freebsd/cargo/share/zsh/site-functions/_cargo
running: /usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/cargo build --manifest-path /usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/Cargo.toml --verbose --frozen
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/rustc - --crate-name ___ --print=file-names -Cdebuginfo=2 -C linker=cc -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
rustc: Unknown command line argument '-generate-arange-section'.  Try: 'rustc --help'
rustc: Unknown command line argument '-mergefunc-use-aliases'.  Try: 'rustc --help'
rustc: Unknown command line argument '-preserve-alignment-assumptions-during-inlining=false'.  Try: 'rustc --help'

Traceback (most recent call last):
  File "x.py", line 11, in <module>
    bootstrap.main()
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 950, in main
    bootstrap(help_triggered)
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 919, in bootstrap
    build.build_bootstrap()
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 711, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/ports/lang/rust/work/rustc-1.43.0-src/build/aarch64-unknown-freebsd/stage0/bin/cargo build --manifest-path /usr/ports/lang/rust/work/rustc-1.43.0-src/src/bootstrap/Cargo.toml --verbose --frozen

This is strange. All of the arguments are passed to LLVM in src/librustc_codegen_llvm/llvm_util.rs. I took the bootstrap from the 13.0-CURRENT aarch64-rust-bootstrap package shortly after we updated Rust to 1.42.0. Something must have gone wrong when compiling LLVM. I can reproduce this on my Rpi3. If I try with the aarch64 bootstrap built on 12.1-RELEASE it seems to work ok. Can you retry with that one? I'll update the review shortly.

tobik updated this revision to Diff 70845.Apr 21 2020, 5:35 PM
  • Add armv7 build fix
  • Use aarch64 bootstrap built on 12.1-RELEASE instead (just copied to freefall, so give time to sync or grab from [1])

[1] http://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/aarch64-rust-bootstrap-1.42.0.txz

tobik added a subscriber: pkubaj.Apr 21 2020, 5:40 PM

I suppose powerpc will have the same failure as the armv7 but I can't test.

@pkubaj Can you check if lang/rust still builds on powerpc64?

tobik edited the test plan for this revision. (Show Details)Apr 21 2020, 8:26 PM
tobik edited the test plan for this revision. (Show Details)Apr 22 2020, 6:56 AM
tobik updated this revision to Diff 70877.Apr 22 2020, 4:22 PM
  • Start tracking libgit2 version in BUILD_DEPENDS to prevent bogus bug reports

11.3 i386 : rust ok ; consumers ??
13.0 amd64 : rust ok ; consumers ??
armv7 ok

tobik edited the test plan for this revision. (Show Details)Apr 22 2020, 5:59 PM
tobik added a comment.Apr 22 2020, 6:03 PM

11.3 i386 : rust ok ; consumers ??
13.0 amd64 : rust ok ; consumers ??
armv7 ok

Thanks. Do you plan to test consumers on 11.3 i386, 13.0 amd64? IMHO it's enough to test them on 11,3 amd64 and 12.1 i386. Though it will probably not hurt either.

P.S. If you click "Edit Revision" you should be able to edit the test plan too.

Testing currently.

elfv2 failed with sigsegv:

   Compiling cc v1.0.50
     Running `/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/bootstrap/debug/rustc --crate-name cc --edition=2018 /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=0 -C metadata=4e449c17c9c20698 -C extra-filename=-4e449c17c9c20698 --out-dir /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps -C linker=gcc9 -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps --cap-lints allow -Zbinary-dep-depinfo`
rustc command: "LD_LIBRARY_PATH"="/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib:/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps:/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/bin/rustc" "--crate-name" "cc" "--edition=2018" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "debuginfo=0" "-C" "metadata=4e449c17c9c20698" "-C"
"extra-filename=-4e449c17c9c20698" "--out-dir" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps" "-C" "linker=gcc9" "-L" "dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps" "--cap-lints" "allow" "-Zbinary-dep-depinfo" "-Clinker=gcc9"
sysroot: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-sysroot"
libdir: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib"
error: could not compile `cc`.

Caused by:
  process didn't exit successfully: `/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/bootstrap/debug/rustc --crate-name cc --edition=2018 /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=0 -C metadata=4e449c17c9c20698 -C extra-filename=-4e449c17c9c20698 --out-dir /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps -C linker=gcc9 -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps --cap-lints allow -Zbinary-dep-depinfo` (signal: 11, SIGSEGV:
invalid memory reference)
command did not execute successfully: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/bin/cargo" "build" "-Zconfig-profile" "--target" "powerpc64-unknown-freebsd" "-Zbinary-dep-depinfo" "-j" "1" "-v" "--release" "--frozen" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/src/libtest/Cargo.toml" "--message-format" "json-render-diagnostics"
tobik added a comment.Apr 23 2020, 3:29 AM

elfv2 failed with sigsegv:

   Compiling cc v1.0.50
     Running `/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/bootstrap/debug/rustc --crate-name cc --edition=2018 /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=0 -C metadata=4e449c17c9c20698 -C extra-filename=-4e449c17c9c20698 --out-dir /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps -C linker=gcc9 -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps --cap-lints allow -Zbinary-dep-depinfo`
rustc command: "LD_LIBRARY_PATH"="/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib:/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps:/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/bin/rustc" "--crate-name" "cc" "--edition=2018" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "debuginfo=0" "-C" "metadata=4e449c17c9c20698" "-C"
"extra-filename=-4e449c17c9c20698" "--out-dir" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps" "-C" "linker=gcc9" "-L" "dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps" "--cap-lints" "allow" "-Zbinary-dep-depinfo" "-Clinker=gcc9"
sysroot: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-sysroot"
libdir: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/lib"
error: could not compile `cc`.

Caused by:
  process didn't exit successfully: `/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/bootstrap/debug/rustc --crate-name cc --edition=2018 /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/vendor/cc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=0 -C metadata=4e449c17c9c20698 -C extra-filename=-4e449c17c9c20698 --out-dir /wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps -C linker=gcc9 -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0-std/release/deps --cap-lints allow -Zbinary-dep-depinfo` (signal: 11, SIGSEGV:
invalid memory reference)
command did not execute successfully: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/build/powerpc64-unknown-freebsd/stage0/bin/cargo" "build" "-Zconfig-profile" "--target" "powerpc64-unknown-freebsd" "-Zbinary-dep-depinfo" "-j" "1" "-v" "--release" "--frozen" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.43.0-src/src/libtest/Cargo.toml" "--message-format" "json-render-diagnostics"

Thanks. Is this the same issue as [1]? The current elfv2 bootstrap was compiled on 13.0-CURRENT with LLVM10. I am going to switch it over to the one compiled on 12.1-RELEASE. Let's see if that goes any better?

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244813

tobik updated this revision to Diff 70903.Apr 23 2020, 3:31 AM
  • Switch to elfv2 bootstrap built on 12.1-RELEASE with LLVM8
tobik accepted this revision as: tobik.Apr 23 2020, 3:34 AM
tobik edited the test plan for this revision. (Show Details)

Ready on amd64 and i386 AFAIC.

pkubaj edited the test plan for this revision. (Show Details)Apr 23 2020, 8:55 AM
pkubaj edited the test plan for this revision. (Show Details)Apr 23 2020, 11:20 AM
mikael edited the test plan for this revision. (Show Details)Apr 23 2020, 12:04 PM
mikael accepted this revision as: mikael.Apr 23 2020, 2:28 PM
mikael edited the test plan for this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Apr 23 2020, 3:32 PM
Closed by commit rP532685: lang/rust: Update to 1.43.0 (authored by tobik). · Explain Why
This revision was automatically updated to reflect the committed changes.