site  contact  subhomenews

Attempted to compile Chromium

October 11, 2019 — BarryK

The attempt was on Easy Buster 2.1.6, booted off USB-stick. Although it failed, it would be good to document the steps...

It is a massive project, with a lot of dependencies. /tmp requires 20GB free space, which was the first hurdle, as easy has a tmpfs mounted on /tmp -- which is done in the 'init' script before switch_root -- so I modified 'init' not to mount /tmp. A partition with 50GB space is required, and at least 8GB RAM is recommended.

I found some build instructions, inside a source tarball downloaded from here, size about 1GB:

The instructions, though, downloaded the complete source again, did not use that tarball. Following those instructions:

# git clone
# export PATH="${PATH}:/mnt/sde1/chromium/depot_tools" # mkdir chromium
# cd chromium
# fetch --nohooks --no-history chromium
# cd src

There is a script to downloaded any missing dependencies, however, it aborted. It requires certain versions of either Ubuntu or Debian, and although Easy uses Debian DEBs, it is not Debian. This was the attempt:

# ./build/ --unsupported

I looked at the script, and was able to determine what deps are required, and manually installed them, and their dependencies, via the PETget Package Manager. This is what I installed (as well as their deps):

ninja, cdbs, devscripts, libbrlapi-dev, libpam0g-dev, libspeechd-dev, openbox,
 p7zip, python-cherrypy3, python-crypto, python-numpy, python-opencv, python-openssl,
 python-psutil, python-yaml, rpm, librpm-dev, ruby, openjdk-11-jre

I then put in path variables for Java:

# export PATH="${PATH}:/usr/lib/jvm/java-11-openjdk-amd64/bin"
# export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# export JAVA_BIN_DIR=/usr/lib/jvm/java-11-openjdk-amd64/bin


# gclient runhooks

The instructions explained some variables that can be applied, however, didn't explain how to apply them, so I took a punt and preppended them:

# enable_nacl=false symbol_level=0 blink_symbol_level=0 gn gen out/Default

Now to start the compile:

# autoninja -C out/Default chrome

After awhile, fail, with errors like this:

/usr/include/x86_64-linux-gnu/bits/stdio.h:58:10: error: use of undeclared identifier '__getc_unlocked_body'
return __getc_unlocked_body (__fp);

Googling returned nothing, however, I think the problem may be changes in stdio.h. Chromium is, I think, compiled on earlier versions of Ubuntu and Debian (16.04 and Jessie), older glibc. I left it at that. 

Tags: easy