Running Miranda on an M1 Mac

Alex

Alex

Jan 09, 2023

Running Miranda on an M1 Mac

Is Miranda a dead language? Who knows, but I have to use it for my university module!

Everything needs to be recompiled to run natively on the new Apple Silicon chips, but Apple released Rosetta 2 which should theoretically be able to emulate Intel hardware to bridge the gap. Unfortunately, this didn't seem to work for Miranda.

Miranda only got 64-bit support in January 2020 so it's not surprising that they don't support Apple Silicon yet (in fact they still support Power PC which was the chip technology used before intel that Rosetta 1 was built for in 2006!)

Luckily they also released the source code for Miranda in 2020 so, thanks to the wonderous longevity of C, we can just compile it from source.

Compiling Miranda from source

Check it builds

First, visit the downloads page and click the link that says version 2.066(I couldn't get this link to work in Chrome for some reason, so if you're struggling try Safari).

Open up the README and you'll find some instructions.

To test whether the build is going to work, run these commands in the shell

make cleanup
make
./mira

You should see something like this

T h e M i r a n d a S y s t e m
version 2.066 last revised 31 January 2020
Copyright Research Software Ltd 1985-2020
World Wide Web: http://miranda.org.uk
new file script.m
for help type /h
Miranda

Build errors?

If this step failed then something is up with make.

Firstly, is it installed? Relevant StackOverflow

Beyond that? Google it!

Installing the build

The next part of the README says to run make install. This will likely throw an error complaining that you don't have permissions to copy a file to /usr/bin/mira.

My friend Tiago figured out to tweak the Makefile so the executable is installed to /usr/local/bin.

## Old
all: mira miralib/menudriver exfiles
#install paths relative to /
#for linux, MacOS X, Cygwin:
BIN=usr/bin
LIB=usr/lib#beware no spaces after LIB
MAN=usr/share/man/man1
...
## New
all: mira miralib/menudriver exfiles
#install paths relative to /
#for linux, MacOS X, Cygwin:
BIN=usr/local/bin
LIB=usr/local/lib#beware no spaces after LIB
MAN=usr/local/share/man/man1
...

Then run

make install

Reopen your terminal and run

mira

And you should see the same startup screen from earlier!