New issue
Advanced search Search tips

Issue 604971 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 605154



Sign in to add a comment

GN simplechrome workflow for Chrome OS not finding sysroot

Project Member Reported by posciak@chromium.org, Apr 20 2016

Issue description

Simplechrome workflow does not work for me with gn, gn gen seems to be trying to use a default debian sysroot, instead of what has been configured as target_sysroot in $GN_ARGS by simple chrome workflow. Steps to reproduce:

$ cros-chrome-sdk --board=daisy

$ gn gen out_$SDK_BOARD/Release --args="$GN_ARGS"                                                                                                                                                                                                       
ERROR at //build/config/sysroot.gni:65:5: Assertion failed.
    assert(
    ^-----
Missing sysroot (//build/linux/debian_wheezy_arm-sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=arm
See //build/config/sysroot.gni:66:9: 
        exec_script("//build/dir_exists.py",
        ^-----------------------------------
This is where it was set.



Should it be picking target_sysroot from $GN_ARGS generated by simplechrome instead?
 
Cc: dpranke@chromium.org
By inserting "print(current_toolchain)" to sysroot.gni, I found that arm sysroot is needed by "//native_client/src/trusted/service_runtime/linux/toolchain:nacl_bootstrap_arm".

I know nothing about nacl, but it seems nacl_bootstrap_arm toolchain is defined in src/native_client/src/trusted/service_runtime/linux/toolchain/BUILD.gn.

Probably you should just install the arm sysroot and everything should just work fine?
At least, in my case, it worked and I can build chrome which can run on an arm device.
Another possible fix is changing sysroot.gni to use target_sysroot even when current_toolchain != default_toolchain if current_cpu == target_cpu.
Always using target_sysroot if current_cpu == target_cpu may not work as it can result in building host binaries with target_sysroot if host_cpu==target_cpu.

Yet another possible fix is fixing nacl toolchain to use target_sysroot.
Cc: steve...@chromium.org
Labels: -Build-Tools-GN Proj-GN-Migration OS-Chrome
Owner: hashimoto@chromium.org
Status: Started (was: Assigned)
Made changes to use target_sysroot when current_cpu == target_cpu && current_os == target_os: https://codereview.chromium.org/1901353002/

This also needs a nacl side change: https://codereview.chromium.org/1902683004/
Blocking: 605154
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a1ce21a7cc8c9301173b595764b6545785804e8

commit 3a1ce21a7cc8c9301173b595764b6545785804e8
Author: hashimoto <hashimoto@chromium.org>
Date: Thu Apr 21 03:03:03 2016

Use target_sysroot when building for target OS on target CPU

nacl's bootstrap toolchain should also use target_sysroot.

Nacl side change: https://codereview.chromium.org/1902683004/

BUG= 604971 
TEST=Remove build/linux/debian_wheezy_arm-sysroot, enter chrome-sdk with an arm board, gn gen --args=$GN_ARGS out/gn && ninja -C out/gn

Review URL: https://codereview.chromium.org/1901353002

Cr-Commit-Position: refs/heads/master@{#388668}

[modify] https://crrev.com/3a1ce21a7cc8c9301173b595764b6545785804e8/build/config/sysroot.gni

Both changes landed.
Waiting for nacl-deps-roller to roll native_client.
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ce787a6dd2aeafb0801145a66d31babdd3a0297

commit 9ce787a6dd2aeafb0801145a66d31babdd3a0297
Author: nacl-deps-roller <nacl-deps-roller@chromium.org>
Date: Fri Apr 22 16:02:38 2016

Roll src/native_client/ f640889e8..da301fb59 (8 commits).

https://chromium.googlesource.com/native_client/src/native_client.git/+log/f640889e8f9f..da301fb59c80

$ git log f640889e8..da301fb59 --date=short --no-merges --format='%ad %ae %s'
2016-04-22 stichnot Update revision for PNaCl
2016-04-21 stichnot PNaCl: Update subzero revision in pnacl/COMPONENT_REVISIONS
2016-04-20 anmittal Alphabetize and clean top-level gn BUILD files
2016-04-20 hashimoto Set bootstrap toolchain's toolchain_os to target_os
2016-04-20 smklein PNaCl Dynamic Linking: Loader Exporting / Importing TLS Variables.
2016-04-20 smklein PNaCl: Update llvm revision in pnacl/COMPONENT_REVISIONS
2016-04-19 phosek PNaCl: Update binutils revision in pnacl/COMPONENT_REVISIONS
2016-04-19 phosek Allow multiple symbol definitions in dynamic linking tests

BUG= 604971 

CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_dbg_32_ng,linux_nacl_sdk_build
TBR=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/1911393002

Cr-Commit-Position: refs/heads/master@{#389125}

[modify] https://crrev.com/9ce787a6dd2aeafb0801145a66d31babdd3a0297/DEPS

Status: Fixed (was: Started)
Bulk verified
Status: Verified (was: Fixed)
bulk verified

Sign in to add a comment