a Pointer to J
Wiki · Operating systems

macOS Tips

My 2¢ while using a MacBook Pro: Safari, the keyboard, an Ada toolchain on Apple silicon, and a ChatGPT app that wouldn't load.

Started Apr 4, 2024Updated Oct 23, 2026Revision 44 sections · 4 minPage history

Ada toolchain

added Jun 10, 2024 · edited Oct 23, 2026

Work in Progress, but the important tips are already included!

Build Toolchains

You'll need basic build tools such as gprbuild and gnatmake, and those come with this GCC build.

On Apple silicon you should use simonjwright/distributing-gcc.

Download the newest release whose name ends in aarch64 (not the -cross ones): a .pkg installer.

Follow the wiki. But basically you'll do

  • Right Click the downloaded file to install
  • Add the path /opt/gcc-VERSION-aarch64/bin to $PATH

Then, you can check the installation with $ which gprbuild. Output should show where it was installed (default: /opt/gcc-VERSION-aarch64/bin).

Test

You can type below under the filename of 'hello.adb'

with Ada.Text_IO;
use Ada.Text_IO;

procedure Hello is
begin
   Put_Line ("Hello WORLD!");
end Hello;

And now you can

$ gcc -c hello.adb
$ gnatbind hello
$ gnatlink hello
$ ./hello
> Hello WORLD!

OR, simply

$ gnatmake hello.adb
$ ./hello
> Hello WORLD!

Build Alire, If you want

Easier today: Alire publishes a ready-made alr for Apple silicon (alr-VERSION-bin-aarch64-macos.zip on its releases page), and alr toolchain --select can also install a GNAT for Apple silicon itself. Building it yourself still works:

You can clone alire-project/alire.

(You may want to switch to a release branch, e.g. $ git switch release/2.1)

And then, since zsh is macOS's default shell (bash is there too, but an old 3.2), run $ ALIRE_OS=macos gprbuild -j0 -p -P alr_env.

Lastly, your alr binary is generated under the git repository's bin directory. So you have to edit the path.

(In the future, when a new release comes out, you can simply switch to the release branch and run alr build)

MOST IMPORTANTLY, You should run $ alr toolchain --select and select gnat version gnat_external=VERSION [Detected at /opt/gcc-VERSION-aarch64/bin/gnat] one, which we installed above. Also, for the gprbuild, gprbuild=VERSION [Detected at /opt/gcc-14.1.0-aarch64/bin/gprbuild].

Test

Move to the desired dev directory, and run

$ alr get hello
$ cd hello[tab]
$ alr run
> Hello, World!