My thoughts on Slackware, life and everything

Tag: chromium (Page 1 of 21)

How Chromium is built (for now)

A short history of providing Chromium on Slackware.
I have scripted the compilation process in such a way that you can compile the Chromium sources into both chromium and chromium-ungoogled packages for Slackware using the same chromium.SlackBuild script. I compile the packages on Slackware 15.0 and use the same resulting package for both Slackware 15.0 and -current. This is a simple matter of economics – it takes half a day to compile a single package and when I can only validate and run in the evenings, every compilation effectively takes one full day.

The Google developers themselves compile these same Chromium sources into the official Chrome browser binaries using modified, customized versions of the Clang and Rust compiler toolchains to do so. They ship 64bit binaries of both those toolchains inside the Chromium source code tarballs, for both X86 and ARM architectures. No 32bit binaries have been included for a long time now. All of these binaries have been built on a somewhat older Debian release so that they are compatible with modern distros and just work.

As a Chromium packager, I can use these embedded binaries to ensure that I won’t run into source code incompatibilities, but then that only works for 64bit packages. For the 32bit packages I have always been relying on Slackware’s own 32bit versions of Clang and Rust as shipped with Slackware itself. Pat has been so kind to provide recent versions of llvm, rust and rust-bindgen for Slackware 15.0 in its ./extra and ./testing subdirectories, and he keeps doing that until today. Probably because he needs these to compile Mozilla Firefox 🙂 But hey, I profit.
Compiling Chromium using the Slackware native compilers has its own challenges but I have always found ways to deal with that.

Until now.

To compile the Chromium source code, Google has introduced a new tool, crubit, which aims to integrate the C++ and Rust ecosystems. It is a bidirectional bindings generator for C++ and Rust. In the Chromium 152 source code, only the “cc_bindings_from_rs” tool of crubit is being used, but in future also the reverse bindings counterpart “rs_bindings_from_cc” will be added.
The problem I have with this, is that Google compiled this “cc_bindings_from_rs” tool on a modern (Debian?) distro and thereby introduced a dependency on glibc 2.34. Slackware 15.0 contains glibc 2.33 and there you have it. The “cc_bindings_from_rs” program refuses to run on Slackware 15.0.
I have spent considerable time trying to compile crubit on Slackware 15.0 using either the Slackware native compilers or even Google’s own embedded compilers inside the Chromium source code, and have failed to produce a binary that works on Slackware 15.0.

Other measures were required.
The challenge I faced is two-fold:

  1. I cannot use the embedded “cc_bindings_from_rs” on Slackware 15.0
  2. I cannot compile a native Slackware version of it either

And these have multiple consequences. I can try to find a way to make that program run on Slackware 15.0 but it’s still a 64bit binary so I cannot solve the problem for the 32bit Chromium anyway if I cannot compile a native 32bit binary for “rs_bindings_from_rs“.
The way I tackled this is as follows. First I extracted a Slackware-current 64bit “aaa_glibc-solibs” package into the filesystem of my Slackware 15..0 compile box:

