Alien Pastures

My thoughts on Slackware, life and everything

Building Chromium for Slackware (contd.)

It’s been ‘fun’ compiling the newest Cheomium 143 sources… as usual when Google updates the major version number.
Again, it is momentarily not possible to compile the Chromium sources using Slackware’s own compilers. I get a Rust error “error: extern blocks must be unsafe” in compiling ‘liballoc_error_handler_impl_ffi.rlib‘. which I have been unable to fix – my knowledge of the Rust programming language is non-existent.
Which is why I could only upload the 64bit packages for chromium and chromium-ungoogled; Google only offers a 64bit version of the heavily patched clang and rust compilers they use internally to compile Chrome. A 32bit package will only become available after I found a fix for the Rust error.
Also, I had to apply some hacks in order to deal with the need for a newer Python than the 3.9 which is part of Slackware 15.0. I already have a successful patch for another part of the code where Python 3.9 was too old (the pipe union operator ‘|’ was added in Python 3.10) but due to time constraints I could not examine the new code and instead added a Python 3.12 binary in parallel.

This means you currently cannot simply run the SlackBuild on Slackware 15.0; you have to add a Python 3.12 package (I compiled a package from the sources I took from from Slackware-current) and point the ‘/usr/bin/python‘ symlink to python3.12. I hope to have fixed that requirement in the next batch of chromium packages.

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

No Kings! Power belongs to the people

To my friends and their friends and family in the USA: stand up against blatant corruption, greed and power grabs. Fight the corrosion of your democracy and the rise of authoritarianism and fascism in the “land of the free”.

I stand with you.

Anubis is now guarding the git server

I have had it with the onslaught of AI and indexing bots that keep my web servers in a constant state of near-crashes.
In particular git.slackware.nl is not handling the load well. It’s powered by cgit, and with tens of thousands of requests per hour to serve the details of git commits, cgit experiences a lot of segfaults. I already had to disable the download of compressed git-snapshot tarballs because all the “xz” processes that were running as a result of serving up “tar.xz” files were eating most of the server’s resources.

The filters that I had built into the Apache httpd server, as well as fail2ban taking care of the really obvious offenders, were not sufficient.

So. I have built a package for anubis, the self-proclaimed Web Application Firewall that protects web sites from AI scraping bots by challenging the visitor with a proof-of-work. This is essentially a calculation the client (a browser, or a web-scraping script) has to make before allowed entry. That calculation takes the shape of a small math problem that is expensive to compute, but easy to verify, like hashing a string with a given number of leading zeroes.
For scraping bots, the cost of these calculations will be big enough that they stop trying. Mere individuals like you and me, we will notice the Anubis loading page for a second and then it will stay out of our way as long as the cookie it places is valid.
Common Linux download programs like wget and curl are not affected by Anubis because it uses  a sensible set of defaults in its filtering behavior with the intention to not infuriate the humans accessing the site.

The anubis package that I built, will create an ‘anubis’ user and group when it is installed. It will also install a startup script in ‘/etc/rc.d/’ and a block is added to ‘/etc/rc.d/rc.local’ so that Anubis will start on every boot of the computer.

Anubis can run in multiple separate instances. A necessity because for each web site you want to protect you’ll have to run a separate instance, listening on a separate TCP port.

If there’s interest in the details of setting up Anubis on Slackware, let me know in the comments section below and then I’ll write up that documentation in a follow-up article.

If you experience issues accessing git.slackware.nl because of Anubis, also let me know below!

Cheers, Eric

New URL: blog.slackware.nl

Me

Hi all.
It was time to migrate my blog to a new server. The URL ‘alien.slackbook.org/blog/’ has changed to ‘blog.slackware.nl’.

For years, my hosting server has been https://harrier.slackbuilds.org/ – ever since I had to move away from the original host, the slackware.com server (Pat does not trust PHP code).
I am eternally grateful to the team of people (Robby Workman and friends) who purchased its hardware and have been maintaining it in a US datacenter for all that time. They gave me full root rights over my virtual machine. Also many thanks to Teklinks for offering colocation and bandwidth!
Check out harrier‘s frontpage to get an idea of all the Slackware community services are hosted on that iron.

But the QEMU VM which runs on harrier and which essentially hosted my blog, is still on Slackware 14.2. Over time I had to upgrade httpd, mariadb and php to keep the WordPress code happy, but now WordPress is again nagging me about not having PHP 8 and to be honest, Slackware 14.2 has not received security updates for two years now. I am not feeling comfortable with that.
I had a short chat with Robby and he indicated that there’s just too much to be done and too little time to do it. I fully understand that and I have not bothered him with my worries.

I decided to migrate the blog to a new Slackware -current host. I have done a few trial runs over the years; it is not trivial to move a WordPress blog to a new domain and at the same time to a new host. But I think I figured out the challenges and ironed out the kinks.

Also, this was a good opportunity to reconsider the hosting location. Harrier runs in a US datacenter. I am not at all happy with the racist and autocratic direction the US is taking under Trump and his MAGA cult. I’ve seen people being detained and/or sent back at airport border control checkpoints simply because they have written online posts that are unfavorable to Trump. Look at my previous posts here on the blog – I will not attempt to enter the US as long as Trump is its dictator. And therefore it makes sense to choose the European Union as the new location for my blog server.

Welcome to blog.slackware.nl! Please update your bookmarks.
I am creating a redirect for alien.slackbook.org/blog/ to get that forwarded to the new URL, but it never hurts to spread the word to your friends.

Cheers, Eric

« Older posts

© 2025 Alien Pastures

Theme by Anders NorenUp ↑