How to build Pale Moon on OpenIndiana (Solaris/illumos).
Posted: 2019-11-07, 21:05
I've tested most extensively with GCC 7 on OpenIndiana, but I've also found the browser to build and run on Oracle Solaris 11 with GCC 7. Please note that illumos distributions and Oracle Solaris are binary incompatible with binaries newer than around Solaris 10, so you would have to setup a custom Solaris 10 or OpenSolaris build environment to create a binary that works on both Oracle Solaris and illumos. This is actually possible, but not recommended because the Solaris 10 kernel and libc are missing a lot of features that more modern versions of both operating systems support. For instance, Solaris 10 doesn't support named threads or kernel-level packet timestamps.
So anyway, here is what the process looks like for OpenIndiana. Let's assume it was just installed and you have a fresh desktop. The $ symbol at front of each command I present represents the prompt, you don't actually type that.
1. Open up a terminal, either MATE Terminal or XTerm. Become root by typing:
2. Update your system (the CD image is likely out of date) by typing:
It effectively creates something akin to a Restore Point in Windows after upgrading the system, so if you screwed something up you can revert to the last snapshot that worked.
3. Reboot into your updated system. Open the terminal window and assume the root role again as in step 1.
4. Run this command to install the build dependencies (python-27 is still the default on OpenIndiana, though python-35 is also available as python3):
5. Run this command to get a copy of the source code (source tarballs are no longer offered, so git is now a hard requirement):
5a. Skip this step for now, but you'll probably want to build a specific version and not just whatever the latest code on trunk is in the future. To do so, type something like this:
Replacing 28.8.0 with whatever version you want to build.
6. Copy one of these files below into a text editor and save it as .mozconfig inside the new UXP directory you just downloaded via git.
64-bit build mozconfig:
32-bit build mozconfig:
7. Start the build by typing:
8. If all goes well, test the build by typing:
Replace $HOME and obj-illumos with the actual location of the object directory if necessary. It won't need this in the final package, the LD_LIBRARY_PATH thing is only needed for ./mach run due to an issue with symlink resolution. All the libraries in dist/bin are symlinks, and the OS can't process them properly without an LD_LIBRARY_PATH.
9. Finally, if everything goes according to plan, make a package and extract it to your home directory if you're happy with the build.
10. Technically optional, but get the last Adobe Flash Player released for Solaris while you still can. I don't know how much longer the downloads page for it will be up. https://helpx.adobe.com/flash-player/kb ... sions.html
11. If you downloaded Flash player, extract the appropriate .so file for your architecture to a directory like $HOME/plugins, and use:
To make sure it gets picked up. There might be a smarter way of doing this that involves knowing what plugin directory Pale Moon uses by default on Unix when you extract it, but I couldn't figure it out and had to use this.
So anyway, here is what the process looks like for OpenIndiana. Let's assume it was just installed and you have a fresh desktop. The $ symbol at front of each command I present represents the prompt, you don't actually type that.
1. Open up a terminal, either MATE Terminal or XTerm. Become root by typing:
Code: Select all
$ su root
Code: Select all
$ pfexec pkg image-update -v
3. Reboot into your updated system. Open the terminal window and assume the root role again as in step 1.
4. Run this command to install the build dependencies (python-27 is still the default on OpenIndiana, though python-35 is also available as python3):
Code: Select all
$ pfexec pkg install git gcc-7 yasm pkg-config autoconf-213 header-audio sunpro motif
Code: Select all
$ git clone https://github.com/MoonchildProductions/UXP.git
Code: Select all
$ git reset --hard PM28.8.0_Release
Replacing 28.8.0 with whatever version you want to build.
6. Copy one of these files below into a text editor and save it as .mozconfig inside the new UXP directory you just downloaded via git.
64-bit build mozconfig:
Code: Select all
# Disable this only if you're sure you want to continue a build from where it left off (not recommended if troubleshooting linker issues).
mk_add_options AUTOCLOBBER=1
# Set this to your desired path for the object/build directory, possibly your home directory.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-illumos
# If you forget to set this, the build system produces a browser with the Basilisk/Serpent branding and UI.
ac_add_options --enable-application=palemoon
# Consider enabling this if you have ccache installed, and have a machine continuously rebuilding the browser in the background for advanced troubleshooting.
#ac_add_options --with-ccache=/usr/bin/ccache
# These options are required to produce an AMD64 build, 32-bit builds are the default.
CC="gcc -m64"
CXX="g++ -m64"
AS="gas --64"
ac_add_options --target=x86_64-pc-solaris2.11
ac_add_options --host=x86_64-pc-solaris2.11
ac_add_options --libdir=/usr/lib/amd64
ac_add_options --x-libraries=/usr/lib/amd64
export PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
# These options enable the *official* Pale Moon branding. While you are permitted to enable this for personal use on your own computer, take care not to distribute any build
# produced with this branding unless you are certain you have permission from the branding's owner to do so.
#export MOZILLA_OFFICIAL=1
#ac_add_options --enable-official-branding
# Solaris/illumos requires this because the GNU toolchain is not the default one, and you have ggrep, gtar, gsed, etc...
ac_add_options --with-toolchain-prefix=g
# Standard Pale Moon options, as found on the Developer Wiki page for Linux. http://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
# This probably isn't needed to enable pthreads, but I'm paranoid about them being disabled because stuff breaks in weird and inexplicable ways without pthreads.
ac_add_options --with-pthreads
# Enable this option and comment out --enable-strip to do a debug build (so you can use GDB to step through execution, get more useful stack dumps, etc).
#ac_add_options --enable-debug-symbols
Code: Select all
# Disable this only if you're sure you want to continue a build from where it left off (not recommended if troubleshooting linker issues).
mk_add_options AUTOCLOBBER=1
# Set this to your desired path for the object/build directory, possibly your home directory.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-illumos
# If you forget to set this, the build system produces a browser with the Basilisk/Serpent branding and UI.
ac_add_options --enable-application=palemoon
# Consider enabling this if you have ccache installed, and have a machine continuously rebuilding the browser in the background for advanced troubleshooting.
#ac_add_options --with-ccache=/usr/bin/ccache
# 32-bit builds are the default for now, but in the future you may require more of these.
#CC="gcc -m32"
#CXX="g++ -m32"
#AS="gas --32"
#ac_add_options --target=i386-pc-solaris2.11
#ac_add_options --host=i386-pc-solaris2.11
#ac_add_options --libdir=/usr/lib
ac_add_options --x-libraries=/usr/lib
#export PKG_CONFIG_PATH=/usr/lib
# These options enable the *official* Pale Moon branding. While you are permitted to enable this for personal use on your own computer, take care not to distribute any build
# produced with this branding unless you are certain you have permission from the owner to do so.
#export MOZILLA_OFFICIAL=1
#ac_add_options --enable-official-branding
# Solaris/illumos requires this because the GNU toolchain is not the default one, and you have ggrep, gtar, gsed, etc...
ac_add_options --with-toolchain-prefix=g
# Standard Pale Moon options, as found on the Developer Wiki page for Linux. http://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
# This PROBABLY isn't needed to enable pthreads, but I'm paranoid about them being disabled because stuff breaks in weird and inexplicable ways without pthreads.
ac_add_options --with-pthreads
# Enable this option and comment out --enable-strip to do a debug build (so you can use GDB to step through execution, get more useful stack dumps, etc).
#ac_add_options --enable-debug-symbols
Code: Select all
$ ./mach build
Code: Select all
$ export LD_LIBRARY_PATH=$HOME/UXP/obj-illumos/dist/bin
$ ./mach run
9. Finally, if everything goes according to plan, make a package and extract it to your home directory if you're happy with the build.
Code: Select all
# ./mach package
11. If you downloaded Flash player, extract the appropriate .so file for your architecture to a directory like $HOME/plugins, and use:
Code: Select all
export MOZ_PLUGIN_PATH=$HOME/plugins