site  contact  subhomenews

DIY compile chromium

October 07, 2021 — BarryK

The saga has been going on for a couple of weeks. I am compiling chromium in EasyOS. Each build takes 13 hours, running on a Lenovo PC with Intel 8th gen. i3 CPU, 32GB RAM, swap partition on internal SSD, the source on an external USB3 SSD. Previous post in this saga:

https://bkhome.org/news/202109/chromium-almost-compiled-fails-last-link-step.html

I am currently compiling chromium 93.0.4577.82, and have applied lots of patches. Including patches from the "ungoogled-chromium" project:

https://github.com/Eloston/ungoogled-chromium

Chromium no longer supports compiling with gcc, requires clang. However, there is a patchset to compile with gcc:

https://github.com/stha09/chromium-patches/

Also got patches from gentoo and openembedded. Including one of my own to prevent the warning message that pops up when run with "--no-sandbox".

In the last few days, tackled some show-stopper issues when running on the main desktop in a sandbox. Web pages displayed images only, no text -- OE have a patch for that, that they got from Fedora. Videos at youtube.com play, but no sound -- found fix here:

https://bugs.chromium.org/p/chromium/issues/detail?id=1018580

...requires commandline option "--disable-features=AudioServiceSandbox". Odd, but also need that when running crippled-root in a container.

I have put together a "chromium-project" tarball, that has everything needed to compile chromium. Works on EasyOS anyway. But reckon it should work running on other pups and *dogs. Uploaded here:

http://distro.ibiblio.org/easyos/project/chromium/2021/

The SFS is 'chromium_93.0.4577.82-7_amd64.sfs' and can be downloaded and installed via the "sfsget" icon on the desktop. Or direct:

http://distro.ibiblio.org/easyos/amd64/packages/sfs/easyos/oe/dunfell/

You can install it to the main desktop, and it will run as user 'chromium', in a sandbox. Seems to be working OK, tried some videos on youtube, play OK at 1080p.

I don't recommend installing in a container, as video playing is choppy, with audio out of sync. I think that the other chromium SFS, the official build, does play OK in a container -- from memory -- but as it runs with the "--no-sandbox" option you get that warning message.

Note to pup and *dog users. SFSs in EasyOS are a bit different, the SFS won't work for you, as-is. EasyOS has glibc 2.33, and if your pup has an older glibc then it probably won't work. Also, you would need to open it up and modify /usr/bin/chromium script so that it runs as 'spot'. There is folder '.control' that you won't need.

Very ambivalent about compiling chromium. So many issues, so many patches. Think maybe should just use the official build from Google. I read some comments, some other distro maintainers are thinking the same thing, mostly because of the API keys problem.     

Tags: easy