New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 844832 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

tast command is unable to cross-compile

Project Member Reported by derat@chromium.org, May 19 2018

Issue description

I just noticed that my switch to use "go install" instead of "go build" in https://chromium-review.googlesource.com/1025399 for  issue 813790  broke cross-compilation. "go install" (intentionally) refuses to cross-compile when $GOBIN is set. I need to set $GOBIN to avoid installing binaries alongside source code. I want to use "go install" instead of "go build" because it's significantly faster for no-op builds.

I think the best that I can do is to use "go install" when building for the local arch (the common case when testing an Intel DUT) while falling back to "go build" when cross-compiling (for an ARM DUT).
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast/+/2d1f57ed67980909e9e79fa7d628f7f087308949

commit 2d1f57ed67980909e9e79fa7d628f7f087308949
Author: Daniel Erat <derat@chromium.org>
Date: Tue May 22 04:17:53 2018

tast: Fix cross-compiling test bundles.

Fix a regression introduced by 96bc6953 (which switched from
"go build" to "go install") that made the "tast build" and
"tast run -build" commands fail when cross-compiling with
the error "go install: cannot install cross-compiled
binaries when GOBIN is set".

"go install" is much faster for no-op builds, but doesn't
permit cross-compiling binaries to custom locations.
Continue using "go install" when building for the local arch
but fall back to "go build" when cross-compiling.

BUG= chromium:844832 
TEST=manual: "tast run -build" works when run against a
     kevin DUT

Change-Id: I532ab47c1cdd5d792b765378842568be0392b50a
Reviewed-on: https://chromium-review.googlesource.com/1066283
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Rahul Chaudhry <rahulchaudhry@chromium.org>

[modify] https://crrev.com/2d1f57ed67980909e9e79fa7d628f7f087308949/src/chromiumos/cmd/tast/build/build.go

Comment 2 by derat@chromium.org, May 22 2018

Status: Fixed (was: Started)

Sign in to add a comment