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

Issue 833678 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 892963



Sign in to add a comment

Cannot build Chrome locally inside chroot

Project Member Reported by manojgupta@chromium.org, Apr 17 2018

Issue description

My local chroot Chrome builds are failing in syncing chrome sources (I did
a fresh repo sync this morning).

$ USE="chrome_internal" emerge-peppy chromeos-chrome

>>> Unpacking source...
  * CHROME_ORIGIN VALUE is SERVER_SOURCE
  * Using CHROME_VERSION = 68.0.3397.0
  * /mnt/host/source/chromite/bin/sync_chrome --internal --tag=68.0.3397.0
--reset --gclient=/home/manojgupta/depot_tools/gclient
/var/cache/chromeos-cache/distfiles/target/chrome-src-internal
14:16:10: INFO: RunCommand: /home/manojgupta/depot_tools/gclient revert
--nohooks in /var/cache/chromeos-cache/distfiles/target/chrome-src-internal
Syncing projects: 100% (181/181), done.

Traceback (most recent call last):
   File "/home/manojgupta/depot_tools/gclient.py", line 3184, in <module>
     sys.exit(main(sys.argv[1:]))
   File "/home/manojgupta/depot_tools/gclient.py", line 3170, in main
     return dispatcher.execute(OptionParser(), argv)
   File "/mnt/host/depot_tools/subcommand.py", line 252, in execute
     return command(parser, args[1:])
   File "/home/manojgupta/depot_tools/gclient.py", line 2887, in CMDrevert
     return client.RunOnDeps('revert', args)
   File "/home/manojgupta/depot_tools/gclient.py", line 1715, in RunOnDeps
     self._cipd_root.run(command)
   File "/mnt/host/depot_tools/gclient_scm.py", line 1355, in run
     self.ensure()
   File "/mnt/host/depot_tools/gclient_scm.py", line 1348, in ensure
     gclient_utils.CheckCallAndFilterAndHeader(cmd)
   File "/mnt/host/depot_tools/gclient_utils.py", line 314, in
CheckCallAndFilterAndHeader
     return CheckCallAndFilter(args, **kwargs)
   File "/mnt/host/depot_tools/gclient_utils.py", line 525, in
CheckCallAndFilter
     **kwargs)
   File "/mnt/host/depot_tools/subprocess2.py", line 262, in __init__
     % (str(e), kwargs.get('cwd'), args[0]))
OSError: Execution failed with error: [Errno 2] No such file or directory.
Check that None or cipd exist and have execution permission.

Note: I am not the only one facing this problem. Verified that cmtice@ and our nightly local builder also have same problem.
 
Cc: xixuan@chromium.org wzang@chromium.org
Summary: Cannot build Chrome locally with USE="chrome_internal" (was: Cannot build Chrome locally with USE="chrome-internal")

Comment 3 by xixuan@chromium.org, Apr 17 2018

