Building Chromium Canary on Pi

As of 2020-07-04:

  • Install Python 3.8
  • Clone the Chromium source and run depot_tools.
    • For nice fetch to work, you need to:
      • Symlink /usr/local/bin/python3.8 to /usr/local/bin/python3 (assuming python3.8 was installed there).
      • Create a python3_bin_reldir.txt file in depot_tools and put ../../../usr/local/bin or whatever the relative path to the symlink 3.8 is.
      • Though if this happens, what can you do? Cloning into '/mnt/src/depot_tools/_gclient_src_hf6zh2t7'... error: cannot fork() for fetch-pack: Cannot allocate memory
        • I don't think you can, in practical terms, get the code for Chromium on a Raspberry Pi with 800 MB of memory.
        • You can, however, do this on a typical laptop, then rsync the code over to the Pi.
  • Still:
/mnt/src/depot_tools/src $ ./build/install-build-deps.sh
ERROR: The only supported distros are
 	Ubuntu 14.04 LTS (trusty with EoL April 2022)
 	Ubuntu 16.04 LTS (xenial with EoL April 2024)
 	Ubuntu 18.04 LTS (bionic with EoL April 2028)
 	Ubuntu 20.04 LTS (focal with Eol April 2030)
 	Ubuntu 19.04 (disco)
 	Ubuntu 19.10 (eoan)
 	Debian 8 (jessie) or later
  • Instead, you can build on a laptop for an arm processor.
    • cd to src/build and run install-build-deps.sh
      • If something fails because of an unsigned repo, run install-build-deps.sh --arm --quick-check to get the list of apt packages that are missing, then install them directly.
    • cd to src and run ./build/linux/sysroot_scripts/install-sysroot.py --arch=arm
    • gclient runhooks from src.
    • gn gen out/Default--args='target_os="linux" target_cpu="arm"
    • autoninja -C out/'Default--args=target_os="linux" target_cpu="arm"' chrome
      • It will do like 65000 build tasks.
      • At the end, there will be an error about httplib2 missing.
        • sudo ln -s /usr/local/bin/python3.8 /usr/bin/python
        • Install pip
        • pip install httplib2
        • Add /home/jimkang/.local/bin to PATH.
        • None of this helped. I think it's an issue with vpython not finding it.
        • sudo chmod -R a+wrx /home/jimkang/.vpython-root
        • vpython -m pip install httplib2
        • Next error: no such package: infra/python/wheels/psutil/linux-amd64_cp32_abi3
        • I think I'm done.

#raspberrypi #chromium #browser #install