How to build Pale Moon on OpenIndiana (Solaris/illumos).

Post your tutorials for using Pale Moon or performing related tasks here.
Note: Not for "how do I...?" Questions!

Moderator: satrow

Forum rules
Tutorials and Howtos should only relate to Pale Moon, and not to third party applications. e.g.: Don't post a Howto for configuring your firewall.
If you have a question how to do something, you should use one of the support boards, not this board. It is meant for people to document and post instructions.
User avatar
athenian200
Fanatic
Fanatic
Posts: 149
Joined: 2018-10-28, 19:56
Contact:

How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by athenian200 » 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:

Code: Select all

$ su root
2. Update your system (the CD image is likely out of date) by typing:

Code: Select all

$ pfexec pkg image-update -v
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):

Code: Select all

$ pfexec pkg install git gcc-7 yasm pkg-config autoconf-213 header-audio sunpro motif
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):

Code: Select all

$ git clone https://github.com/MoonchildProductions/UXP.git
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:

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
32-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

# 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
7. Start the build by typing:

Code: Select all

$ ./mach build
8. If all goes well, test the build by typing:

Code: Select all

$ export LD_LIBRARY_PATH=$HOME/UXP/obj-illumos/dist/bin

$ ./mach run
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.

Code: Select all

# ./mach package
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:

Code: Select all

export MOZ_PLUGIN_PATH=$HOME/plugins
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.

Nightbird
Fanatic
Fanatic
Posts: 218
Joined: 2016-07-18, 21:12

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by Nightbird » 2019-11-11, 00:08

Do you plan to create a new page "Build Pale Moon on OpenIndiana (Solaris / Illuminos)" here ?
Diversity is key.

User avatar
athenian200
Fanatic
Fanatic
Posts: 149
Joined: 2018-10-28, 19:56
Contact:

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by athenian200 » 2019-11-11, 00:47

Nightbird wrote:
2019-11-11, 00:08
Do you plan to create a new page "Build Pale Moon on OpenIndiana (Solaris / Illuminos)" here ?
I've tried to create an account to edit that Wiki before, because I saw a few things that seemed missing or dated, but it fails to send the account creation e-mail and has all kinds of weird PHP template errors.
Image
I would be happy to create such a page if I were granted access, but as of now I can't make it work for me.

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 6178
Joined: 2012-10-09, 19:37
Location: Sector 001

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by New Tobin Paradigm » 2019-11-11, 01:39

That fuckin wiki software. Needs replaced with a github repo controlled content site. Anyway, if you draft it here I will put it on the wiki such that it is.
Image
- Old and insecure for legitimate and reasonable purposes. -
http://binaryoutcast.com/ | http://thereisonlyxul.org/ | Freenode #binaryoutcast

Nightbird
Fanatic
Fanatic
Posts: 218
Joined: 2016-07-18, 21:12

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by Nightbird » 2019-11-11, 12:59

@ athenian200, New Tobin Paradigm
Thanks :)

Off-topic:
@ athenian200
What you’ve accomplished is so damn interesting and so unexpected.
I was really surprized when i read "I created a Solaris/illumos port of UXP out of boredom". "out of boredom" ! :o 8-) :)
Now i wonder if UXP could support more platforms (but would need more maintainers with hardware and software knowlegde, i guess)
Anyway and thanks to you, i discovered OpenIndiana.
Diversity is key.

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 6178
Joined: 2012-10-09, 19:37
Location: Sector 001

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by New Tobin Paradigm » 2019-11-11, 13:03

The problem isn't if it can.. it is the maintenance cost. I have a feeling athenian200 will be around for a long time and not just keeping Solaris building. However, aside from the screaming venom spewing devil os.. There aren't that many left to pick from..
Image
- Old and insecure for legitimate and reasonable purposes. -
http://binaryoutcast.com/ | http://thereisonlyxul.org/ | Freenode #binaryoutcast

vannilla
Astronaut
Astronaut
Posts: 686
Joined: 2018-05-05, 13:29

Re: How to build Pale Moon on OpenIndiana (Solaris/illumos).

Unread post by vannilla » 2019-11-11, 19:57

New Tobin Paradigm wrote:
2019-11-11, 13:03
There aren't that many left to pick from..
Off-topic:
I'm dreaming of a future where Pale Moon is the first web browser to run on TempleOS :lol:
On a slightly more serious note, I wonder if the program could be made to run on Plan 9. I think the biggest obstacle would be to have XUL use Plan 9's graphics system.
That and the fact that the C library is slightly non-standard (more than GNU's) and might have compatibility problems.

Post Reply