ungoogled-software / ungoogled-chromium

Google Chromium, sans integration with Google
BSD 3-Clause "New" or "Revised" License
20.58k stars 834 forks source link

Can't build on Buster (armhf) #2410

Closed shgubar closed 1 year ago

shgubar commented 1 year ago

OS/Platform

Debian, Ubuntu, and derivatives

Installed

Compiled from source

Version

92.0.4515.159-1

Have you tested that this is not an upstream issue or an issue with your configuration?

Description

Errors on step - ./out/Default/gn gen out/Default --fail-on-unused-args

How to Reproduce?

System: Buster (armv7l)

uname -a
Linux rasp 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Installed:

llvm - version 7.0-47
clang - version 7.0-47
ninja-build - version 1.10.1-1~bpo10+1
libcups2-dev - version 2.2.10-6+deb10u7

I. Download from: https://github.com/ungoogled-software/ungoogled-chromium/archive/refs/tags/92.0.4515.159-1.zip

II. Unzip & cd: unzip 92.0.4515.159-1.zip && cd ungoogled-chromium-92.0.4515.159-1

III. Following instruction (Download, Prune binaries, Apply patches, Substitute domains):

  1. mkdir -p build/download_cache - OK
  2. ./utils/downloads.py retrieve -c build/download_cache -i downloads.ini - OK
  3. ./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src - OK
  4. ./utils/prune_binaries.py build/src pruning.list - OK
  5. ./utils/patches.py apply build/src patches - OK
  6. ./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src - OK

IV. Build GN:

  1. git clone https://chromium.googlesource.com/chromium/tools/depot_tools - OK
  2. export PATH=$PATH:$PWD/depot_tools - OK
  3. mkdir -p build/src/out/Default && cd build/src - OK
  4. ./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/ -> output:
         ninja: Entering directory `/home/pi/ungoogled-chromium-92.0.4515.159-1/build/src/out/Release/gn_build'
         [194/194] LINK gn

V. Invoke the build:

  1. cp -p ../../flags.gn out/Default/args.gn
  2. ./out/Default/gn gen out/Default --fail-on-unused-args -> output:
    ERROR at //build/config/sysroot.gni:64:7: Assertion failed.
      assert(
      ^-----
    Missing sysroot (//build/linux/debian_sid_arm-sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=arm
    See //build/config/sysroot.gni:65:11: 
          exec_script("//build/dir_exists.py",
          ^-----------------------------------
    This is where it was set.
    See //chrome/installer/BUILD.gn:8:1: whence it was imported.
    import("//build/config/sysroot.gni")
    ^----------------------------------
    See //BUILD.gn:80:5: which caused the file to be included.
    "//chrome/installer",

Actual behaviour

When invoke the build via command:

./out/Default/gn gen out/Default --fail-on-unused-args

Output is:

ERROR at //build/config/sysroot.gni:64:7: Assertion failed.
      assert(
      ^-----
Missing sysroot (//build/linux/debian_sid_arm-sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=arm
See //build/config/sysroot.gni:65:11: 
          exec_script("//build/dir_exists.py",
          ^-----------------------------------
This is where it was set.
See //chrome/installer/BUILD.gn:8:1: whence it was imported.
import("//build/config/sysroot.gni")
^----------------------------------
See //BUILD.gn:80:5: which caused the file to be included.
    "//chrome/installer",

Trying run command: build/linux/sysroot_scripts/install-sysroot.py --arch=arm

Output: Installing Debian sid arm root image: /home/pi/ungoogled-chromium-92.0.4515.159-1/build/src/build/linux/debian_sid_arm-sysroot Downloading https://commondatastorage.9oo91eapis.qjz9zk/chrome-linux-sysroot/toolchain/11d6f690ca49e8ba01a1d8c5346cedad2cf308fd/debian_sid_arm_sysroot.tar.xz Failed to download https://commondatastorage.9oo91eapis.qjz9zk/chrome-linux-sysroot/toolchain/11d6f690ca49e8ba01a1d8c5346cedad2cf308fd/debian_sid_arm_sysroot.tar.xz

Expected behaviour

Just compile build and get ungoogled-chromiuim-armhf.deb This is for install for all Raspberry Pi 3B+ and 4B+ with system Buster and arch armhf

Relevant log output

No response

Additional context

Please help or just tell me correct instruction or something else. Thanks.

PF4Public commented 1 year ago

92 is too old version, please try any later one.

shgubar commented 1 year ago

Thank you for your reply. I chose this version because it was the last one installed in Buster. Please tell me from which one is better to start with so that I don't go through each one.

PF4Public commented 1 year ago

At first you should update Debian to the latest supported version and try building latest ungoogled-chromium. Unfortunately ungoogled-chromium-debian is not very active, and Debian stable usually lags significantly behind other distros w.r.t. package versions, so building ungoogled-chromium using only this repository might be a difficult task, but you may try https://github.com/berkley4/ungoogled-chromium-debian, which is more up-to-date.

shgubar commented 1 year ago

Yes, you are right - for the latest version (bookworm), there is already a ready-made package for the armhf architecture. But I would still like to build exactly on the buster. If this is not possible - just let me know.

Regarding your link that you gave, there are also other problems there (I can't even get to the middle of the instructions). And there is no one to inform/ask about those assembly problems.

PF4Public commented 1 year ago

I would still like to build exactly on the buster. If this is not possible - just let me know.

I cannot tell you whether it is possible or not, but building old version for old OS especially on arm could be very challenging. This also implies that you're mostly on your own to figure all issues you may face.

BTW

Failed to download https://commondatastorage.9oo91eapis.qjz9zk/chrome-linux-sysroot/toolchain/11d6f690ca49e8ba01a1d8c5346cedad2cf308fd/debian_sid_arm_sysroot.tar.xz

This is easy to fix. You could download it manually substituting 9oo91eapis.qjz9zk with the original domain (which is googleapis.com obviously).