mkdir -p /opt/glibc-current/lib64
tar -C /opt/glibc-current/ -xf aaa_glibc-solibs-2.42-x86_64-2.txz
cd /opt/glibc-current/
rm -r install sbin usr
mv -i lib64/incoming/* lib64/
rmdir lib64/incoming

This is a one-time action. These files will remain there for future compilations. And now I have all of the newer glibc libraries (libc.so.6 and others) and the loader (ld-linux) that I need for Chromium, conveniently out of the way so that they do not affect the Slackware 15.0 system.
Then I need to convince the “rs_bindings_from_rs” tool to look at “/opt/glibc-current/lib64/” when  it wants to load glibc libraries. For this purpose, I added the following block inside the chromium.SlackBuild script.

# ---
GLIBC_COMPAT=${GLIBC_COMPAT:-/opt/glibc-current/lib64}
RUSTTC="$TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/third_party/rust-toolchain"
CBFR="${RUSTTC}/bin/cc_bindings_from_rs"
if [ -x "$CBFR" ] && ! "$CBFR" --help >/dev/null 2>&1 ; then
  echo "-- Wrapping cc_bindings_from_rs to use $GLIBC_COMPAT."
  mv "$CBFR" "$CBFR.real"
  cat > "$CBFR" <<EOF
#!/bin/bash
exec $GLIBC_COMPAT/ld-linux-x86-64.so.2 \\
--library-path $GLIBC_COMPAT:$RUSTTC/lib \\
"$CBFR.real" "\$@"
EOF
  chmod +x "$CBFR"
  "$CBFR" --help >/dev/null 2>&1 && echo "-- cc_bindings_from_rs OK." \
  || { echo "-- ERROR: cc_bindings_from_rs still not runnable." ; exit 1 ; }
fi
# ---

What this does, is check whether the “cc_bindings_from_rs” tool actually runs (on Slackware-current it will run without issue) and if it fails because of the missing glibc symbols, create a wrapper script which ensures that the newer glibc libraries take precedence over Slackware’s own glibc, only for this particular binary. If “cc_bindings_from_rs” still fails to run, the script will abort.

This solves issue number 1.  But for a package build on 32bit Slackware 15.0 I would still need to be able to compile a native 32bit “cc_bindings_from_rs” and that’s simply not possible right now.
The solution here, is to use the 64bit toolchain embedded in the Chromium source, just like I did for the 64bit Slackware package, but then using cross-compilation on a 64bit multilib Slackware 15.0 host with 32bit as the target architecture.
Guess what… the chromium.SlackBuild is already fully prepared to perform a cross-compilation. All it needs is that you set the variable CROSS32 to the value “YES”. The Clang and Rust toolchains that are embedded in the Chromium source code are fully capable of cross-compiling. You do need to turn your 64bit Slackware host into a full multilib system following the instructions.

The command-line that compiles a 32bit chromium-ungoogled package then becomes:

CROSS32=YES BUILD_CLANG=1 USE_UNGOOGLED=1 ./chromium.SlackBuild

Hope this helps if you want to try this yourself and have been struggling with the new requirements.

Cheers, Eric

Chromium 152 – a pain to compile, so have patience (similar for LibreOffice)

Chromium 152 sources contain another major step for Google to unify their build infrastructure. Great for Google but for me it sucks.

Because unfortunately for me (and for you, the Chromium browser user) Google introduces new tools as part of their custom Rust toolchain that I am unable to compile locally as Slackware-native binaries. The “cc_bindings_from_rs” tool biting me in particular, part of the “crubit” project, also from Google.
Which means that (for now) I have to use the pre-built LLVM and Rust toolchain binaries that are embedded in the Chromium source tarball.
There’s a big ‘gotcha‘ to that now, something that was never an issue before. They have built “cc_bindings_from_rs”  on a system that is more modern than Slackware 15.0, so that this binary (and also several others as I found out) fail to run on Slackware 15.0, complaining “version `GLIBC_2.34′ not found“. As a result, the chromium.SlackBuild script fails to produce a package.

For the time being, I refuse to ditch support for Slackware 15.0 and I will keep trying to find a way to compile Chromium 152. This is galling, because I would like to spend my precious time on actually useful stuff instead of fighting Google at their own game. Still, the amount of CVE’s that is addressed by Chromium 152 is huge and I cannot ignore that.

Then LibreOffice is adding insult to injury. You might have seen in my repository’s ChangeLog.txt that I only released LibreOffice 26.8.0 as 64bit Slackware packages (15.0 and -current). I can not make the 32bit compile work here. An issue (looks like a compiler trap) which is unrelated to the Chromium problem, but it shows a troubling trend: the disregard that developers have for users of older 32bit hardware and older Operating Systems. The build of this new release simply was never properly quality-tested on 32bit.

To be continued.

Update 20260830:
For 32bit Chromium I found a solution which I documented in a separate blog article.
For 32bit LibreOffice I also found a fix, which boils down to “make sure that clang does not run out of address space on a 32bit host”. I disabled debug symbols, reduced code compilation optimizations, cranked up the stack limit and reduced the parallelism from “use all your cores” to “just four, no more”. All of this combined has indeed helped clang avoid traps and segfaults. Takes a lot longer to complete but that’s the compromise.

Multiple Chromium updates in rapid succession

You may have noticed that after my release of the Slackware package for Chromium (and its Un-Googled sibling) version 146.0.7680.71 there was a really short interval until I released an update in the form of the 146.0.7680.75 version.

Chromium 146.0.7680.71 is the latest major version upgrade and it addressed a crazy amount of CVE’s. I am not even going to lookup and configure the URLs, here’s the list:

CVE-2026-3913 CVE-2026-3914 CVE-2026-3915 CVE-2026-3916 CVE-2026-3917 CVE-2026-3918 CVE-2026-3919 CVE-2026-3920 CVE-2026-3921 CVE-2026-3922 CVE-2026-3923 CVE-2026-3924 CVE-2026-3925 CVE-2026-3926 CVE-2026-3927 CVE-2026-3928 CVE-2026-3929 CVE-2026-3930 CVE-2026-3931 CVE-2026-3932 CVE-2026-3934 CVE-2026-3935 CVE-2026-3936 CVE-2026-3937 CVE-2026-3938 CVE-2026-3939 CVE-2026-3940 CVE-2026-3941 CVE-2026-3942

And then the next update to 146.0.7680.75 only two days later included 2 zero-day security fixes that the developers missed somehow: both for CVE-2026-3909 and CVE-2026-3910 an exploit exists in the wild.

And then already the next day, a new update emerged which I am currently compiling: Chromium 146.0.7680.80 sources were released to address yet another zero-day exploit, this time CVE-2026-3909.

Those new packages (chromium and chromium-ungoogled 64bit binaries) will become available tomorrow, Sunday if the compilation does not fail. The 32bit package for chromium-ungoogled will follow a day later. The last two attempts to build a 32bit package had to be aborted when I discovered that there was a new release. I have only one computer that is capable of compiling Chromium, and building packages in parallel is not an option.

Enjoy the weekend and be careful accessing shady web sites 🙂

Eric

Building Chromium for Slackware

I thought it would be helpful, and in any case insightful, to describe how I build the Chromium (also -ungoogled) packages for Slackware.

It is not a trivial task but a necessary one I believe. Slackware users should have a choice of browsers – some prefer Mozilla Firefox, others Google Chrome, and then there’s LibreWolf and Chromium that are built on the same code base as respectively Firefox and Chrome. There are others too, but I decided to stick with packages for Librewolf  and Chromium (-ungoogled). This article will focus on Chromium because Librewolf is pretty trivial to compile into a package.

Google develops the Chromium source code using tools which it partly created and maintains itself and for another part extends and patches them from the originals. Most notorious are the heavily customized Clang and Rust compilers used inside Google. The Chromium code reflects those compiler customizations because its codebase contains sections that will fail to compile using the official releases from the LLVM Project and the Rust Team (on which Slackware bases its own llvm and rust packages).

Google formally stopped supporting 32bit releases for their binary distribution of Chrome as long ago as 2015 (that’s ten years ago!) but indicated that the Chromium source code would still be compilable on 32bit platforms. Over time it became clear that internal code reviews and checks only happen on 64bit OS-es and the 32bit compatibility has been susceptible to “code-rot” ever since. As evidenced in my SlackBuild script where more and more patches and code modifications have been added to keep the ability to compile Chromium sourcecode into 32bit binaries.

Google provides binary snapshots of their internally used versions of Clang and Rust which reduces the need for patches a lot. Unfortunately Google at some point in time stopped providing 32bit binaries and so these binaries are nowadays only provided for 64bit machine architectures. In the past I relied on these binary snapshots to compile Chromium for Slackware.
After Google stopped providing those 32bit binaries, I have been putting a lot of effort in making Chromium compilable using the Slackware stock Clang and Rust compilers.

Note: I compile Chromium and Chromium-ungoogled on Slackware 15.0 and make these packages available in repositories for both Slackware 15.0 and -current. The challenge with Slackware 15 is that the provided llvm and rust compiler packages are way too old to be able to compile Chromium. Therefore Patrick Volkerding provides newer llvm and rust packages in the ‘extra’ section of the Slackware 15.0 repository. From time to time I run into new issues with clang and upon request, Patrick then builds and uploads a newer version of llvm into the repository.

Let’s have a look at the required updates for a Slackware 15.0 system (Slackware-current is up-to-date on all these package versions):

  • nodejs >= 20.13.0
  • llvm >= 21
  • rust >= 1.88.0
  • nasm >= 2.14
  • cmake >= 3.30.1

Some of these updates for Slackware 15.0 are in my own package repository (cmake, nodejs, nasm), some others in the ‘extra’ section of the official Slackware 15.0 package tree (llvm and rust).

When these updates are applied to Slackware 15, or in case you are running Slackware-current, compiling a Chromium package is simply:

# ./chromium.SlackBuild

… and compiling Chromium-ungoogled needs this commandline:

# USE_UNGOOGLED=1 ./chromium.SlackBuild

Note: you will need an enormous amount of RAM and lots of free disk space (in the filesystem which $TMP is pointing to) to run this build successfully, and then a lot of patience for that build to complete (my QEMU virtual machine needs about 12 hours to complete this build – per package).

From time to time, usually when the major version number of Chromium makes a jump, the source code has been modified to such an extent that the Slackware compilers will fail to build the binaries successfully. In that case (and if you are creating a 64bit package) you can force the SlackBuild to download and use Google’s binary clang and rust compiler snapshots using this commandline:

# BUILD_CLANG=1 ./chromium.SlackBuild

# BUILD_CLANG=1 USE_UNGOOGLED=1 ./chromium.SlackBuild

Usually this way the compilation will be successful.

Attribution:
Next to the Arch Linux PKGBUILD maintainer for Chromium, I depend more and more on the unparalleled knowledge of the NixOS package maintainers, to find the proper patches for my SlackBuild.
I would have been forced to drop the 32bit package support a long time ago if it were not for emilylange and networkException (NixOS) and Christian Heusel and Evangelos Foutras (Arch Linux).

I hope this article gave some insight into the life of a package maintainer.

Cheers, Eric

The bit-rot of 32bit Linux

Interest of software developers in the use of their product on 32bit Operating Systems has been declining for years. Build tests are only done on 64bit OS’es nowadays. For obvious reasons: there are not so many computers left in the Western world that only support 32bit software.
The thing is, there’s still a lot of old computer hardware in use outside of the wealthy West. Slackware is one of the few remaining Linux distros where the 32bit flavor is just as relevant as the 64bit variant. Yes, you may question the value of running really new software on really old hardware, but I think that is the users’ choice and if you happen to live in a country where a 2025 computer amounts to a year of salary, then I would want also those people to enjoy modern software and security patches.

I can’t recall how many patches have been needed to make source code compile on 32bit Slackware for instance, but in most cases there would be a way to patch the source or circumvent the error. Patrick Volkerding does this for the distro core and I do something similar for the packages in my own repository. And we sigh and complain to each other when compilations fail due to the restrictive 32bit address space, the inability to specify either “lib” or “lib64” as the LIBDIR, the use of architecture-specific assembly code and CPU instructions, etcetera.

But like with everything that’s left to rot in a corner, it’s getting increasingly difficult to keep 32bit Linux alive. I am running into huge time-sucks when packaging complex pieces of software. Specifically, I have not been able to compile 32bit Chromium since the 132 release despite all of my attempts. And now LibreOffice joins that list: I have been unable to compile the 25.2.0 release on 32bit Slackware 15 and -current.

So.
I will give up my attempts to create 32bit packages for future Chromium and LibreOffice releases. It has already taken way too much of the little time I have left after my regular day-time job. If I run into more of these programs that won’t allow me to compile 32bit binaries, those will quickly be added to that list as well.
I will ask again: if there are people among you (readers) who really need their 32bit programs, I need you to come up with the patches to make that work.

As long as there is a 32bit Slackware, I will keep maintaining my multilib repository of course: there’s nothing for me to actually compile there now that gcc and glibc packages in 64bit Slackware support multilib; the work is reduced to simple re-packaging. But once Patrick decides that 32bit Slackware goes the way of the dodo, then also multilib for Slackware will disappear. It would really be a shame though, but there’s simply no longer any kind of movement that is sufficiently influential to be able to sway software developers and keep 32bit Linux instances running to do their unit testing.

Looking at the Wine emulator, that one can be built so that it no longer needs 32bit libraries, but it would lose the capability to run 16bit Windows programs. I guess that’s where DOSbox would come in to save the day.

But be forewarned: the 32bit OS has become an endangered species.

Eric

« Older posts

© 2026 Alien Pastures

Theme by Anders NorenUp ↑