CEF update.sh failing with below error on Linux

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF update.sh failing with below error on Linux

Postby linuxcef07 » Mon Mar 11, 2024 6:54 am

Our update.sh looks as below. The same update.sh works fine for previous versions of CEF. Now I have to upgrade to 6261. On changing branch, tag and checkout SHA in update.sh, I am hitting into below issue.

Code: Select all
python ../automate/automate-git.py --download-dir=$CHROMIUM_GIT_DIR --depot-tools-dir=$DEPOT_TOOLS_DIR --force-clean --no-distrib --no-build --branch=6261 --chromium-checkout=refs/tags/122.0.6261.112 --checkout=c902316ee9ba2eaf8e5a28b3dfa7e3cbd0573e81


Error seen: "failed to get user home directory: neither $XDG_CACHE_HOME nor $HOME are defined"

Code: Select all
INFO     . / u p d a t e . s h
DEBUG    with env: {'CHROMIUM_GIT_DIR': '/build/mts/release/test/cef/build/cg', 'DEPOT_TOOLS_DIR': '/build/mts/release/test/cef/build/depot_tools', 'PATH':
'/usr/bin/:/build/mts/release/test/cef/build/depot_tools:/build/mts/release/test/cef/build/release/lin64/cef_sync/deps/bin:/build/toolchain/lin32/python-2.7.1/bin:/build/toolchain/lin32/coreutils-5.97/bin:/build/toolchain/lin32/findutils-4.2.27/bin:/build/toolchain/lin32/grep-2.5.1a/bin:', 'TMPDIR': '/build/mts/release/test/tmp'}
 Cloning into '/build/release/test/cef/build/cg/cef'...
   Note: checking out 'd14e0517a1d326a3a8c89a385383814a9d0eaf80'.
         
   You are in 'detached HEAD' state. You can look around, make experimental
   changes and commit them, and you can discard any commits you make in this
   state without impacting any branches by performing another checkout.
   
   If you want to create a new branch to retain commits you create, you may
   do so (now or later) by using -b with the checkout command again. Example:
   
     git checkout -b <new-branch-name>
   
   HEAD is now at d14e0517a Update to Chromium version 122.0.6261.94
   Previous HEAD position was 29e08c17 Roll recipe dependencies (trivial).
   HEAD is now at 10bd39fd Enable deps cache for windows builds.
   failed to get user home directory: neither $XDG_CACHE_HOME nor $HOME are defined
   --> Download Directory: /build/mts/release/test/cef/build/cg
   --> Depot Tools Directory: /build/mts/release/test/cef/build/depot_tools
   --> Updating depot_tools
   -------- Running "update_depot_tools" in "/build/mts/release/test/cef/build/depot_tools"...
   --> CEF Branch: 6261
   --> CEF URL: https://bitbucket.org/chromiumembedded/cef.git
   --> CEF Source Directory: /build/mts/release/test/cef/build/cg/cef
   -------- Running "git clone https://bitbucket.org/chromiumembedded/cef.git /build/mts/release/test/cef/build/cg/cef" in "/build/mts/release/test/cef/build/cg"...
   -------- Running "git rev-parse HEAD" in "/build/mts/release/test/cef/build/cg/cef"...
   -------- Running "git rev-parse d14e0517a1d326a3a8c89a385383814a9d0eaf80" in "/build/mts/release/test/cef/build/cg/cef"...
   --> CEF Current Checkout: 5e616b2df0811f05a4acad9d2808ad872d2fbd13
   --> CEF Desired Checkout: d14e0517a1d326a3a8c89a385383814a9d0eaf80 (d14e0517a1d326a3a8c89a385383814a9d0eaf80)
   -------- Running "git checkout --force d14e0517a1d326a3a8c89a385383814a9d0eaf80" in "/build/mts/release/test/cef/build/cg/cef"...
   --> Reading /build/mts/release/test/cef/build/cg/cef/CHROMIUM_BUILD_COMPATIBILITY.txt
   -------- Running "git checkout --force 10bd39fd47" in "/build/mts/release/test/cef/build/depot_tools"...
   --> CEF Output Directory: /build/mts/release/test/cef/build/cg/out_6261
   --> Creating directory /build/mts/release/test/cef/build/cg/chromium
   --> Writing /build/mts/release/test/cef/build/cg/chromium/.gclient
   -------- Running "gclient sync --nohooks --with_branch_heads --jobs 16" in "/build/mts/release/test/cef/build/cg/chromium"...
   Traceback (most recent call last):
     File "../automate/automate-git.py", line 1170, in <module>
       chromium_dir, depot_tools_dir)
     File "../automate/automate-git.py", line 67, in run
       args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
     File "/build/toolchain/lin32/python-2.7.1/lib/python2.7/subprocess.py", line 504, in check_call
       raise CalledProcessError(retcode, cmd)
   subprocess.CalledProcessError: Command '['gclient', 'sync', '--nohooks', '--with_branch_heads', '--jobs', '16']' returned non-zero exit status 1


Anything missing in the environment? Any additional params to be expected in release 6261?
linuxcef07
Techie
 
Posts: 34
Joined: Wed Dec 20, 2023 11:57 am

Re: CEF update.sh failing with below error on Linux

Postby magreenblatt » Mon Mar 11, 2024 8:22 am

Error seen: "failed to get user home directory: neither $XDG_CACHE_HOME nor $HOME are defined"

Did you define one of these variables?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF update.sh failing with below error on Linux

Postby linuxcef07 » Mon Mar 11, 2024 11:25 am

We have not explicitly defined these variables. I am not sure. Are we expected to set these? Don't see them as part of the documentation!
Please advise.
linuxcef07
Techie
 
Posts: 34
Joined: Wed Dec 20, 2023 11:57 am

Re: CEF update.sh failing with below error on Linux

Postby magreenblatt » Mon Mar 11, 2024 11:31 am

They are likely considered “standard” Linux environment variables. You should make sure they’re set, as instructed by the message.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF update.sh failing with below error on Linux

Postby linuxcef07 » Mon Mar 11, 2024 12:58 pm

Sure. Will give a try by setting $HOME explicitly.
linuxcef07
Techie
 
Posts: 34
Joined: Wed Dec 20, 2023 11:57 am

Re: CEF update.sh failing with below error on Linux

Postby linuxcef07 » Tue Mar 12, 2024 3:27 am

After setting $HOME explicitly, we were able to move on. Thanks for the timely help.
linuxcef07
Techie
 
Posts: 34
Joined: Wed Dec 20, 2023 11:57 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 203 guests

cron