macOS Apache Directory Studio on the Apple M1

Apple M1 is an ARM-based system-on-chip (SoC) designed by Apple Inc., for its devices, like the MacBook, Mac Mini, iMac, iPad, etc. A system-on-chip (SoC) is an integrated circuit that contains components such as the CPU, GPU and other I/O interfaces.

Ish Sookun

2 min read

It took me a while to get familiar to macOS and its tools. Previously, I was a full-time "openSUSE on a Lenovo ThinkPad X1 Carbon" user. Now, I switch between the two.

The Apple M1 chip is a high-performance SoC that includes the CPU, GPU and Dynamic RAM (DRAM).

This blog post is about what I did to get Apache Directory Studio to run on the Apple M1 MacBook.

I use Apache Directory Studio to manage my OpenLDAP and 389 Directory Server instances. Apache Directory Studio requires Java to run and it is available for Linux, Windows and macOS (but only for the Intel x86_64 architecture). Therefore, when I moved most of my dev and sysadmin tools on my work MacBook, this one tool was still missing — until I found that Java x86_64 could be installed using Homebrew.

arch -x86_64 brew install oracle-jdk

What is Homebrew?

Homebrew is an open-source package management system that works on both macOS and Linux. I have never used it on Linux because most distributions have their own package management software.

On macOS, it is a life-saver.

Getting Apache Directory Studio

Once you have oracle-jdk set up, you can install Apache Directory Studio using the below mentioned command.

brew install apache-directory-studio

It couldn't be simpler than this.

Apache Directory Studio compiled for macOS x86_84 running on Apple M1

Notice the application kind is Intel. However, the application runs fine on the Apple M1, thanks to Rosetta 2.

For the x86_64 compiled apps to run on the Apple M1 machine, you need to have Rosetta 2. You can install it using the below mentioned command or macOS will prompt you to install it the first you run a x86_64 compiled application.

/usr/sbin/softwareupdate --install-rosetta

What is Rosetta?

Rosetta is a dynamic binary translator for macOS. It offers an application compatibility layer between different instruction set architectures. This means that Rosetta can translate binary instructions for one CPU architecture into another CPU architecture.

Thus, Rosetta 2 enables Intel compiled applications to run on the M1 chip, by translating the x86_64 CPU instructions to ARM64 CPU instructions.

I'm still trying to get used to this device and if you have tips for me, please send a word via Twitter, Facebook or LinkedIn or else an email to ishwon@opensuse.org.