This video documents the extensive process of compiling the Arctic Fox web browser, an older fork of Firefox, using the T2 Linux build system. The primary goal is to provide a functional browser for legacy and niche architectures supported by T2, such as PowerPC, Alpha, Itanium, MIPS, and Spark. The presenter navigates numerous challenges inherent in building decade-old software, including outdated dependencies (Python 2, autoconf 2.13, GTK2), non-portable code requiring patches (especially for uname usage and configure scripts), compiler optimization issues necessitating specific flags (-fno-delete-null-pointer-checks, etc.) to prevent crashes, and various cross-compilation hurdles like linker errors (fixed by disabling forced gold linker) and architecture-specific atomic operation failures. Despite these difficulties, Arctic Fox is successfully built natively on x86-64 and cross-compiled for Alpha, PowerPC, MIPS, and Spark 64 after significant debugging and patching efforts. Issues remain unresolved for Itanium and 32-bit Spark due to atomic operation errors, and potential ICU library incompatibilities are noted for PowerPC builds.
Building Arctic Fox on T2 Linux: Cross-Compilation Adventures
0:00:18 Introduction: Creative spoken word piece about innovators and coders ("the crazy ones").
0:03:21 Goal: Get a working browser, specifically Arctic Fox (an older Firefox fork), running on T2 Linux, especially for architectures like PowerPC where modern Firefox is difficult to build.
0:08:17 Initial Build Attempt (Arctic Fox, x86): Starts compiling Arctic Fox natively on x86-64.
0:11:41 Dependency Issues: Identifies the need for outdated dependencies like Python 2 and an old version of autoconf (2.13), highlighting the difficulties of building legacy software. Also requires GTK2.
0:15:02 Enabling Old Dependencies: Enables Python 2 support in the T2 build environment. Later restores autoconf 2.13 (0:40:54).
0:16:40 Trying Pale Moon: Briefly attempts to build Pale Moon (which Arctic Fox is based on) to potentially borrow build configurations, also requiring Python 2.
0:26:08 Fixing Arctic Fox Build (x86): Addresses Python path issues, removes unsupported configure options (devtools, JXL, NPAPI), patches GTK2 detection, and works around uname usage in build scripts which causes issues in T2's cross-compile environment (0:53:44, 1:01:13).
1:04:34 EME Build Error: Encounters a build failure related to Web IDL and MediaKeys, traced back to EME (Encrypted Media Extensions).
1:26:26 Disabling EME: Disables the EME module via configure flags, allowing the build process to proceed.
1:29:10 Build Success & Crash (x86): Arctic Fox compiles successfully but immediately crashes upon launch.
1:32:30 Optimization Problem: Suspects compiler optimizations are causing the crash, based on developer notes found online.
1:38:18 Rebuild without Optimization: Rebuilds with debug flags (effectively -O0), and the browser runs successfully.
1:40:08 Applying Specific Optimization Flags: Instead of disabling all optimizations, applies specific GCC flags (-fno-delete-null-pointer-checks, -fno-lifetime-dse, etc.) mentioned in developer notes to allow -O2 while preventing the crash. This also works.
1:45:47 LTO Disabled: Link Time Optimization (LTO) is explicitly disabled as it's suspected to break the build for this codebase.
1:47:10 Preparing for Cross-Compilation: Installs Python 2 and autoconf 2.13 on the build server.
1:57:34 Cross-Compiling (Alpha): Starts cross-compiling for DEC Alpha. Hits a linker error related to Pthread detection and unsupported ELF machine type (1:58:27). Disabling the forced usage of the gold linker resolves this (2:13:06), and the build succeeds.
1:59:16 Cross-Compiling (PowerPC): Starts cross-compiling for PowerPC. Hits the same linker error, fixed by disabling gold. Then encounters an FFI (Foreign Function Interface) library issue (2:15:31), fixed by using the system FFI library and correcting paths (2:19:32). Later faces an ICU (Unicode library) error related to object size (2:26:46). Building with system ICU fails due to API incompatibility (2:29:04). The build eventually succeeds (3:33:02), likely using the bundled ICU version.
2:16:40 Cross-Compiling (Itanium): Starts cross-compiling for Itanium. Fails due to an undefined reference to an 8-byte atomic operation (__atomic_fetch_add_8) (3:24:47). Issue remains unresolved.
3:33:31 Cross-Compiling (MIPS): Starts cross-compiling for MIPS. Fails early because the configure script's config.guess cannot identify MIPS (3:34:55). The issue is traced to the script using the build system's compiler (CC_FOR_BUILD) instead of the target compiler for the detection test (3:45:48). Exporting the correct CC_FOR_BUILD fixes the detection (3:52:09), and the build succeeds (3:54:31).
3:35:32 Cross-Compiling (Spark): Attempts Spark v9 (32-bit) and Spark 64. Spark v9 fails with an undefined atomic operation (__atomic_fetch_add_8) (3:39:10). Spark 64 initially fails with a different atomic type conversion error (3:40:07) but appears to build successfully later (binary verified at 3:42:35). Spark v9 issue remains unresolved.
3:55:53 Summary & Next Steps: Successfully built/cross-compiled Arctic Fox for x86-64, Alpha, PowerPC, MIPS, and Spark 64. Itanium and Spark v9 builds failed due to atomic issues. Next steps involve testing the compiled binaries on actual hardware (like SGI Octane for MIPS) and potentially fixing remaining issues (ICU on PowerPC, atomics on Itanium/Spark v9).
3:13:23 Outro: Creative rap/song about being ignored initially and successful later.