[macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

Post Reply
Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

[macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Jordach » Post

Preamble

With neoascetic's last daily macOS build in December 2020, there's been a hole in available macOS builds. Since my procurement of an M1 MacBook Air with above average specifications, and with how homebrew is actively hostile against any multi-arch setups like Big Sur universal binaries. I decided to uninstall homebrew for good, and manually compile every Minetest dependancy with CMake. It's doable, just an exercise in becoming one with the Gentoo.

tl;dr Homebrew sucks and won't support the next generation of Apple hardware.

Pre-Built Binaries:

https://www.dropbox.com/sh/jt3el1tn6s1y ... NKQh5Csu-a

Ask me if you need a more recent build in thread or via Direct Message / Private Message.

Note on Universal Binaries: these will only run on Big Sur Macs. They will not run on: Sierra, High Sierra, Mojave and Catalina. If you have a Mac that was made within the last 8-9 years (around 2013) it probably supports Big Sur.

Zipballs with Mavericks, and come with LuaJIT by default; can be run on Macs as old as 2007.

If you're struggling to find which is which, this button hides the full filenames.

Image

If you can't install Big Sur because of an obsoleted Mac, no worries, I wrote a guide on doing such with Homebrew under an x64 or ARM64/M1 environment.

Building Minetest With Homebrew

Opening the Terminal:
Press Command + Space then with Spotlight open, type Terminal, and press enter. It should launch a terminal window.

Installing Homebrew and Xcode-Tools:
Otherwise, you're not compiling.

https://brew.sh

With brew and it's requirements satisfied, we move onto the installing of dependancies.

Code: Select all

brew install cmake freetype gettext jpeg libogg libvorbis
There are two steps to take depending on system architecture; if you have Intel or AMD Ryzen Hackintosh do the following:

Code: Select all

brew install luajit
If you have ARM64 or M1, use the following command:

Code: Select all

brew install lua@5.1
After this weird step, everything else is processor architecture independent, so let's get to compiling Minetest's Irrlicht fork as well as Minetest. A recommendation is to create a new folder in your home folder named "development" or whatever you want to call it as it keeps it cleaner for future programming and compiling efforts. In this case, you'd do the following before the next two major parts:

Code: Select all

mkdir Development
cd Development
Downloading and compiling IrrlichtMT:

Code: Select all

git clone https://github.com/minetest/irrlicht.git
cd irrlicht
cmake . -DBUILD_SHARED_LIBS=FALSE
make -j$(nproc)
cd ..
Downloading and compiling Minetest:

Code: Select all

git clone https://github.com/minetest/minetest.git
cd minetest
cmake . -DRUN_IN_PLACE=FALSE -DIRRLICHT_INCLUDE_DIR="../irrlicht/include" -DIRRLICHT_LIBRARY="../irrlicht/lib/OSX/libIrrlichtMt.a"
make package -j$(nproc)
Minetest when used with make package will automatically create a zip archive named minetest-5.5.0-dev-osx.zip. Or similar, depending on the version of minetest being compiled.

Known Issues:

Camera spins around super fast in game; since Mojave, apps now have to request permission to be able to grab the mouse properly. To fix this, click the Security and Privacy under System Preferences.

Once you've navigated to Security and Privacy, you'll want to click the header named Privacy.

Before you can grant Minetest permissions, you will want to click the lock to make changes, which on Big Sur (and earlier where supported); will ask for TouchID or your Apple Watch for confirmation; otherwise macOS will ask for your user password to make changes.

Here's what the window will look like:
Image

Of all the options given to you, click on Accessibility and Input Monitoring. There should be a little button with a +. Click that and navigate to where the Minetest.app resides. Once added you will have to add a second check box to the left of it to fully grant permission. With both of these steps completed it should work fine.

If this step is a bit confusing, pause this video frequently or play it at 0.25x rate.

https://www.youtube.com/watch?v=QkfGxl-yrzc
Last edited by Jordach on Fri Jul 30, 2021 00:54, edited 2 times in total.

Emojiminetest
Member
Posts: 31
Joined: Sat Jun 06, 2020 00:21
GitHub: Emojigit
IRC: Cato Yiu
In-game: Cato

Re: [macOS Big Sur] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Emojiminetest » Post

I can neither upgrade my mac, install XCode them compile it myself, nor installing homebrew, but I want to run MT 5.4.1 (or later) on my mac. What can I do?

blocker
Member
Posts: 36
Joined: Fri Jan 08, 2021 06:14
Location: Germany

Re: [macOS Big Sur] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by blocker » Post

i can give you my MT 5.4.0 for Mac, if you want.
https://drive.google.com/file/d/1OLF4hN ... sp=sharing

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

Re: [macOS Big Sur + Mavericks] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Jordach » Post

I recently fixed my build script to support Mavericks (macOS 10.9) as well as ensure it comes with LuaJIT as standard.

Builds marked with Universal are designed for Big Sur and later, while builds marked as Intel are designed for Mavericks and later. This build has been confirmed working on a Catalina Mac.

Dropbox likes to hide the full filenames for absolutely no reason, so look for this button to reveal the full filenames.

Image

FnControlOption
New member
Posts: 2
Joined: Mon Sep 14, 2020 04:40

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by FnControlOption » Post

Jordach wrote:
Mon Apr 05, 2021 23:38
There are two steps to take depending on system architecture; if you have Intel or AMD Ryzen Hackintosh do the following:

Code: Select all

brew install luajit
If you have ARM64 or M1, use the following command:

Code: Select all

brew install lua@5.1
After this weird step, everything else is processor architecture independent
Does luajit-openresty work? It has bottles for both Intel and Apple Silicon.

Crowleek
New member
Posts: 1
Joined: Thu Feb 10, 2022 22:41

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Crowleek » Post

Hello,

I have compiled the app off stable-5 branch. When launching the app I see initial screen with menu, not moving and the macOS rainbow spinner cursor spinning. The whole UI freezes indefinitely. I have also tried to run prebuilt binaries from the dropbox link of the parent post with the same result. I have MacBook m1 with Monterey 12.2. Any ideas how to fix this? Thanks in advance!

johnolinda_caravel
New member
Posts: 2
Joined: Wed Dec 22, 2021 15:19
GitHub: johnolinda

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by johnolinda_caravel » Post

I've also been working to compile newer versions, particularly the stable versions. I am able to compile 5.5.0 without incident, but I am getting signature errors when I attempt to run the .app file produced by the package option in make. Running the .app from the CPACK directory works fine. However, when I launch the app, it freezes. After force quit and running again, it gets to the main menu but then freezes again.

johnolinda_caravel
New member
Posts: 2
Joined: Wed Dec 22, 2021 15:19
GitHub: johnolinda

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by johnolinda_caravel » Post

Homebrew now ships 5.5.0 as an Apple Silicon binary which demonstrates the same freezing behavior, so it doesn't look like the way the self-compiled version is behaving is unusual.

Tesseract
New member
Posts: 6
Joined: Thu Dec 16, 2021 21:34

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Tesseract » Post

I've found a strange problem with movement and interacting in 5.5.0: if I hold the mouse button to repeat some action (e.g. mining or digging), rotate my view, then release the mouse button, I'll keep doing that same action for a few seconds after I let go. It's easy to replicate, as it happens every time. The easiest way to test this is to make a new flat world in creative mode. Look down a bit and start digging, then move the view about 90 degrees and let go. You'll keep digging for three or four blocks after you let go. The extra actions seem to scale with the distance the mouse moved: a small flick gives only one extra dig, while a large pan gives many more.

I have an Intel Mac running Mjoave (10.14.6). I haven't been able to build Minetest using homebrew, but I've been using the version from Macports, which I can build without difficulty. That version showed this bugged behavior, but the pre-built binary available from the first link in this thread also showed the same thing, so the issue seems to be general to 5.5.0, not any particular way of building it. Fortunately I kept a copy of 5.4.1, which does not show this behavior.

Has anyone else encountered this behavior?

rob123
Member
Posts: 47
Joined: Wed Mar 03, 2021 07:15
GitHub: qwerty123a2
In-game: joe and joergeg

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by rob123 » Post

Tesseract wrote:
Fri Jun 10, 2022 18:49
I've found a strange problem with movement and interacting in 5.5.0: if I hold the mouse button to repeat some action (e.g. mining or digging), rotate my view, then release the mouse button, I'll keep doing that same action for a few seconds after I let go. It's easy to replicate, as it happens every time. The easiest way to test this is to make a new flat world in creative mode. Look down a bit and start digging, then move the view about 90 degrees and let go. You'll keep digging for three or four blocks after you let go. The extra actions seem to scale with the distance the mouse moved: a small flick gives only one extra dig, while a large pan gives many more.

I have an Intel Mac running Mjoave (10.14.6). I haven't been able to build Minetest using homebrew, but I've been using the version from Macports, which I can build without difficulty. That version showed this bugged behavior, but the pre-built binary available from the first link in this thread also showed the same thing, so the issue seems to be general to 5.5.0, not any particular way of building it. Fortunately I kept a copy of 5.4.1, which does not show this behavior.

Has anyone else encountered this behavior?
i have, only on my mac. It seems to be a hardware issue due to the fact it also happening in linux.

Tesseract
New member
Posts: 6
Joined: Thu Dec 16, 2021 21:34

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by Tesseract » Post

For what it's worth, I found the same problem on a Mac running 12.4. It's not just the mouse button that sticks; moving in a direction while holding the button, turning around, then letting go of everything means I'll keep digging and moving for several seconds.

ulrich1000
New member
Posts: 2
Joined: Fri Jun 24, 2022 12:15
In-game: uli1000

Re: [macOS Big Sur, Mavericks w/ JIT] Jordach's Universal Binaries + Homebrew Self Compilation Guide

by ulrich1000 » Post

Hi,
I love minetest and use it in education a lot. But as a Mac user I repeatedly ran into the problem, that installation with homebrew is to complicated for workshop participants (and if I am in a hurry me).
I found this lovely site https://github.com/neoascetic/minetest/releases with just a file you need to click on to install Minetest on the Mac. Works like a charm but the last build is from 2020.
Could anyone create a newer build.
And could you link it on https://www.minetest.net/downloads/ so other can have to opportunity to use that easy solution to install minetest without installing two other programs they might not use otherwise and having to use terminal, which they might not be familiar with.

Thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest