Building on modern macos/xcode versions

Discussion and announcements regarding the Mac port… er, original version of Oolite.

Moderators: another_commander, winston

sharpenedblade
Competent
Competent
Posts: 41
Joined: Thu Nov 09, 2023 11:05 pm

Re: Building on modern macos/xcode versions

Post by sharpenedblade »

The docs for older spidermonkey versions got lost somewhere along the way, so I gave up on porting it. It needs someone with a lot more C/C++ experience. Now I'm trying to build with macos 10.14 in a VM, but im busy with life so im going get back to it over the weekend. I need to make a new macos VM since I accidentally deleted the old one.

Also, it took me ~30 minutes to get spidermonkey to build on linux, windows, and macos, so I dont think thats a problem anymore. Most of the time was just waiting for deps to download.
User avatar
Cholmondely
Archivist
Archivist
Posts: 6565
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Building on modern macos/xcode versions

Post by Cholmondely »

sharpenedblade wrote: Thu Nov 30, 2023 7:59 am
The docs for older spidermonkey versions got lost somewhere along the way, so I gave up on porting it. It needs someone with a lot more C/C++ experience. Now I'm trying to build with macos 10.14 in a VM, but im busy with life so im going get back to it over the weekend. I need to make a new macos VM since I accidentally deleted the old one.

Also, it took me ~30 minutes to get spidermonkey to build on linux, windows, and macos, so I dont think thats a problem anymore. Most of the time was just waiting for deps to download.
Did it work? Did the OXPs work with it?

And are you still playing on an AppleMac?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
sharpenedblade
Competent
Competent
Posts: 41
Joined: Thu Nov 09, 2023 11:05 pm

Re: Building on modern macos/xcode versions

Post by sharpenedblade »

It failed miserably, when compiling clang segfaulted for some reason. I didn't even want to try to figure out what happened since its definitely something deep in the internals of how clang parses legacy code. Also I installed linux on my mac so I don't even have modern macos to test anymore.
User avatar
Cholmondely
Archivist
Archivist
Posts: 6565
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Building on modern macos/xcode versions

Post by Cholmondely »

sharpenedblade wrote: Wed Jul 23, 2025 7:12 am
... I installed linux on my mac so I don't even have modern macos to test anymore.
Which version of Linux did you install? Was it difficult?

Hiran was good enough to talk me through installing Ubuntu on mine (running on top of VirtualBox), but it never operated very satisfactorily - Oolite was only playable in a tiny window and stuttered horrendously.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
sharpenedblade
Competent
Competent
Posts: 41
Joined: Thu Nov 09, 2023 11:05 pm

Re: Building on modern macos/xcode versions

Post by sharpenedblade »

Which version of Linux did you install?
Fedora on bare metal. I have a t2 (2018-2020 intel) mac so it needed a patched kernel and stuff, but after installing it works the same as a normal linux install. I think using a normal distro works on older intel macs without any patches, you can just download the ISO and install.
Was it difficult?
It should be pretty easy now, you just press a few buttons in the gui partitioning screen and everything mostly just works. Disclaimer: I maintain t2linux support for Fedora.
Hiran was good enough to talk me through installing Ubuntu on mine (running on top of VirtualBox), but it never operated very satisfactorily - Oolite was only playable in a tiny window and stuttered horrendously.
VMs usually don't have graphics acceleration, so any gui stuff is really slow. There are some hacky methods to get opengl acceleration in qemu, but they don't work on macos hosts. On my install thats running on real hardware it works fine and I haven't noticed any lag, even with a lot of OXPs.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

Does the latest Spidermonkey from Mozilla build on modern MacOS? If so (and I assume it must be possible since Firefox exists on Mac), then I see a long and meandering path to getting Oolite running involving:

1. Show that a Clang build can work on Linux (done but with 1.9 ABI, needs to be tried on 2.2 because that is an officially supported version and is more likely to be compatible with the modern Mac API)
2. Bring the Windows build up to date (done, undergoing testing)
3. Bring the Linux build up to date using similar dependencies to Windows (probably by way of a Flatpak build)
4. espeak-ng and pcaudiolib should work on MacOS (or at least I see support for Mac audio in the code)
5. Build and test Oolite on Linux with modern Spidermonkey (which is available in Debian packages for example)
6. If that can be made to work somehow, build Spidermonkey on Windows, then build and test Oolite. If that works, then there is hope for building Oolite on modern MacOS
7. Create cmake project as XCode project can be generated from there (done for the building part on Linux, but doesn't do package generation etc.)
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

Someone on GNUstep discussions pointed to: https://ports.macports.org/port/spidermonkey/. This is Spidermonkey 1.7 which was in Firefox version 3.5 which is hopefully fairly close to Firefox 4. I wonder if that could work with Oolite on modern Mac? It seems to be built successfully on Arm64: https://ports.macports.org/all_builds/? ... idermonkey
User avatar
Cholmondely
Archivist
Archivist
Posts: 6565
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Building on modern macos/xcode versions

Post by Cholmondely »

Is there anything I can do to help?

1) I'm not a developer/programmer and understand virtually nothing of these posts!

