build_package minilayout fails

134 views
Skip to first unread message

Arpad Jordan

unread,
Jan 21, 2022, 12:23:21 PM1/21/22
to Chromium OS Discussion
To build ToT from minilayout I follow these steps:

(outside)
mkdir chromiumos
cd ~/chromiumos
repo sync -j4
cros_sdk
(inside)
./set_shared_user_password.sh
./build_packages --board=amd64-generic --nowithdebug

I face this error:
...
Failed to emerge chromeos-base/hps-firmware-0.1.0-r222 for /build/amd64-generic/
...
hps-firmware-0.1.0-r222:  * Could not find "/mnt/host/source/src/platform/hps-firmware2". 

Any idea how to resolve this?

Mike Frysinger

unread,
Jan 21, 2022, 1:47:47 PM1/21/22
to Arpad Jordan, Chromium OS Discussion
please post the full error message.  you've deleted a lot of context from the log.

you can prob get the specific failure with:
emerge-amd64-generic hps-firmware
-mike

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss

Arpad Jordan

unread,
Jan 22, 2022, 7:18:41 AM1/22/22
to Chromium OS Discussion, Mike Frysinger, Chromium OS Discussion, Arpad Jordan

Thank you for your quick response! Please see below more logs. Please note that build is successful without minilayout option.

>>> 11:31:01 Failed to emerge chromeos-base/hps-firmware-0.1.0-r223 for /build/amd64-generic/, Log file:
>>> 11:31:01   /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r223:20220122-113052.log
>>> 11:31:01 === Start output for job hps-firmware-0.1.0-r223 ===
hps-firmware-0.1.0-r223:  * Package:    chromeos-base/hps-firmware-0.1.0-r2237.09, 7.17
hps-firmware-0.1.0-r223:  * Repository: chromiumos
hps-firmware-0.1.0-r223:  * Maintainer: chromiu...@chromium.org
hps-firmware-0.1.0-r223:  * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux lto userland_GNU
hps-firmware-0.1.0-r223:  * FEATURES:   network-sandbox sandbox splitdebug userpriv usersandbox
hps-firmware-0.1.0-r223:  * Running stacked hooks for pre_pkg_setup
hps-firmware-0.1.0-r223:  *    sysroot_build_bin_dir ...
hps-firmware-0.1.0-r223:  [ ok ]
hps-firmware-0.1.0-r223:  * Running stacked hooks for post_pkg_setup
hps-firmware-0.1.0-r223:  *    python_eclass_hack ...
hps-firmware-0.1.0-r223:  [ ok ]
hps-firmware-0.1.0-r223: 11:30:57 >>> Unpacking source...
hps-firmware-0.1.0-r223:  * Could not find "/mnt/host/source/src/platform/hps-firmware2".
hps-firmware-0.1.0-r223:  * The CROS_WORKON_LOCALNAME for this ebuild should be updated
hps-firmware-0.1.0-r223:  * to be relative to "/mnt/host/source/src".
hps-firmware-0.1.0-r223:  * Using local source dir(s): /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
hps-firmware-0.1.0-r223:  * cros_workon --board=amd64-generic start crash-reporter
hps-firmware-0.1.0-r223:  * repo sync
hps-firmware-0.1.0-r223:  * path: /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * destdir: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/work/hps-firmware-0.1.0
hps-firmware-0.1.0-r223:  * Copying sources from /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * Could not find "/mnt/host/source/src/platform/hps-firmware2".
hps-firmware-0.1.0-r223:  * The CROS_WORKON_LOCALNAME for this ebuild should be updated
hps-firmware-0.1.0-r223:  * to be relative to "/mnt/host/source/src".
hps-firmware-0.1.0-r223:  * Using local source dir(s): /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
hps-firmware-0.1.0-r223:  * cros_workon --board=amd64-generic start crash-reporter
hps-firmware-0.1.0-r223:  * repo sync
hps-firmware-0.1.0-r223:  * path: /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * destdir: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/work/hps-firmware-0.1.0
hps-firmware-0.1.0-r223:  * Copying sources from /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223: 11:30:58 >>> Source unpacked in /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/work
hps-firmware-0.1.0-r223:  * Running stacked hooks for post_src_unpack
hps-firmware-0.1.0-r223:  *    asan_init ...
hps-firmware-0.1.0-r223:  [ ok ]
hps-firmware-0.1.0-r223:  * ERROR: chromeos-base/hps-firmware-0.1.0-r223::chromiumos failed (prepare phase):
hps-firmware-0.1.0-r223:  *   The source directory '/build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/work/hps-firmware-0.1.0/hps-firmware' doesn't exist
hps-firmware-0.1.0-r223:  *
hps-firmware-0.1.0-r223:  * Call stack:
hps-firmware-0.1.0-r223:  *               ebuild.sh, line  809:  Called __ebuild_main 'prepare'
hps-firmware-0.1.0-r223:  *      phase-functions.sh, line 1059:  Called __dyn_prepare
hps-firmware-0.1.0-r223:  *      phase-functions.sh, line  385:  Called die
hps-firmware-0.1.0-r223:  * The specific snippet of code:
hps-firmware-0.1.0-r223:  *             die "The source directory '${S}' doesn't exist"
hps-firmware-0.1.0-r223:  *
hps-firmware-0.1.0-r223:  * Build log: /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r223:20220122-113052.log
hps-firmware-0.1.0-r223:  * Stable log symlink: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/temp/build.log
hps-firmware-0.1.0-r223:  * CWD: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/empty
hps-firmware-0.1.0-r223:  * S:   /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r223/work/hps-firmware-0.1.0/hps-firmware

