Building for GNU/Hurd

For contributed third party builds not necessarily configured like the main product.
e.g. AVX builds, SSE builds, Pandora builds.
User avatar
Uityyy
New to the forum
New to the forum
Posts: 2
Joined: 2025-04-01, 18:13

Building for GNU/Hurd

Unread post by Uityyy » 2025-04-01, 19:18

About 2.5 years back a community member documented a successful build of Pale Moon for GNU/Hurd on a now-locked thread: viewtopic.php?t=28793

Having just setup a Debian Hurd desktop install, I am interested in following this path and thought before I dive in I would ask

a) Were Hurd binaries ever shared anywhere? There was discussion of this on the thread, but it didn't become an official contributed build on the main list.

b) If jobbautista9 or anyone else using Hurd is around, can they tell me where the current-best place to get the OS-specific patches is? I know work was being shared at https://repo.palemoon.org/jobbautista9/ ... branch/gnu but I'm not sure if this is still the latest version of it.

User avatar
Uityyy
New to the forum
New to the forum
Posts: 2
Joined: 2025-04-01, 18:13

Re: Building for GNU/Hurd

Unread post by Uityyy » 2025-04-03, 22:49

I was able to replicate Job Bautista's Hurd build only actually compiling *on* Hurd rather than cross-compiling.

He's how:
- I cloned jobbautista9's late-2022 Pale Moon fork (https://repo.palemoon.org/jobbautista9/Pale-Moon) and the corresponding UXP fork mentioned above. The Pale Moon fork isn't set to reference the UXP fork as its version of UXP, so I just checked out the gnu branch of the latter and moved my UXP folder to Pale-Moon/platform.
- I installed all the packages on my Debian Hurd machine that you would want when building on ordinary Debian. The Debian Hurd documentation currently steers users towards CD images and snapshots from 2023-06 which don't include Python 2.7, so I grabbed those extra packages by searching for older packages on snapshot.debian.org, and they installed fine.
- I then created a .mozconfig like the one at the end of the previous thread but without any cross-compiling specific options.
- jobbautista9 had some platform-specific recommendations for audio settings, so I installed the development packages for puleaudio and sndio as well.
- As stated un jobbautista9's mozonfig, this particular build needs a specific version of autoconf from 1999, so I downloaded that from the GNU archives, built it with zero issue, gave the binary a name that wouldn't conflict with my system's main autoconf, and referenced it in my .mozconfig.
- And then I ran ./mach build

My Hurd machine is flea market find that used to run Windows XP. It has an early single-core AMD64 CPU and maybe 4 GB for RAM of which the 32-bit operating system can only see 3. The Pale Moon build instructions say one should have 6 GB, so I created a 3.6 GB swap partition and enabled it with the swapon command.

The build ran for about 17.5 hours. Most of the time it was CPU-bound with plenty of RAM free, but it did use swap to link libxul.so. The first attempt at this linking process resulted in a full-system deadlock, but after rebooting (and with slightly less running -- only Xorg, openbox, two xterms, and htop), it was able to link this file in about 35 minutes and finish the build in about 40.

Pale Moon is now hands down the most useful browser I have on Hurd. The obvious next step would be checking if jobbautista9's Hurd patches still work on the latest version or Pale Moon, and if I had done this all with a cross-compilation environment on a fast machine, I would probably try it, but I have a functional browser and a very long compile time, so I will probably leave things here for now.

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 950
Joined: 2020-11-03, 06:47
Location: Philippines

Re: Building for GNU/Hurd

Unread post by jobbautista9 » 2025-04-04, 03:38

Just saw this thread right now. Congrats on getting it built! I'm glad to know that I'm not the only one who has tried compiling this browser for the Hurd. :thumbup:

I'm surprised you were able to link libxul in bare metal! I guess there really is a difference from using a virtualized environment and a real machine for building large applications like this... I'd still be a bit wary about stability issues though (since there were past reports of the browser being unstable when linking libxul uses up swap), so I'd say it's still worth figuring out how to get cross-compilation from a Linux host working and get a consistent build environment that other builders can use in the future. I unfortunately don't have the time to revisit this, and I'd have to remake my build environment since I kinda nuked it for some free space... :(

As for whether the Hurd port is still compatible with the latest tree, you could try a git rebase to find out. There probably should be no issues or merge conflicts, but if there would be one it most likely would be in ffvpx (since that part got updated recently). :think:

Since you're running this in bare metal, how does it run for you? Can it play video and audio smoothly? I never got to know because I don't have a spare, suitably old machine I can run GNU/Hurd on... Last time I tested was in a virtual environment with the Xorg server in my Linux host remotely connected to the Hurd VM, and same thing with the audio with sndio as the host sound server I think. Needless to say it was very slow, even if it's basically a localhost network... :(
Image

:akko_derp:

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

BenFenner
Keeps coming back
Keeps coming back
Posts: 818
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building for GNU/Hurd

Unread post by BenFenner » 2025-04-04, 13:24

Nice job! :o :thumbup: :clap:

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37497
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Building for GNU/Hurd

Unread post by Moonchild » 2025-04-04, 13:27

Cross-compiling is difficult with a large and complex codebase like ours. Even cross-compiling for Android was a bit of a headache to get working when I did the Android builds, and that was a Tier-1 target platform, so I can barely imagine the difficulties there would be to try and cross-compile for Hurd.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
frostknight
Astronaut
Astronaut
Posts: 553
Joined: 2022-08-10, 02:25

Re: Building for GNU/Hurd

Unread post by frostknight » 2025-04-04, 23:49

I recall reading that Hurd is on the back-burner of being supported by FSF and its only being worked on because its interesting project to study and work on and nothing much else.

For this reason and this reason only, I question why anyone would bother doing this.

But if you feel like its worth it, whatever you wish.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!