How to Build and Install ROS 2 Jazzy on an ARM Mac
Here are my detailed instructions on how I got ROS 2 Jazzy Jalisco running on my M3 Mac without Rosetta.
For reference, here are some links that helped me get started:
A Note on Homebrew
If you migrated your Homebrew setup from an Intel Mac to an ARM Mac (as I did), you’re going to have some issues resulting from
- the architecture changing, and
- having some packages installed in
/usr/local
(the Intel Mac’sbrew --prefix
) and some installed in/opt/homebrew
(the ARM Mac’sbrew --prefix
).
Stay tuned on how I solved these issues.
Directory Layout
I suggest making a root directory that you can then put your ros2_jazzy
folder and your venv
folder.
|
|
I’m going to refer to the root directory as outer_dir
from now on.
Python 3.11
Install Python 3.11 using
|
|
Virtual environment
Use whatever virtual environment setup you’re comfortable with. You don’t need to use direnv. (I didn’t.) You don’t even have to put the venv folder in the root folder like I suggested above.
While I used virtualfish,
|
|
works perfectly fine.
Make sure you
|
|
before starting the next section.
Install prerequisites
Follow the ROS 2 Jazzy documentation section on install prerequisites. You do not need to disable System Integrity Protection (SIP).
Once you’re done,
|
|
Clone ROS
You’ll want to create a workspace and clone all ROS repositories:
|
|
Build ROS
|
|
An Incomplete List of Errors and Solutions
rviz_ogre_vendor
fatal error: 'Availability.h' file not found
I solved this by
- reinstalling XCode, and
- reinstalling XCode Command Line Tools:
1 2
sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install
<insert package here>
is giving you an undefined symbols for architecture
error
Double check that you don’t have the offending package in /usr/local/Cellar
. If you do have it, just
|
|
Can’t find Python errors
Deactivate and reactivate your virtual environment. (Have you tried turning it off, then on again?)
I hope this helps!
