New issue
Advanced search Search tips

Issue 772988 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

llvm-next failed when building rust

Project Member Reported by laszio@chromium.org, Oct 9 2017

Issue description

Observed on several boards (amd64, arm, aarch64). Using amd64 as an example:

https://uberchromegw.corp.google.com/i/chromeos/builders/amd64-llvm-next-toolchain/builds/410/steps/SetupBoard/logs/stdio

rust-1.20.0: >>> Compiling source in /var/tmp/portage/dev-lang/rust-1.20.0/work/rustc-1.20.0-src ...
rust-1.20.0:    Compiling getopts v0.2.14
rust-1.20.0:    Compiling libc v0.2.26
rust-1.20.0:    Compiling rustc-serialize v0.3.24
rust-1.20.0:    Compiling gcc v0.3.51
rust-1.20.0:    Compiling num_cpus v1.6.2
rust-1.20.0:    Compiling filetime v0.1.10
rust-1.20.0:    Compiling build_helper v0.1.0 (file:///var/tmp/portage/dev-lang/rust-1.20.0/work/rustc-1.20.0-src/src/build_helper)
rust-1.20.0:    Compiling cmake v0.1.24
rust-1.20.0:    Compiling toml v0.1.30
rust-1.20.0:    Compiling bootstrap v0.0.0 (file:///var/tmp/portage/dev-lang/rust-1.20.0/work/rustc-1.20.0-src/src/bootstrap)
rust-1.20.0:     Finished dev [unoptimized] target(s) in 15.97 secs
rust-1.20.0: thread 'main' panicked at '
rust-1.20.0: 
rust-1.20.0: couldn't find required command: "armv7a-cros-linux-gnueabi-clang"

I tried 'emerge rust' and 'setup_board' but haven't been able to reproduce yet.
 
Labels: OS-Chrome
Owner: vapier@chromium.org
Started after: 
https://chromium-review.googlesource.com/c/chromiumos/chromite/+/699064

To repro, remove all cross packages and then do a setup_board with nousepkg.

Note that this will affect any build with that pass --nousepkg to setup_board.
Hi Mike, this basically breaks all nightly tests in toolchain team. Could we revert it temporarily?
Cc: vapier@chromium.org manojgupta@chromium.org za...@chromium.org
Status: Started (was: Untriaged)
it isn't all --nousepkg boards ... it's for configs that use --nousepkg when building SDK/toolchain packages, and they're building a subset of toolchain tuples.  samus for example omits armv7a.

we have a couple of options:
- don't build host-cross-packages unless using binpkgs, or if the selected target includes all the relevant tuples (which effectively means just the sdk bot)
- change the rust ebuild to only enable targets for toolchains that are available

if we go the first route, it means none of the llvm-next bots will test the rust packages, which i assume is not what the toolchain guys want.
  https://chromium-review.googlesource.com/707219

if we got the second route, it makes the rust ebuild a bit more indeterminate in theory, but in practice i'm not sure how often it'll come up.

i guess fundamentally this just shows how conflating host tools and target code is a bad idea.

Comment 4 by za...@chromium.org, Oct 9 2017

What do you mean by "conflating host tools and target code"?

>- change the rust ebuild to only enable targets for toolchains that are available

How would that work? Equery? Use flags?
i mean rust having a code gen and runtime libs in the same package

for toolchain testing, i mean just probe the programs in the ebuild.  if `xxx-gcc --version` work, it's available.  if not, skip it.

Comment 6 by za...@chromium.org, Oct 9 2017

> i mean rust having a code gen and runtime libs in the same package

Would it be better if we had a rustc package separate from the stdlib package for each non-host target?
that would be better.  for now, so we can keep rust moving forward in the sdk and not break the llvm builders, we have to decide between the two options in comment #3.  i don't feel strongly either way.
Mike, can you land the Cl to fix this as a stop-gap measure?

Comment 9 by vapier@chromium.org, Oct 10 2017

i can, but someone needs to +2 it :)
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/66814c3bbbd2068dd34af9df2f677316bf081752

commit 66814c3bbbd2068dd34af9df2f677316bf081752
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Oct 10 19:19:08 2017

cros_setup_toolchains: restrict host-post-cross packages further

If we're building from source, and we're only building for a single
board, that board might not enable all the toolchain tuples that are
required to build these host packages.  Disable the host-post-cross
target in that case.

BUG= chromium:772988 
TEST=precq passes

Change-Id: Idaafee86f43374d2397782bf5dc33537bbc6b3c7
Reviewed-on: https://chromium-review.googlesource.com/707219
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/66814c3bbbd2068dd34af9df2f677316bf081752/scripts/cros_setup_toolchains.py

llvm-next bots are passing now.  if we want to redo rust handling, we can explore that in a new bug.
Status: Fixed (was: Started)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/61f718776b4ab10dfb326e208654b928cdbf2ab3

commit 61f718776b4ab10dfb326e208654b928cdbf2ab3
Author: Mike Frysinger <vapier@chromium.org>
Date: Wed Oct 11 23:11:11 2017

cros_setup_toolchains: enable rust via binpkgs

Now that the SDK bot has finished and uploaded rust binpkgs,
allow it to be installed for all devs/bots.

BUG= chromium:772988 
TEST=`./update_chroot` installed rust from a binpkg

Change-Id: I0ea5411f5e43fff36bfa592ffd831624f12cd02b
Reviewed-on: https://chromium-review.googlesource.com/709715
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/61f718776b4ab10dfb326e208654b928cdbf2ab3/scripts/cros_setup_toolchains.py

Status: Verified (was: Fixed)

Sign in to add a comment