Evan Benn

unread,
Jan 23, 2022, 7:13:17 PM1/23/22
to jordan...@gmail.com, Chromium OS Discussion, Mike Frysinger
hps-firmware-0.1.0-r223:  * Using local source dir(s): /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
hps-firmware-0.1.0-r223:  * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
hps-firmware-0.1.0-r223:  * cros_workon --board=amd64-generic start crash-reporter
hps-firmware-0.1.0-r223:  * repo sync

Have you tried these steps? Does the hps-firmware2 repo exist?

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

Mike Frysinger

unread,
Jan 23, 2022, 7:59:25 PM1/23/22
to Evan Benn, Arpad Jordan, Chromium OS Discussion
he shouldn't need to.  the eclass should be cloning the repo on demand.
-mike

Arpad Jordan

unread,
Jan 24, 2022, 1:47:46 AM1/24/22
to Chromium OS Discussion, Mike Frysinger, Arpad Jordan, Chromium OS Discussion, evan...@google.com
I can find some related git repos available but not sure how to clone them properly in the build process:


Unfortunately starting cros_workon as suggested in the error logs makes no difference as repo sync reuse all sources and emerge issue with hps-firmware persists:

jordana@dad-pc:~/chromiumos$ cros_sdk
[sudo] password for jordana:
06:36:51.864: NOTICE: Raising vm.max_map_count from 65530 to 262144
(cr) ((1f36852...)) jordana@dad-pc ~/chromiumos/src/scripts $ cros_workon --board=amd64-generic start crash-reporter
06:37:10.096: NOTICE: Started working on 'chromeos-base/crash-reporter' for 'amd64-generic'
(cr) ((1f36852...)) jordana@dad-pc ~/chromiumos/src/scripts $ repo sync
remote: Finding sources: 100% (361/361)
remote: Total 361 (delta 193), reused 361 (delta 193)
Fetching: 100% (18/18), done in 15.998s
chromite: Shared project chromiumos/chromite found, disabling pruning.
Garbage collecting: 100% (18/18), done in 0.089s
Checking out: 100% (17/17), done in 1.932s
repo sync has finished successfully.
(cr) ((1f36852...)) jordana@dad-pc ~/chromiumos/src/scripts $ emerge-amd64-generic hps-firmware
Calculating dependencies... done!

>>> 06:38:33 Emerging (1 of 1) chromeos-base/hps-firmware-0.1.0-r226::chromiumos for /build/amd64-generic/

 * Running stacked hooks for pre_pkg_setup
 *    sysroot_build_bin_dir ...                                                                                                                                                                                                             [ ok ]

 * Running stacked hooks for post_pkg_setup
 *    python_eclass_hack ...                                                                                                                                                                                                                [ ok ]
06:38:34 >>> Unpacking source...

 * Could not find "/mnt/host/source/src/platform/hps-firmware2".
 * The CROS_WORKON_LOCALNAME for this ebuild should be updated
 * to be relative to "/mnt/host/source/src".
 * Using local source dir(s): /mnt/host/source/src/platform/platform/hps-firmware2
 * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
 * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
 * cros_workon --board=amd64-generic start crash-reporter
 * repo sync
 * path: /mnt/host/source/src/platform/platform/hps-firmware2
 * destdir: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0

 * Copying sources from /mnt/host/source/src/platform/platform/hps-firmware2
 * Could not find "/mnt/host/source/src/platform/hps-firmware2".
 * The CROS_WORKON_LOCALNAME for this ebuild should be updated
 * to be relative to "/mnt/host/source/src".
 * Using local source dir(s): /mnt/host/source/src/platform/platform/hps-firmware2
 * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
 * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
 * cros_workon --board=amd64-generic start crash-reporter
 * repo sync
 * path: /mnt/host/source/src/platform/platform/hps-firmware2
 * destdir: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0

 * Copying sources from /mnt/host/source/src/platform/platform/hps-firmware2
