Some hints on building Firefox from source on ppc64

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.powerpc
Message-ID <a41675ae9146e73ecfbe245b230a2a5e65f8cd3c.camel@physik.fu-berlin.de>
Hello,

since there seems to be some interest in hacking on Firefox on ppc64,
here is a quick and dirty guide on how to build the Firefox Debian
package on unstable.

1) Install build dependencies (as root)

   # apt build-dep firefox
   # apt install devscripts

2) Fetch source (as normal user)

   $ dget -u https://deb.debian.org/debian/pool/main/f/firefox/firefox_138.0.1-1.dsc

3) Install older version of NodeJS since the current version is broken (as root)

   # wget https://snapshot.debian.org/archive/debian-ports/20240531T134713Z/pool-ppc64/main/n/nodejs/nodejs_18.20.1%2Bdfsg-4%2Bb2_ppc64.deb
   # wget https://snapshot.debian.org/archive/debian-ports/20240531T134713Z/pool-ppc64/main/n/nodejs/libnode109_18.20.1%2Bdfsg-4%2Bb2_ppc64.deb
   # wget https://snapshot.debian.org/archive/debian-ports/20240531T134713Z/pool-ppc64/main/n/nodejs/libnode-dev_18.20.1%2Bdfsg-4%2Bb2_ppc64.deb
   # wget https://snapshot.debian.org/archive/debian-ports/20250109T015544Z/pool-ppc64/main/i/icu/libicu72_72.1-6_ppc64.deb
   # apt install ./nodejs_18.20.1+dfsg-4+b2_ppc64.deb ./libnode109_18.20.1+dfsg-4+b2_ppc64.deb ./libnode-dev_18.20.1+dfsg-4+b2_ppc64.deb ./libicu72_72.1-6_ppc64.deb 

4) Edit debian/rules as follows:

--- debian/rules.orig   2025-05-10 04:12:23.154624384 -0700
+++ debian/rules        2025-05-09 11:59:19.794538649 -0700
@@ -113,28 +113,8 @@
        CONFIGURE_FLAGS += --disable-webrtc
 endif
 
-ifeq (default,$(origin CC))
-ifneq (,$(filter-out bullseye bookworm,$(DIST)))
-CC := clang
-else
-ifeq ($(DIST),bookworm)
-CC := gcc-11
-else
 CC := gcc
-endif
-endif
-endif
-ifeq (default,$(origin CXX))
-ifneq (,$(filter-out bullseye bookworm,$(DIST)))
-CXX := clang++
-else
-ifeq ($(DIST),bookworm)
-CXX := g++-11
-else
 CXX := g++
-endif
-endif
-endif

i.e., override CC with "gcc" and CXX with g++.

5) Download patches from Solaris and apply them

   $ wget https://raw.githubusercontent.com/oracle/solaris-userland/refs/heads/master/components/desktop/firefox/patches/Bug1716707.patch
   $ cd /path/to/firefox-138.0.1/
   $ patch -p1 < /path/to/patch/Bug1716707.patch
   $ dpkg-source --commmit # set filename

Repeat for any other patch you want to test.

6) Build package

   $ dpkg-buildpackage -B

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.