[Troubleshooting] Build fails because a required dependency is masked

996 views
Skip to first unread message

Lucas Wang

unread,
Feb 10, 2021, 6:29:00 AM2/10/21
to Chromium OS Development
Hello all,

I was trying to build the OS from the instructions on https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md#Get-the-Source

For which I was getting an "exit code 1" error, then I retried the build, but with this command before the build command from this post https://groups.google.com/a/chromium.org/g/chromium-os-dev/c/mjdAH2vwzgM/m/x7G19vNpDwAJ:

cros_workon --board=amd64-generic start chrome-icu

I am no longer getting an exit code error, however it seems that the build now fails because a required dependency is masked:

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

!!! All ebuilds that could satisfy "~chromeos-base/chrome-icu-90.0.4413.0_rc" for /build/amd64-generic/ have been masked.
!!! One of the following masked packages is required to complete your request:
- chromeos-base/chrome-icu-90.0.4413.0_rc-r1::chromiumos (masked by: package.mask)

(dependency required by "chromeos-base/chromeos-chrome-90.0.4413.0_rc-r1::chromiumos" [ebuild])
(dependency required by "chromeos-base/telemetry-0.0.1-r7::chromiumos" [ebuild])
(dependency required by "chromeos-base/autotest-tests-audio-0.0.1-r3216::chromiumos[-chromeless_tty]" [ebuild])
(dependency required by "chromeos-base/autotest-all-0.0.1-r53::chromiumos[cras]" [ebuild])
(dependency required by "chromeos-base/autotest-all" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
23:14:57 ERROR   : emerge detected broken ebuilds. See error message above.

My understanding is that this dependency needs to be unmasked somehow, so I went to /etc/portage/package.mask and found that it is an empty directory. I then did some searching about unmasking packages on emerge and Gentoo and tried to follow this guide: https://niden.net/post/using-autounmask-to-unmask-packages-in-gentoo/

However, there is no autounmask utility installed, and packages.keywords does not exist in the specified location, only a directory called package.keywords. Manually creating either packages.keywords or package.unmaks and then running the emerge command results in a failed emerge.

What are some potential solutions for this?

Thanks

Brian Norris

unread,
Feb 10, 2021, 2:10:42 PM2/10/21
to Lucas Wang, Chromium OS Development
It looks like you have the converse problem of the chromium-os-dev thread you linked: if you're going to 'workon' chrome-icu, you also need to 'workon' chromeos-chrome:

 cros_workon --board=amd64-generic start chromeos-chrome

Normally, you shouldn't need to do either of those, unless you're modifying browser sources.

You say: "I was getting an "exit code 1" error," --> that's pretty vague and can happen for all sorts of reasons. It's probably best if you post your original error and try to resolve that, instead of cros-workon'ing a bunch of packages (and especially not Chrome, if you don't need to).

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

Lucas Wang

unread,
Feb 10, 2021, 4:22:19 PM2/10/21
to Chromium OS Development, Brian Norris, Chromium OS Development, Lucas Wang
Thanks for the information,

So I started up the build machine again and entered chroot fresh to test it again, with the following commands to keep things to the minimal:

export BOARD=amd64-generic
./build_packages --board=${BOARD}

And was met with the exact same masked dependency issue from my original post. I suspect that the "exit with nonzero code 1" issue that I mentioned initially could be potentially due to the fact that I did not set up access to Google Storage buckets on my first build attempt, but I have since set it up outside chroot with gsutil configure.

However, while the export BOARD= option needs to be entered every time a new chroot session is started, I don't think cors_workon share the same property as entering it again gives a "Already working on..." message. So here are all the commands, aside from export BOARD= and ./build_packages, that I have entered in previous chroot sessions (regardless if they could be relevant to the current issue):

setup_board --board=${BOARD} (after export BOARD=)

./set_shared_user_password.sh

cros_workon --board=amd64-generic start chrome-icu

USE="chrome-internal"

 ./build_packages --board=${BOARD} --use_any_chrome

If any of the commands above causes modification outside of the current chroot session, I think need some help reverting them for further testing.

Thanks

Lucas Wang

unread,
Feb 10, 2021, 8:49:37 PM2/10/21
to Chromium OS Development, Brian Norris, Chromium OS Development, Lucas Wang
I tried to build again with both the