2) I'm using an older AppleMac (MacBook Air (2020) - CPU is 1.1 GHz Dual-Core Intel Core i3) and OS (Catalina - v.10.15.3). I've little interest in upgrading as it will wreck my version of Oolite!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

Cholmondely wrote: Tue Oct 21, 2025 8:35 pm
Is there anything I can do to help?

1) I'm not a developer/programmer and understand virtually nothing of these posts!

2) I'm using an older AppleMac (MacBook Air (2020) - CPU is 1.1 GHz Dual-Core Intel Core i3) and OS (Catalina - v.10.15.3). I've little interest in upgrading as it will wreck my version of Oolite!
One test that would be useful on the Intel based Mac is if https://ports.macports.org/port/spidermonkey/ which is also built for Intel works with Oolite. The problem is that I would not be able to guide you through the process as I have no knowledge of the Mac build. It would basically require getting the last working Mac build set up in XCode and replacing whatever Spidermonkey is linked with the one from macports. If Oolite still works, then there is a chance that on newer ARM64 Macs, that Oolite might be able to be built using the macports Spidermonkey.

As for getting current Oolite working on older Intel Macs, that should be easier than creating a new ARM64 build. In particular, if at some point we can move the build to cmake (which can generate an XCode project) instead of makefiles, then there will be build process consistency across Windows, Linux and Mac.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 7178
Joined: Wed Feb 28, 2007 7:54 am

Re: Building on modern macos/xcode versions

Post by another_commander »

mcarans wrote: Tue Oct 21, 2025 7:25 pm
Someone on GNUstep discussions pointed to: https://ports.macports.org/port/spidermonkey/. This is Spidermonkey 1.7 which was in Firefox version 3.5 which is hopefully fairly close to Firefox 4. I wonder if that could work with Oolite on modern Mac? It seems to be built successfully on Arm64: https://ports.macports.org/all_builds/? ... idermonkey
Spidermonkey 1.7 is the first JS engine used in Oolite before moving to the one we have now. It is not compatible with the later version and is also very, very, very slow compared to the JIT-enabled FF4 version. For me it's not worth the trouble.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

another_commander wrote: Wed Oct 22, 2025 5:16 am
mcarans wrote: Tue Oct 21, 2025 7:25 pm
Someone on GNUstep discussions pointed to: https://ports.macports.org/port/spidermonkey/. This is Spidermonkey 1.7 which was in Firefox version 3.5 which is hopefully fairly close to Firefox 4. I wonder if that could work with Oolite on modern Mac? It seems to be built successfully on Arm64: https://ports.macports.org/all_builds/? ... idermonkey
Spidermonkey 1.7 is the first JS engine used in Oolite before moving to the one we have now. It is not compatible with the later version and is also very, very, very slow compared to the JIT-enabled FF4 version. For me it's not worth the trouble.
That's good to know. Then the best option for Arm64 Mac is for someone to try to compile the FF4 Spidermonkey which given the FF3.5 one compiles on Arm64 seems like it might be possible.
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

I've done 1 from the list below:

1. Show that a Clang build can work on Linux (done but with 1.9 ABI, needs to be tried on 2.2 because that is an officially supported version and is more likely to be compatible with the modern Mac API)

Clang ABI 2.2 on Linux works which decreases the likelihood that a modern Mac build will run into deprecated functionality issues.
User avatar
Cholmondely
Archivist
Archivist
Posts: 6565
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Building on modern macos/xcode versions

Post by Cholmondely »

mcarans wrote: Sun Nov 02, 2025 7:23 pm
I've done 1 from the list below:

1. Show that a Clang build can work on Linux (done but with 1.9 ABI, needs to be tried on 2.2 because that is an officially supported version and is more likely to be compatible with the modern Mac API)

Clang ABI 2.2 on Linux works which decreases the likelihood that a modern Mac build will run into deprecated functionality issues.
The eminence...

If you can sort out the dreaded AppleMac (whether mine or the newer ones), I'd be delighted to treat you to a bottle!
Image
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 710
Joined: Sun Jun 20, 2010 6:00 pm

Re: Building on modern macos/xcode versions

Post by mcarans »

Clang ABI 2.2 also builds on Windows.
Post Reply