Cc: bcwh...@chromium.org sergeybe...@chromium.org jbudorick@chromium.org
Looks like sth related to CIPD. + some authors who recently work on /chrome/depot_tools.
Could you link to an example build? (please find it in ci.chromium.org, so the link is permanent). Thanks!
This issue is for *local* builds in Chrome OS chroots, not in builders. 
Cc: dgarr...@chromium.org
Note: I suspect that the problem started after a new version of depot_tools was pushed in Chrome OS (https://chromium-review.googlesource.com/c/chromiumos/manifest/+/1006061). 
Which was pushed because ChromeOS couldn't always sync Chrome without it. Sigh.
The referenced pin bump will affect checkouts inside the chroot, but won't affect developers.

Has anyone affected by this tried doing a "git pull" in the depot_tools in the path? 
> The referenced pin bump will affect checkouts inside the chroot, but won't affect developers.

This does not affect SimpleChrome. But I think it does impact local Chrome builds inside *chroot*.



In answer to #8, yes I have done a git pull in my depot_tools directory
Cc: -bcwh...@chromium.org
I tried remove USE=chrome_internal and the problem didn't go away. It probably has nothing to do with USE=chrome_internal, as indicated in the title.
What's in your $PATH? What revision is depot_tools at both within and outside the chroot?
Summary: Cannot build Chrome locally inside chroot (was: Cannot build Chrome locally with USE="chrome_internal")
Updated title.

depot_tools inside the chroot is at 5888d6f676722fdac3f65e673c0232667309296c.
Author: Eric Boren <borenet@google.com>
Date:   Mon Apr 9 13:20:39 2018 -0400

    roll-dep: Run gclient.py rather than gclient
    
    gclient calls into update_depot_tools, where gclient.py does not

The version outside the chroot (used for invoking repo sync) is at a newer revision adc953f927bda7b8ce944738be962cd6b1700bf9 but I don't think it is used when building Chrome inside the chroot. Setting it to 5888d6f676722fdac3f65e673c0232667309296c  didn't help.

PATH is set to following (Did an echo in the ebuild to dump $PATH):
/usr/lib/portage/python2.7/ebuild-helpers/xattr:/usr/lib/portage/python2.7/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/bin:/build/betty/build/bin

Interestingly, running the command outside the ebuild environment succeeded:

$ /mnt/host/source/chromite/bin/sync_chrome --internal --tag=68.0.3397.0 --reset --ignore_locks /var/cache/chromeos-cache/distfiles/target/chrome-src-internal

This worked.

But same command when ran inside the ebuild environment fails.

Note that builders use a SyncChrome stage and therefore do not sync chrome inside the ebuild:

case "${CHROME_ORIGIN}" in
    (SERVER_SOURCE)
        elog "Using CHROME_VERSION = ${CHROME_VERSION}"
        if [[ ${WHOAMI} == "chrome-bot" ]]; then
            # TODO: Should add a sanity check that the version checked out is
            # what we actually want.  Not sure how to do that though.
            elog "Skipping syncing as cbuildbot ran SyncChrome for us."
        else
            unpack_chrome
        fi

I can repro this as:

# Make PATH same as ebuild
export PATH=/usr/lib/portage/python2.7/ebuild-helpers/xattr:/usr/lib/portage/python2.7/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/bin:/build/betty/build/bin

$ /mnt/host/source/chromite/bin/sync_chrome --internal --tag=68.0.3397.0 --reset --gclient=/home/manojgupta/depot_tools/gclient /var/cache/chromeos-cache/distfiles/target/chrome-src-internal

One possible problem is there are two different gclient.py files. One inside chromite/lib and other in depot_tools. Possibly, there are other files with same names and maybe this could be causing problems?
Adding chromite and depot-tools to PATH in ebuild seems to fix the problem. https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1015204 
The ebuild recreates much of the environment, including the PATH, but I thought it kept those.
Oh.... weren't there changes recently in chrome build to use vpython more aggressively? Which comes from depot_tools?

Comment 20 by gu...@chromium.org, Apr 18 2018

Owner: manojgupta@chromium.org
Status: Assigned (was: Untriaged)
Hi manojgupta@, since you have worked on a fix of this. Can you own this bug? Feel free to reassign back if you don't like to own it.
Cc: -sergeybe...@chromium.org
Project Member

Comment 22 by bugdroid1@chromium.org, Apr 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7638e4b7a625c64e7d60bd50393f15eaa34adc86

commit 7638e4b7a625c64e7d60bd50393f15eaa34adc86
Author: Manoj Gupta <manojgupta@google.com>
Date: Thu Apr 19 00:35:37 2018

chromeos-chrome: Fix local chroot builds.

Ensure that chromite and depot_tools are in PATH.
This fixes error when syncing chrome sources.

BUG= chromium:833678 
TEST=USE="chrome_internal" emerge-{betty,peppy} chromeos-chrome works.

Change-Id: I66c77ffebb47866f123729ddb45dc5fb2fe6a11b
Reviewed-on: https://chromium-review.googlesource.com/1015204
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/7638e4b7a625c64e7d60bd50393f15eaa34adc86/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild

Status: Verified (was: Assigned)
Blocking: 892963
Project Member

Comment 25 by bugdroid1@chromium.org, Oct 9

Labels: merge-merged-release-R67-10575.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/00e554731a453598c5623b1d03e1c7a442cfa3fe

commit 00e554731a453598c5623b1d03e1c7a442cfa3fe
Author: Manoj Gupta <manojgupta@google.com>
Date: Tue Oct 09 05:48:32 2018

chromeos-chrome: Fix local chroot builds.

Ensure that chromite and depot_tools are in PATH.
This fixes error when syncing chrome sources.

BUG= chromium:833678 
TEST=USE="chrome_internal" emerge-{betty,peppy} chromeos-chrome works.

Change-Id: I66c77ffebb47866f123729ddb45dc5fb2fe6a11b
Reviewed-on: https://chromium-review.googlesource.com/1015204
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
(cherry picked from commit 7638e4b7a625c64e7d60bd50393f15eaa34adc86)
Reviewed-on: https://chromium-review.googlesource.com/c/1269640
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/00e554731a453598c5623b1d03e1c7a442cfa3fe/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild

Cc: gwendal@chromium.org manojgupta@chromium.org
 Issue 892963  has been merged into this issue.
Project Member

Comment 27 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5607da4712b97da437d38c951ed9c57e73337a81

commit 5607da4712b97da437d38c951ed9c57e73337a81
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Oct 11 06:55:54 2018

Manually marking chromeos-chrome ebuild as stable

Updated ebuild from 9999 after changes from
https://chromium-review.googlesource.com/c/1269640

BUG= chromium:833678 , chromium:892963 
TEST=build_packages and build_image works. Image install on asuka.

Change-Id: I20efa3179d21f4df8dbcc5852bf153ccab271412
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1274174
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/5607da4712b97da437d38c951ed9c57e73337a81/chromeos-base/chromeos-chrome/chromeos-chrome-67.0.3396.127_rc-r2.ebuild

Sign in to add a comment