Two More Cents

How to compile GNU IceCat on Debian 11 - A Complete Guide

GNU IceCat - an open-source browser from the GNU project that aims to provide a privacy-friendly alternative to existing browsers. It is a fork of Firefox that includes a number of modifications, including default extensions that help protect user privacy. This article serves as a complete guide on building the IceCat browser on a Debian 11 system.

Image taken from https://www.gnu.org/software/gnuzilla/

Why should you compile it?

You might we wondering - why would I need to compile the browser from scratch? Don’t they have builds on their website? Well, the answer is no - at least I don’t think they do. The only build I could find was out of date (v60.7.0 as opposed to the latest Firefox version of v104). Lucky for us, the browser is open-source, and we can fetch the source code and compile it ourselves.

What you’ll need

To compile the browser, you’ll need the following:

Fetch the source code

The first step is to fetch the source code, which can be done by cloning the git repo at https://git.savannah.gnu.org/cgit/gnuzilla.git.

Run the ‘makeicecat’ script

Upon cloning the repo, you should notice a script named ‘makeicecat’ inside the source directory. Run this script. It wil fetch the original Firefox source code, and apply any necessary modifications.

Run the ‘configure’ script inside the browser source directory

‘cd’ into the ‘output’ directory, and then into the ‘icecat-xxx.x.x’ directory. If you are familiar with the Firefox source code, this directory will look familiar to you.

At this point, you have two options on compiling the actual browser: Use Firefox’s ‘mach’ system, or use the old-school ‘configure && make && make install’ approach. I tried the former, only to hit a wall. You see, the ‘mach’ command requires that the directory be in a ‘git’ or ‘hg’ clone. Although our top-level IceCat directory was a ‘git’ clone, it only contained the script, and not the actual source code. So I decided to use the traditional make commands in order to build the browser.

First, set the executable bit (‘chmod +x’) on the ‘configure.in’ file. Then, create a separate directory for the compiled object files, and give it a name (I recommend ‘obj’). ‘cd’ into it, and run the ‘configure.in’ script in the parent directory with the ‘–without-wasm-sandboxed-libraries’ option. You are now ready to compile the browser. Ensure you have enough RAM / swap space to compile the browser (it can be a very resource-intensive task, and your build may fail, with an ‘out of memory’ error.

‘make && make install’

When you’re ready, type ‘make’ (the actual compilation can take an hour or two to finish) followed by ‘make install’. You can combine the two into a single command as shown below:

$ make && make install

You should now have the GNU IceCat browser compiled on your system. Try it out - type ‘icecat’ in a terminal window, and see if it launches. You can even package the compiled build into a tarball, to distribute it, or store it for future use. Navigate to the ‘browser/installer’ directory inside your ‘obj’ folder. Running ‘make’ in here, will generate a tarball in ‘obj/dist’. IceCat comes with a number of privacy-friendly features and extensions. Feel free to try out these features, and add or disable additional ones. One of my gripes with the browser is the fact that many of the links in the ‘about’ pages (such as the link to install additional extensions) leads to a 404 page (at least at the time of writing), as it appears the web pages that the links point to need to be updated. Hopefully, this (and other QoL changes) will happen soon. But it is an open-source project, and if you find a bug, or just have a suggestion, please let the IceCat devs know about it.