Do you want to run a 5G network in Apple Silicon 🖥️ ?
So you have got your new Apple Silicon powered machine 🖥️ (Macbook Pro / MacMini / MacStudio ) and you are super eager to bring up a 5GC and gNodeB Simulator. Lets see.. If you want to try open5gs in Mac based ARM systems, you have 2 approaches
- Install Natively in MacOS
- Install in a Virtual Machine - Which is what I prefer
Again within Virtualization, Currently there are 2 choices for Linux Virutalization in MacOS
- Use UTM - QEMU based virtualization manager that supports Apple Virtualization Kit for Advanced Usecases
- Use Virtuabox Developer preview - Which is way less performant based on my experience
Obviously. I chose to UTM. Here again there are multiple choices 1. Emulate x86 Linux OS within ARM 2. Virtualize a Linux ARM VM inside Apple Silicon
I tried both approach and here are my observations
- Emulating x86 inside ARM will make the open5GS and MongoDB installation smoother based on the APT package manager install, but it has very very poor emulation performance a. For this to work, you actually need Mongo DB running. But in my case, since UTM QEMU doesn’t support
AVX
instruction set emulation, MongoDB didn’t start and core dumped with
ILL (Illegal Instruction Set) Error.
- Next I tried with Linux ARM within Apple Silicon and after lot of trial & errors, this is what worked for me
- First, install Ubuntu 22.1 ARM based instance as a VM
- Next, install Mongo DB by adding the APT source
- Latest Mongo DB will fail with
libssl1.1
dependency and the great gurus of Ubuntu stopped supportinglibssl1.1
and moved tolibssl3
in Ubuntu, where Mongo DB requireslibssl1.1
. This is one of those Face Palm moments 🙈 in Opensource based ecosystems. You don’t know when & how the dependencies change and there is absolutely no trace. Here is where RH, Suse & Canonicals of the world will thrive since they do all required heavy lifting for the enterprise & telcos. Okay back to this topic… - Nevertheless some good opensource souls 👼🏻 have provided the arm64 port of
libssl1.1.so
here1 . - Install that. Then Mongo DB will install without any errors.
- Latest Mongo DB will fail with
- Okay so the next stop is installing Open5GS package in Ubuntu. This should be faily simple since Open5GS is available as part of standard
apt get
right? Well not easy.. If you try to check here, you will only seeamd64
packages. So this leaves us with the only option of building from source as noted in here2. However this step worked like a charm without any hiccups
Now I will go-ahead with UERANSIM on Linux ARM on Apple Silicon. Lets see how this goes. Stay tuned !
I also publish a newsletter where I share my techo adventures in the intersection of Telecom, AI/ML, SW Engineering and Distributed systems. If you like getting my post delivered directly to your inbox whenever I publish, then consider subscribing to my substack.
I pinky promise 🤙🏻 . I won’t sell your emails!