New issue
Advanced search Search tips

Issue 891164 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Yesterday
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

gn gen gets error if symbol_level=0 with go/simplechrome --internal

Project Member Reported by hiroh@chromium.org, Oct 2

Issue description

go/simplechrome is to build Chrome for Chrome OS on gLinux.

When I tried to specify "symbol_level=0", I run into the error as follows.
I think this might be related to crrev.com/c/1212347?
Assign to agrieve@, who knows better.

$ cros chrome-sdk --board=eve --internal
(sdk eve R71-11110.0.0) hiroh@hiroh ~/chrome/src $ gn gen out_$SDK_BOARD/Release --args="$GN_ARGS symbol_level=0"
ERROR at //tools/grit/grit_rule.gni:98:1: Assertion failed.
assert(
^-----
resource whitelist generation only works on non-component android builds with debug info enabled.
See //tools/grit/grit_rule.gni:99:5: 
    !enable_resource_whitelist_generation ||
    ^---------------------------------------
This is where it was set.
See //build/config/android/rules.gni:190:3: whence it was imported.
  import("//tools/grit/grit_rule.gni")
  ^----------------------------------
See //testing/test.gni:11:3: whence it was imported.
  import("//build/config/android/rules.gni")
  ^----------------------------------------
See //mojo/core/BUILD.gn:6:1: whence it was imported.
import("//testing/test.gni")
^--------------------------
See //mojo/core/BUILD.gn:218:9: which caused the file to be included.
        ":shared_library(//build/toolchain/android:${android32_toolchain})",

 
Are you setting any other GN args?
Cc: hiroh@chromium.org
$GN_ARGS in go/simplechrome is automatically generated following board name and "internal" also affects it.
This dropped off my radar for a while.

Just tried to repro this without success though. Is there a way to repro it without having to do a full chrome os checkout?
go/simplechrome downloads the necessary tools or headers without chrome os directory, IIRC.
I tried and got the same error today.
Status: Assigned (was: Untriaged)
Here's what I get:

$ cros chrome-sdk --board=eve --internal
22:09:36: WARNING: app-emulation/qemu not found.
22:09:36: WARNING: sys-firmware/seabios not found.
22:09:36: WARNING: Could not create Seabios firmware links.
(sdk eve R73-11361.0.0) agrieve@agrieve-z840 /usr/local/google/code/clankium1/src $ gn gen out_$SDK_BOARD/Release --args="$GN_ARGS symbol_level=0"
ERROR at //chromeos/services/assistant/BUILD.gn:87:7: Can't load input file.
      "//libassistant/shared/internal_api/c:api_wrappers_entrypoint",
      ^-------------------------------------------------------------
Unable to load:
  /usr/local/google/code/clankium1/src/libassistant/shared/internal_api/c/BUILD.gn
I also checked in the secondary tree for:
  /usr/local/google/code/clankium1/src/build/secondary/libassistant/shared/internal_api/c/BUILD.gn


Probably I need a chrome os checkout.

Can you try a guess at a fix for me before I bother?

Change: https://cs.chromium.org/chromium/src/build/toolchain/gcc_toolchain.gni?rcl=1c82154972cfd49eb35346391b4763bc4bdf4e36&l=26
to have have a: && target_os == "android"
You may have to add target_os = ["chromeos"] into .gclient and execute gclient sync? https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md#getting-started

I tried your suggestion #5. `gen out_$SDK_BOARD/Release --args="$GN_ARGS symbol_level=0"` doesn't complain anything.

Project Member

Comment 7 by bugdroid1@chromium.org, Dec 18

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

commit e3bbb54556d1352db69f3aae9ccc354b6ef983d2
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Dec 18 15:00:41 2018

Disable enable_resource_whitelist_generation for Chrome OS

It was already meant to be disabled for non-Android, but chrome_os has
parts that build with is_android=true, so check target_os instead.

This fixes a GN assert when building without symbols.

Bug:  891164 
Change-Id: I02f7dcede5726c3b5f5ef2a63814ae39fd83c3dd
Reviewed-on: https://chromium-review.googlesource.com/c/1381695
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617492}
[modify] https://crrev.com/e3bbb54556d1352db69f3aae9ccc354b6ef983d2/build/toolchain/gcc_toolchain.gni

Comment 8 by agrieve@google.com, Yesterday (40 hours ago)

Status: Fixed (was: Assigned)

Sign in to add a comment