06:38:34 >>> Source unpacked in /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work

 * Running stacked hooks for post_src_unpack
 *    asan_init ...                                                                                                                                                                                                                         [ ok ]
 * ERROR: chromeos-base/hps-firmware-0.1.0-r226::chromiumos failed (prepare phase):
 *   The source directory '/build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0/hps-firmware' doesn't exist
 *
 * Call stack:

 *               ebuild.sh, line  809:  Called __ebuild_main 'prepare'
 *      phase-functions.sh, line 1059:  Called __dyn_prepare
 *      phase-functions.sh, line  385:  Called die
 * The specific snippet of code:
 *              die "The source directory '${S}' doesn't exist"
 *
 * Build log: /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r226:20220124-063833.log
 * Stable log symlink: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/temp/build.log
 * CWD: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/empty
 * S:   /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0/hps-firmware

>>> 06:38:36 Failed to emerge chromeos-base/hps-firmware-0.1.0-r226 for /build/amd64-generic/, Log file:
>>> 06:38:36   /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r226:20220124-063833.log

 * Messages for package chromeos-base/hps-firmware-0.1.0-r226 merged to /build/amd64-generic/:
 * Log file: /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r226:20220124-063833.log


 * Could not find "/mnt/host/source/src/platform/hps-firmware2".
 * The CROS_WORKON_LOCALNAME for this ebuild should be updated
 * to be relative to "/mnt/host/source/src".
 * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
 * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
 * cros_workon --board=amd64-generic start crash-reporter
 * repo sync

 * Could not find "/mnt/host/source/src/platform/hps-firmware2".
 * The CROS_WORKON_LOCALNAME for this ebuild should be updated
 * to be relative to "/mnt/host/source/src".
 * Sources are missing in /mnt/host/source/src/platform/platform/hps-firmware2
 * You need to cros_workon and repo sync your project. For example if you are working on the crash-reporter package:
 * cros_workon --board=amd64-generic start crash-reporter
 * repo sync
 * ERROR: chromeos-base/hps-firmware-0.1.0-r226::chromiumos failed (prepare phase):
 *   The source directory '/build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0/hps-firmware' doesn't exist
 *
 * Call stack:

 *               ebuild.sh, line  809:  Called __ebuild_main 'prepare'
 *      phase-functions.sh, line 1059:  Called __dyn_prepare
 *      phase-functions.sh, line  385:  Called die
 * The specific snippet of code:
 *              die "The source directory '${S}' doesn't exist"
 *
 * Build log: /build/amd64-generic/tmp/portage/logs/chromeos-base:hps-firmware-0.1.0-r226:20220124-063833.log
 * Stable log symlink: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/temp/build.log
 * CWD: /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/empty
 * S:   /build/amd64-generic/tmp/portage/chromeos-base/hps-firmware-0.1.0-r226/work/hps-firmware-0.1.0/hps-firmware

Evan Benn

unread,
Jan 24, 2022, 5:23:56 PM1/24/22
to Arpad Jordan, Chromium OS Discussion, Mike Frysinger
The error message is:

 * Could not find "/mnt/host/source/src/platform/hps-firmware2".

What does `ls -l /mnt/host/source/src/platform/hps-firmware2` show?

I am not sure why it would not be there as you show a working `repo sync`. Does `repo status` have anything to say?
Deleting that folder and re-`repo sync`-ing has worked for me in the past for similar strangeness. 

Setting 'USE=-hps' may also work.

env USE=-hps ./build_packages


Mike Frysinger

unread,
Jan 24, 2022, 5:29:30 PM1/24/22
to Evan Benn, Arpad Jordan, Chromium OS Discussion
it's not there because he's using a minilayout.  so that's entirely expected.  but let's ignore that.

this is supposed to work:
  rm -rf src/platform/hps-firmware2
  emerge-$BOARD hps-firmware

if that isn't working, it's a bug.  in this case, the hps-firmware ebuild is broken.  it defines the CROS_WORKON variables after the inherit when it needs to be before.
-mike

Evan Benn

unread,
Jan 24, 2022, 6:25:54 PM1/24/22
to Mike Frysinger, Arpad Jordan, Chromium OS Discussion

Arpad Jordan

unread,
Jan 24, 2022, 6:39:12 PM1/24/22
to Chromium OS Discussion, Mike Frysinger, Arpad Jordan, Chromium OS Discussion, evan...@google.com
it seems a bug then and there is no such hps-firmware2 directory in src/platform:

(cr) ((1f36852...)) jordana@dad-pc ~/chromiumos/src/scripts $ ls -la /mnt/host/source/src/platform/
total 20
drwxr-xr-x  5 jordana jordana 4096 Jan 22 07:39 .
drwxr-xr-x  8 jordana jordana 4096 Jan 22 07:39 ..
drwxr-xr-x 10 jordana jordana 4096 Jan 22 07:39 crostestutils
drwxr-xr-x 15 jordana jordana 4096 Jan 22 07:39 dev
drwxr-xr-x  2 jordana jordana 4096 Jan 22 07:39 empty-project

I think I will move on without minilayout - thank you both for looking into this!

Mike Frysinger

unread,
Jan 25, 2022, 3:50:23 AM1/25/22
to Evan Benn, Arpad Jordan, Chromium OS Discussion
looks like chromeos-base/hps-firmware-images is also broken
-mike
Reply all
Reply to author
Forward
0 new messages