cros_workon --board=amd64-generic start chrome-icu

and

cros_workon --board=amd64-generic start chromeos-chrome

commands entered before ./build_packages --board=${BOARD} and was met with a new error:

* CHROME_ORIGIN VALUE is LOCAL_SOURCE
 * ERROR: chromeos-base/chrome-icu-9999::chromiumos failed (unpack phase):
 *   /home/appdevmain/chrome_root does not contain a valid chromium checkout!
 * 
 * Build log: /build/amd64-generic/tmp/portage/logs/chromeos-base:chrome-icu-9999:20210211-013103.log
 * Stable log symlink: /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/temp/build.log
 * CWD: /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work
 * S:   /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work/chrome-icu-9999
17:31:36 ERROR   : Wed Feb 10 17:31:36 PST 2021
17:31:36 ERROR   :    PGID    PPID     PID     ELAPSED     TIME %CPU COMMAND
17:31:36 ERROR   :       5       4       5    01:45:03 00:00:00  0.0 -bash
17:31:36 ERROR   : 1270305       5 1270305       15:26 00:00:00  0.0  \_ /bin/bash ./build_packages --board=amd64-generic --use_any_chrome
17:31:36 ERROR   : 1270305 1270305 1292801       00:00 00:00:00  0.0      \_ /bin/bash ./build_packages --board=amd64-generic --use_any_chrome
17:31:36 ERROR   : 1270305 1292801 1292802       00:00 00:00:00  0.0          \_ ps f -o pgid,ppid,pid,etime,cputime,%cpu,command
17:31:36 ERROR   : Arguments of 1270305: ./build_packages '--board=amd64-generic' '--use_any_chrome'
17:31:36 ERROR   : Backtrace:  (most recent call is last)
17:31:36 ERROR   :  build_packages:466:main(), called: die_err_trap  
17:31:36 ERROR   : 
17:31:36 ERROR   : Command failed:
17:31:36 ERROR   :   Command '( if [[ "${FLAGS_run_goma}" -eq "${FLAGS_TRUE}" ]]; then
17:31:36 ERROR   :     info "Starting goma compiler_proxy."; goma_ctl="${GOMA_DIR:-${HOME}/goma}/goma_ctl.py"; "${goma_ctl}" restart; trap "'${goma_ctl}' stop" EXIT;
17:31:36 ERROR   : fi; info_run sudo -E "${EMERGE_CMD[@]}" "${EMERGE_FLAGS[@]}" "${PACKAGES[@]}" --useoldpkg-atoms="${CRITICAL_SDK_PACKAGES[*]}" --rebuild-exclude="${CRITICAL_SDK_PACKAGES[*]}" )' exited with nonzero code: 1

I found a conversation dating back to 2013 here where the issue seems to be concerning the same dependency but with error output was different.

Thanks
On Wednesday, February 10, 2021 at 11:10:42 AM UTC-8 Brian Norris wrote:

Lucas Wang

unread,
Feb 11, 2021, 6:14:39 PM2/11/21
to Chromium OS Development, Lucas Wang, Brian Norris, Chromium OS Development
I restarted the machine and tried the same build procedures, but this time, entering chroot with the --chrome_root flag:

cros_sdk --chrome_root=$HOME/chromiumOS_directory_that_was_initially_repo_init_and_repo_sync -j8

The build still seems to be failing at the same dependency, but due to a different reason this time:

>>> 13:36:19 === Start output for job chrome-icu-9999 ===
chrome-icu-9999:  * Package:    chromeos-base/chrome-icu-9999Load avg: 15.4, 5.2, 3.7
chrome-icu-9999:  * Repository: chromiumos
chrome-icu-9999:  * USE:        abi_x86_64 amd64 cups elibc_glibc kernel_linux libcxx runhooks userland_GNU xkbcommon
chrome-icu-9999:  * FEATURES:   network-sandbox sandbox splitdebug userpriv usersandbox
chrome-icu-9999:  * Running stacked hooks for pre_pkg_setup
chrome-icu-9999:  *    sysroot_build_bin_dir ...
chrome-icu-9999:  [ ok ]
chrome-icu-9999:  * Using python2.7 to build
chrome-icu-9999:  * Running stacked hooks for post_pkg_setup
chrome-icu-9999:  *    python_eclass_hack ...
chrome-icu-9999:  [ ok ]
chrome-icu-9999: 13:36:12 >>> Unpacking source...
chrome-icu-9999:  * CHROME_ORIGIN VALUE is LOCAL_SOURCE
chrome-icu-9999: 13:36:12 >>> Source unpacked in /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work
chrome-icu-9999:  * Running stacked hooks for post_src_unpack
chrome-icu-9999:  *    asan_init ...
chrome-icu-9999:  [ ok ]
chrome-icu-9999:  * Running stacked hooks for pre_src_prepare
chrome-icu-9999:  *    build_toolchain_catch ...
chrome-icu-9999:  [ ok ]
chrome-icu-9999: 13:36:16 >>> Preparing source in /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work/chrome-icu-9999 ...
chrome-icu-9999: 13:36:16 >>> Source prepared.
chrome-icu-9999: 13:36:18 >>> Configuring source in /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work/chrome-icu-9999 ...
chrome-icu-9999:  * Building with the compiler settings:
chrome-icu-9999:  *   CFLAGS = -pipe -march=x86-64 -msse3 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -fdebug-info-for-profiling -faddrsig -Wno-unknown-warning-option
chrome-icu-9999:  *   CXXFLAGS = -pipe -march=x86-64 -msse3 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -fdebug-info-for-profiling -D__google_stl_debug_vector=1 -faddrsig -Wno-unknown-warning-option -stdlib=libc++
chrome-icu-9999:  *   CPPFLAGS = 
chrome-icu-9999:  *   LDFLAGS = -Wl,-O2 -Wl,--as-needed -Wl,--gc-sections -Wl,--icf=all -stdlib=libc++
chrome-icu-9999: /mnt/host/depot_tools/gclient.py runhooks --force
chrome-icu-9999: /usr/bin/python2.7: warning: Python 2.7 is deprecated and will be removed from CrOS by end of 2021. All users must migrate ASAP.
chrome-icu-9999: /usr/bin/python2.7: commandline: /mnt/host/depot_tools/gclient.py runhooks --force
chrome-icu-9999: Error: client not configured; see 'gclient config'
chrome-icu-9999:  * ERROR: chromeos-base/chrome-icu-9999::chromiumos failed (configure phase):
chrome-icu-9999:  *   (no error message)
chrome-icu-9999:  * 
chrome-icu-9999:  * Build log: /build/amd64-generic/tmp/portage/logs/chromeos-base:chrome-icu-9999:20210211-213608.log
chrome-icu-9999:  * Stable log symlink: /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/temp/build.log
chrome-icu-9999:  * CWD: /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work/chrome-icu-9999
chrome-icu-9999:  * S:   /build/amd64-generic/tmp/portage/chromeos-base/chrome-icu-9999/work/chrome-icu-9999



It's saying that gclient needs to be configured, so I gave that a try, below is the first time calling gclient config:

$ ~/depot_tools/gclient config
/home/appdevmain/depot_tools/bootstrap_python3: line 28: cipd: command not found
/home/appdevmain/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Usage: gclient.py config [options] [url]

gclient.py: error: Inconsistent arguments. Use either --spec or one or 2 args


and for all of the following attempt to re-run the script, the following error is displayed:

$ ~/depot_tools/gclient config
/home/appdevmain/depot_tools/bootstrap_python3: line 28: cipd: command not found
Usage: gclient.py config [options] [url]

gclient.py: error: Inconsistent arguments. Use either --spec or one or 2 args


checking python3 --version returns 3.8.5 so python itself should be good here.

I found a thread here on manually creating a .glicent file. However, I do wish to check here first on the "cipd command not found issue"  to make sure I'm not breaking things further.

Thanks

Lucas Wang

unread,
Feb 13, 2021, 3:23:31 AM2/13/21
to Chromium OS Development, Lucas Wang, Brian Norris, Chromium OS Development

After some poking around with gclient, I'm fairly certain that the "masked dependency" per the title of this conversation is no longer the issue and it's something else instead. Thank you for the help thus far in this troubleshooting, I will be starting a new conversation to better reflect the current issue.

Best
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages