chromeos-chrome build failing due to incorrect CHROME_ROOT path

744 views
Skip to first unread message

Daniel Erat

unread,
Feb 23, 2013, 12:23:56 PM2/23/13
to Chromium OS dev, rc...@chromium.org
I started having trouble with my chromeos-chrome builds starting a few days ago.  It looks like the ebuild is looking in the wrong place (/home/root/chrome_root) for the Chrome source.  I entered the chroot with "cros_sdk --chrome_root=$HOME/chrome" and set CHROME_ORIGIN=LOCAL_SOURCE before running build_packages.  (I'm running it using my regular user account rather than as root.)

Looking at the ebuild, the src_unpack() step uses the output of the 'whoami' to construct a /home/<user>/chrome_root path.  I see the following comment later in the function:
    # Prepare and set CHROME_ROOT based on CHROME_ORIGIN.
    # CHROME_ROOT is the location where the source code is used for compilation.
    # If we're in SERVER_SOURCE mode, CHROME_ROOT is CHROME_DISTDIR. In LOCAL_SOURCE
    # mode, this directory may be set manually to any directory. It may be mounted
    # into the chroot, so it is not safe to use cp -al for these files.
    # These are set here because $(whoami) returns the proper user here,
    # but 'root' at the root level of the file
Is there any chance that something has changed here such that the last sentence is no longer true?  I've hacked around it in the meantime by hardcoding my username in place of the output from 'whoami'.
=== Start output for job chromeos-chrome-9999 (0m5.6s) ===
chromeos-chrome-9999: >>> Verifying ebuild manifests
chromeos-chrome-9999: >>> Emerging (1 of 1) chromeos-base/chromeos-chrome-9999 from chromiumos for /build/lumpy/
chromeos-chrome-9999:  * Running stacked hooks for pre_pkg_setup
chromeos-chrome-9999:  *    sysroot_build_bin_dir ...
chromeos-chrome-9999:  [ ok ]
chromeos-chrome-9999:  * Running stacked hooks for pre_src_unpack
chromeos-chrome-9999:  *    python_multilib_setup ...
chromeos-chrome-9999:  [ ok ]
chromeos-chrome-9999: >>> Unpacking source...
chromeos-chrome-9999:  * CHROME_ORIGIN VALUE is LOCAL_SOURCE
chromeos-chrome-9999:  * ERROR: chromeos-base/chromeos-chrome-9999 failed (unpack phase):
chromeos-chrome-9999:  *   /home/root/chrome_root does not contain a valid chromium checkout!
chromeos-chrome-9999:  * 
chromeos-chrome-9999:  * Call stack:
chromeos-chrome-9999:  *     ebuild.sh, line  56:  Called src_unpack
chromeos-chrome-9999:  *   environment, line 3815:  Called die
chromeos-chrome-9999:  * The specific snippet of code:
chromeos-chrome-9999:  *                   die "${CHROME_ROOT} does not contain a valid chromium checkout!";
chromeos-chrome-9999:  * 
chromeos-chrome-9999:  * If you need support, post the output of 'emerge --info =chromeos-base/chromeos-chrome-9999',
chromeos-chrome-9999:  * the complete build log and the output of 'emerge -pqv =chromeos-base/chromeos-chrome-9999'.
chromeos-chrome-9999:  * This ebuild used the following eclasses from overlays:
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/autotest-deponly.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/autotest.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/binutils-funcs.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/toolchain-funcs.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/git-2.eclass
chromeos-chrome-9999:  * This ebuild is from an overlay named 'chromiumos': '/mnt/host/source/src/third_party/chromiumos-overlay/'
chromeos-chrome-9999:  * The complete build log is located at '/build/lumpy/tmp/portage/logs/chromeos-base:chromeos-chrome-9999:20130223-170536.log'.
chromeos-chrome-9999:  * The ebuild environment file is located at '/build/lumpy/tmp/portage/chromeos-base/chromeos-chrome-9999/temp/environment'.
chromeos-chrome-9999:  * S: '/build/lumpy/tmp/portage/chromeos-base/chromeos-chrome-9999/work/chromeos-chrome-9999'
chromeos-chrome-9999: >>> Failed to emerge chromeos-base/chromeos-chrome-9999 for /build/lumpy/, Log file:
chromeos-chrome-9999: >>>  '/build/lumpy/tmp/portage/logs/chromeos-base:chromeos-chrome-9999:20130223-170536.log'
chromeos-chrome-9999:
chromeos-chrome-9999:  * Messages for package chromeos-base/chromeos-chrome-9999 merged to /build/lumpy/:
chromeos-chrome-9999:
chromeos-chrome-9999:  * CHROME_ORIGIN VALUE is LOCAL_SOURCE
chromeos-chrome-9999:  * ERROR: chromeos-base/chromeos-chrome-9999 failed (unpack phase):
chromeos-chrome-9999:  *   /home/root/chrome_root does not contain a valid chromium checkout!
chromeos-chrome-9999:  *
chromeos-chrome-9999:  * Call stack:
chromeos-chrome-9999:  *     ebuild.sh, line  56:  Called src_unpack
chromeos-chrome-9999:  *   environment, line 3815:  Called die
chromeos-chrome-9999:  * The specific snippet of code:
chromeos-chrome-9999:  *                   die "${CHROME_ROOT} does not contain a valid chromium checkout!";
chromeos-chrome-9999:  *
chromeos-chrome-9999:  * If you need support, post the output of 'emerge --info =chromeos-base/chromeos-chrome-9999',
chromeos-chrome-9999:  * the complete build log and the output of 'emerge -pqv =chromeos-base/chromeos-chrome-9999'.
chromeos-chrome-9999:  * This ebuild used the following eclasses from overlays:
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/autotest-deponly.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/autotest.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/binutils-funcs.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/toolchain-funcs.eclass
chromeos-chrome-9999:  *   /mnt/host/source/src/third_party/chromiumos-overlay/eclass/git-2.eclass
chromeos-chrome-9999:  * This ebuild is from an overlay named 'chromiumos': '/mnt/host/source/src/third_party/chromiumos-overlay/'
chromeos-chrome-9999:  * The complete build log is located at '/build/lumpy/tmp/portage/logs/chromeos-base:chromeos-chrome-9999:20130223-170536.log'.
chromeos-chrome-9999:  * The ebuild environment file is located at '/build/lumpy/tmp/portage/chromeos-base/chromeos-chrome-9999/temp/environment'.
chromeos-chrome-9999:  * S: '/build/lumpy/tmp/portage/chromeos-base/chromeos-chrome-9999/work/chromeos-chrome-9999'
=== Complete: job chromeos-chrome-9999 (0m5.6s) ===
Failed chromeos-base/chromeos-chrome-9999 (in 0m5.6s), retrying later.

Daniel Erat

unread,
Feb 23, 2013, 2:56:56 PM2/23/13
to Chromium OS dev, rc...@chromium.org
It's unclear to me if it's related, but even with chromeos-chrome hacked up to avoid the above error, build_image fails.  This is after recreating my board; before doing so, I was seeing similar errors about no ebuilds satisfying chromeos-base/shill-test-scripts (despite the fact that "emerge-lumpy shill-test-scripts" succeeds).

Setting up symlinks for /usr/local for /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/stateful/dev_image
INFO    : Binding directories from stateful partition onto the rootfs
INFO    : Binding directories from OEM partition onto the rootfs
pbzip2: *WARNING: Trailing garbage after EOF ignored!
INFO    : Copying /usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google/libgcc_s.so symlink and file to /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs//usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google/.
INFO    : Adding /usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google to LDPATH in file /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs/etc/env.d/05gcc
INFO    : Copying /usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google/libstdc++.so symlink and file to /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs//usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google/.
INFO    : Adding /usr/lib/gcc/x86_64-cros-linux-gnu/4.7.x-google to LDPATH in file /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs/etc/env.d/05gcc
>>> Regenerating /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs/etc/ld.so.cache...
Starting fast-emerge.
 Building package chromeos-base/chromeos on lumpy
Calculating deps...

emerge: there are no ebuilds to satisfy "chromeos-base/chromeos" for /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1/rootfs/.

emerge: searching for similar names...
emerge: Maybe you meant any of these: chromeos-base/libchromeos, chromeos-base/chromeos-ec, chromeos-base/cromo?
Cleaning up mounts
An error occurred in your build so your latest output directory is invalid.
Would you like to delete the output directory (y/N)? y
Deleted /mnt/host/source/src/build/images/lumpy/R27-3749.0.2013_02_23_1041-a1

Mike Frysinger

unread,
Feb 24, 2013, 9:51:08 PM2/24/13
to Daniel Erat, Chromium OS dev, Ryan Cui
what does `portageq-$BOARD envvar FEATURES` show ? it should have
userfetch/userpriv in there in which case src_unpack should be running
as non-root (e.g. you).
-mike

On Sat, Feb 23, 2013 at 9:23 AM, Daniel Erat <de...@chromium.org> wrote:
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>
>
>

Daniel Erat

unread,
Feb 25, 2013, 12:58:09 PM2/25/13
to Mike Frysinger, Chromium OS dev, Ryan Cui
I see userfetch but not userpriv:

% portageq-lumpy envvar FEATURES
assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch

Mike Frysinger

unread,
Feb 25, 2013, 1:15:44 PM2/25/13
to Daniel Erat, Chromium OS dev, Ryan Cui
chromiumos-overlay/chromeos/config/make.conf.common-target should be
up-to-date and be adding userpriv to FEATURES

/build/$BOARD/make.conf.common should be a symlink to the
afore-mentioned make.conf.common-target

/build/$BOARD/make.conf should include a "source make.conf.common" line
-mike

Daniel Erat

unread,
Feb 25, 2013, 1:23:31 PM2/25/13
to Mike Frysinger, Chromium OS dev, Ryan Cui
Hmm.

chroot:scripts% ls -la /build/lumpy/etc/make.conf.common
lrwxrwxrwx 1 root root 69 Feb 23 10:31 /build/lumpy/etc/make.conf.common -> /usr/local/portage/chromiumos/chromeos/config/make.conf.common-target
chroot:scripts% grep -A 3 FEATURES /build/lumpy/etc/make.conf.common
FEATURES="allow-missing-manifests buildpkg clean-logs -collision-protect
          -ebuild-locks force-mirror nodoc noinfo noman parallel-install
          sandbox splitdebug -strict userfetch userpriv usersandbox
          -unknown-features-warn"
chroot:scripts% grep make.conf.common /build/lumpy/etc/make.conf
source make.conf.common

Mike Frysinger

unread,
Feb 25, 2013, 1:37:44 PM2/25/13
to Daniel Erat, Chromium OS dev, Ryan Cui
something might be clobbering your FEATURES. you can try grepping
/build/lumpy/etc/ files. i just did a `setup_board` for lumpy and my
FEATURES has userpriv in it on ToT.
-mike

Daniel Erat

unread,
Feb 25, 2013, 2:21:59 PM2/25/13
to Mike Frysinger, Chromium OS dev, Ryan Cui
Thanks, that was it -- make.conf.user was blowing away FEATURES.  After correcting this and recreating /board/lumpy, the dependency problem described in the second message in this thread was also resolved.

Mike Frysinger

unread,
Feb 25, 2013, 2:25:06 PM2/25/13
to Daniel Erat, Chromium OS dev, Ryan Cui
sadly, this is both by design, and not something we can easily detect
even if we wanted

maybe we could install a sample make.conf.user if one doesn't already
exist with relevant warnings.
# Make sure to append variables unless you really want to clobber all
# existing settings. e.g. You most likely want:
# FEATURES="${FEATURES} ..."
# USE="${USE} foo"
# and *not*:
# USE="foo"
-mike

Daniel Erat

unread,
Feb 25, 2013, 5:16:10 PM2/25/13
to Mike Frysinger, Chromium OS dev, Ryan Cui
This sounds like a good approach to me.  I'm not sure where my make.conf.user file came from, but assuming that it was added manually, a comment like that would've kept me from breaking things.

Mike Frysinger

unread,
Feb 25, 2013, 9:03:11 PM2/25/13
to Daniel Erat, Ryan Cui, chromium-os-dev

yes, you most likely were the one who made that change as the file is installed empty by design.  it's just for users to edit.

I'll see about installing one with comments.
-mike

Mike Frysinger

unread,
Feb 26, 2013, 2:37:35 AM2/26/13
to Daniel Erat, Ryan Cui, chromium-os-dev
yeah, setup_board is the script that "installs" that file and does so with `touch`

CL to add comments:
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages