Skip to main content

`fetch chromium` fails

Fix for: `Command '/usr/bin/python src/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook' returned non-zero exit status 1 in /root/chromium-src`.

As part of some R&D for a JS framework I have been thinking of for a while I needed to do some Chromium hacking, problem is I hit a wall just simply attempting to check out the source code. This was on a fresh Debian VM machine following the official checkout docs.

root@lh1:~/chromium-src# fetch --no-history chromium
Running: gclient root
Running: gclient config --spec 'solutions = [
  {
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "name": "src",
    "deps_file": ".DEPS.git",
    "custom_deps": {},
  },
]
'
Running: gclient sync --no-history
Error: Command '/usr/bin/python src/build/linux/sysroot_scripts/install-sysroot.py --running-as-hook' returned non-zero exit status 1 in /root/chromium-src
Traceback (most recent call last):
  File "/root/depot_tools/fetch.py", line 353, in 
    sys.exit(main())
  File "/root/depot_tools/fetch.py", line 348, in main
    return run(options, spec, root)
  File "/root/depot_tools/fetch.py", line 342, in run
    return checkout.init()
  File "/root/depot_tools/fetch.py", line 142, in init
    self.run_gclient(*sync_cmd)
  File "/root/depot_tools/fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/root/depot_tools/fetch.py", line 66, in run
    return subprocess.check_output(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync', '--no-history')' returned non-zero exit status 2

The solution is to:

  • `export PATH=$PATH:/root/depot_tools`, this one is important or you will get an error when script is processing 'Downloading /root/chromium-src/src/third_party/binutils/Linux_x64/binutils.tar.bz2'.
  • gclient sync --nohooks --no-history chromium which will fetch the code without running hooks code; more info here.
  • Then running `aptitude install sudo` if not already installed
  • `./src/build/install-build-deps.sh --unsupported --no-syms --no-arm --no-chromeos-fonts --no-nacl`
    • But that will error out with various 'E: Unable to locate package ...' on a Debian system, copy the echoed command and remove the packages from the list manually or use Bash's for loop like so:
    • for i in apache2-bin bison cdbs curl devscripts dpkg-dev elfutils fakeroot flex fonts-indic fonts-thai-tlwg g++ git-core git-svn gperf language-pack-da language-pack-fr language-pack-he language-pack-zh-hant lib32gcc1 lib32stdc++6 libapache2-mod-php5 libasound2 libasound2-dev libatk1.0-0 libav-tools libbluetooth-dev libbrlapi0.6 libbrlapi-dev libbz2-1.0 libbz2-dev libc6 libc6-i386 libcairo2 libcairo2-dev libcap2 libcap-dev libcups2 libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexpat1 libffi6 libffi-dev libfontconfig1 libfreetype6 libgbm-dev libgconf2-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-0 libglib2.0-dev libglu1-mesa-dev libgnome-keyring0 libgnome-keyring-dev libgtk2.0-0 libgtk2.0-dev libjpeg-dev libkrb5-dev libnspr4 libnspr4-dev libnss3 libnss3-dev libpam0g libpam0g-dev libpango1.0-0 libpci3 libpci-dev libpcre3 libpixman-1-0 libpng12-0 libpulse0 libpulse-dev libsctp-dev libspeechd2 libspeechd-dev libsqlite3-0 libsqlite3-dev libssl-dev libstdc++6 libudev1 libudev-dev libwww-perl libx11-6 libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxkbcommon-dev libxrandr2 libxrender1 libxslt1-dev libxss-dev libxt-dev libxtst6 libxtst-dev mesa-common-dev msttcorefonts openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-numpy python-opencv python-openssl python-psutil python-yaml realpath rpm ruby subversion ttf-dejavu-core ttf-kochi-gothic ttf-kochi-mincho wdiff xcompmgr zip zlib1g; do sudo apt-get install -y $i; done
      
  • Then finally run `gclient runhooks`.

Comments

  1. Thanks a lot! I thought I can do ../depot_tools/gclient so I added depot_tools to my PATH and a roadblock overcome.

    ReplyDelete
  2. In my case it was because of the wget. Since I was compiling chromium in a docker container, there wasn't wget package installed. The error has gone after installing wget.

    ReplyDelete

Post a Comment

Popular posts from this blog

Opera SOCKS Proxy Setup Issues

SOCKS error: Connection closed by remote server When setting up SOCKS only proxy in Opera web browser make sure to specify the IP address instead of your fully qualified domain name (FQDN). Using a host name will not work and Opera simply fails to connect to the proxy server. Sample working setup screen shot with a Dante proxy server , note that HTTP, HTTPS, FTP, SSH options are left blank. Bug DSK-364301 has been filled with Opera, if it has been a while since this post and the issue still not fixed feel free to add your word of encouragement by emailing DSK-364301@bugs.opera.com :)

How to child proof a fireplace

DIY - Do it yourself fireplace child guard Our wonderful 8.5 month old Sofia has become a crawling race car with an untamed thirst for exploration. And so with the cold nights approaching we needed to child proof the fireplace. This however proved to be more difficult than would reasonably expect, I've checked the local Toys "R" Us, Walmart, and even a Canadian Tire with no success for a ready to use product. Internet search was more fruitful and returned a few online stores one could order from, however in all honestly they didn't look too sturdy to me. So I build my own relatively quickly and inexpensively. Materials needed is a privacy plastic lattice - the smallest hole pattern - a few screws and anchors; tools needed are a drill, and a handsaw if you don't have the lattice cut at the store - that’s it. The construction consits of screwing the lattice into the wall and the final product is easiest explained through following pictures. Feel free to +1 this po…

Duplicate value found: duplicates value on record with id: <unknown>.

System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: <unknown> duplicates value on record with id: <unknown>.The above error is triggered in the database layer and caused by a trigger or workflow outside of your main code of block that is bubbling this exception. This is rather difficult to track down especially if you are unfamiliar with the code, I am sharing my procedure in the hopes this saves you time - if you find this helpful drop me a line or follow me on twitter @danielsokolows. This error is caused by unique field constraint on the object, so the first step is to examine the object and locate the API names of all unique fieds. You can do this through SF direclty 'Setup < Customize &lt <object being inserted> &lt Fields' or by downloading the `src/objects` metadata information and searching for <unique>; I preffer the latter and actually download ALL matadata information f…