New issue
Advanced search Search tips

Issue 610995 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 609623



Sign in to add a comment

deploy_chrome does not deploy necessary libraries built by GN if is_component=true

Project Member Reported by hashimoto@chromium.org, May 11 2016

Issue description

Recently, chromeos-chrome ebuild started building chrome with is_component=true.
(https://chromium-review.googlesource.com/#/c/340470/)

When using simple chrome with GYP, deploy_chrome also deploys necessary libraries like libbase.so.
OTOH when deploying chrome built with GN, it doesn't.

I'm not sure what is the difference between them, but we should fix deploy_chrome to deploy libraries like libbase.so built by GN too, or stop specifying is_component=true.
 
Blockedon: 609623
Owner: steve...@chromium.org
Status: Started (was: Available)
I've been looking into a similar issue with chroot builds (where the deploy_chrome.py command actually fails):  issue 609623 . I didn't think about the fact that this would also affect simple chrome.

The problem is that GN is placing the .so files at the top level instead of under a lib/ directory.

I am looking into providing an argument to deploy_chrome.py that will modify where to look for these, but it has been slow going so far.

If it takes long to fix deploy_chrome, one possible workaround is filtering is_component=true in cros_chrome_sdk.py when launching simple chrome environment.
Project Member

Comment 3 by bugdroid1@chromium.org, May 13 2016

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

commit 6060046552457d94ad426e98296500eb7c0a5805
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Thu May 12 17:40:20 2016

Simple Chrome: Get staging (use) flags from the environment

This also sets USE='gn' when GYP_CHROMIUM_NO_ACTION=1 for
convenience.

BUG= chromium:610995 
TEST=Run deploy_chrome in simple chrome with GN + component build

Change-Id: I4721cdd18a2864c49f478fbe2a7545956dac22d9
Reviewed-on: https://chromium-review.googlesource.com/344422
Commit-Ready: Steven Bennetts <stevenjb@chromium.org>
Tested-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>

[modify] https://crrev.com/6060046552457d94ad426e98296500eb7c0a5805/cli/cros/cros_chrome_sdk.py
[modify] https://crrev.com/6060046552457d94ad426e98296500eb7c0a5805/scripts/deploy_chrome.py

Requiring GYP_CHROMIUM_NO_ACTION explicitly set looks a bit inconvenient.
Can't we instead let deploy_chrome check the contents of the build directory (e.g. existence of args.gn) to automatically know if the build was made with GN or GYP?
That's not a guarantee either. I've been switching back and forth and sometimes end up with an args.gn in a directory that got built with GN. Arguably that is less likely, but I slightly prefer setting (or unsetting) USE='gn' for my back-and-forth use case. Soon this will all be moot and everything will be GN...

Seems chromeos-chrome ebuild has stopped specifying is_component=true in https://chromium-review.googlesource.com/#/c/342471/.
The bad news is that the CL didn't add the necessary GN arg.
Blocking: 433082 621681
Labels: M-53
Is this fixed, or is there more work to do here? Does this need to block shipping a GN build?
This doesn't block GN migration as chromeos-chrome ebuild is no longer specifying is_component.
Blocking: -621681
Labels: -M-53
Blocking: -433082
Labels: Hotlist-CrOS-Gardener
Status: Available (was: Started)
Labels: -Proj-GN-Migration
Status: Started (was: Available)
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 21 2016

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

commit 94f9aa1cae72ad39e393612cd4554fe51669a70c
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Wed Jul 13 18:16:41 2016

Always set USE=gn for SimpleChrome

Soon we should eliminate GYP support entirely, but for now we need
to make USE='gn' the default since we no longer rely on
GYP_CHROMIUM_NO_ACTION=0 for 'gclient runhooks'.

BUG= chromium:610995 
TEST=Run deploy_chrome in simple chrome

Change-Id: I78aa49d5758f990e6f8240a79574de5947c9cb37
Reviewed-on: https://chromium-review.googlesource.com/360212
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Tested-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>

[modify] https://crrev.com/94f9aa1cae72ad39e393612cd4554fe51669a70c/cli/cros/cros_chrome_sdk.py

Status: Fixed (was: Started)
Labels: -Pri-1 Pri-2
Status: Assigned (was: Fixed)
Actually, I'm not 100% certain this is fixed, I need to dest a deploy with a component build (but it is low priority now sicne we do not use component builds in simple chrome by default).

Status: Started (was: Assigned)
This still fails with the following repo:

$ cros chrome-sdk --board=samus --internal
(build chrome)
(exit)
$ cros chrome-sdk --board=samus --component
(build chrome)
(deploy chrome: fails)

The reason deploy_chrome fails is that libwidevine*.so still exists in out_${SDK_BOARD}/Release/. When deploy_chrome tries to copy and strip *.so, it fails on libwidevine*.so.

The workaround is to remove out_${SDK_BOARD}/Release/libwidevine*.so when switching from --internal to --component.

I will investigate skipping libwidevine*.so in the *.so rule by modifying how blacklist= works.

Note: --internal and --component are incompatible by designl /BUILD.gn will assert at line 39 if the combination is attempted.

Project Member

Comment 18 by bugdroid1@chromium.org, Jan 4 2017

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

commit 939cd063f9d284da9d196bec81fe0e6bd83a7968
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Wed Dec 28 19:24:29 2016

deploy_chrome: Strip libwidevinecdmadapter.so

This CL also blacklists libwidevine*.so from the *.so Path
entry so that they do not get considered twice.

BUG=chromium:612345, chromium:610995 
TEST=Run deploy_chrome from Simple Chrome, size of
/opt/google/chrome/libwidevinecdmadapter.so should be ~130KB
instead of ~2MB. See issue chromium:612345 for more info.

Change-Id: I8687fec2abc40a0fe6e3dfab4bcdd1e307c9ad68
Reviewed-on: https://chromium-review.googlesource.com/424186
Commit-Ready: Steven Bennetts <stevenjb@chromium.org>
Tested-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/939cd063f9d284da9d196bec81fe0e6bd83a7968/lib/chrome_util.py

Labels: M-57
Status: Fixed (was: Started)
Labels: VerifyIn-61

Comment 21 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment