Installing gazebo on M1 ventura (13.1)

Trying to install gazebo on M1 ventura
I fixed SH256 problem related with gz-transport12 by replacing ssh256 key but installation fails because of sdformat13 build error.

brew install -vd gz-garden

I tried build and install sdformat13 from source and it is successfully installed. But when I try with brew it fails with error

[ 18%] Linking CXX shared library ../lib/libsdformat13.dylib
cd "/tmp/sdformat13-20230122-86620-17i65yt/sdformat-13.3.0~pre1/build/src" && /opt/homebrew/Cellar/cmake/3.25.2/bin/cmake -E cmake_link_script CMakeFiles/sdformat13.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/clang++  -stdlib=libc++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -dynamiclib -Wl,-headerpad_max_install_names  -Wl,-undefined -Wl,dynamic_lookup -compatibility_version 13.0.0 -current_version 13.3.0 -o "../lib/libsdformat13.13.3.0~pre1.dylib" -install_name @rpath/libsdformat13.13.dylib CMakeFiles/sdformat13.dir/Actor.cc.o CMakeFiles/sdformat13.dir/AirPressure.cc.o CMakeFiles/sdformat13.dir/Altimeter.cc.o CMakeFiles/sdformat13.dir/Atmosphere.cc.o CMakeFiles/sdformat13.dir/Box.cc.o CMakeFiles/sdformat13.dir/Camera.cc.o CMakeFiles/sdformat13.dir/Capsule.cc.o CMakeFiles/sdformat13.dir/Collision.cc.o CMakeFiles/sdformat13.dir/Console.cc.o CMakeFiles/sdformat13.dir/Converter.cc.o CMakeFiles/sdformat13.dir/Cylinder.cc.o CMakeFiles/sdformat13.dir/Element.cc.o CMakeFiles/sdformat13.dir/Ellipsoid.cc.o CMakeFiles/sdformat13.dir/Error.cc.o CMakeFiles/sdformat13.dir/Exception.cc.o CMakeFiles/sdformat13.dir/Filesystem.cc.o CMakeFiles/sdformat13.dir/ForceTorque.cc.o CMakeFiles/sdformat13.dir/Frame.cc.o CMakeFiles/sdformat13.dir/FrameSemantics.cc.o CMakeFiles/sdformat13.dir/Geometry.cc.o CMakeFiles/sdformat13.dir/Gui.cc.o CMakeFiles/sdformat13.dir/Heightmap.cc.o CMakeFiles/sdformat13.dir/Imu.cc.o CMakeFiles/sdformat13.dir/InterfaceElements.cc.o CMakeFiles/sdformat13.dir/InterfaceFrame.cc.o CMakeFiles/sdformat13.dir/InterfaceJoint.cc.o CMakeFiles/sdformat13.dir/InterfaceLink.cc.o CMakeFiles/sdformat13.dir/InterfaceModel.cc.o CMakeFiles/sdformat13.dir/InterfaceModelPoseGraph.cc.o CMakeFiles/sdformat13.dir/Joint.cc.o CMakeFiles/sdformat13.dir/JointAxis.cc.o CMakeFiles/sdformat13.dir/Lidar.cc.o CMakeFiles/sdformat13.dir/Light.cc.o CMakeFiles/sdformat13.dir/Link.cc.o CMakeFiles/sdformat13.dir/Magnetometer.cc.o CMakeFiles/sdformat13.dir/Material.cc.o CMakeFiles/sdformat13.dir/Mesh.cc.o CMakeFiles/sdformat13.dir/Model.cc.o CMakeFiles/sdformat13.dir/NavSat.cc.o CMakeFiles/sdformat13.dir/Noise.cc.o CMakeFiles/sdformat13.dir/OutputConfig.cc.o CMakeFiles/sdformat13.dir/Param.cc.o CMakeFiles/sdformat13.dir/ParamPassing.cc.o CMakeFiles/sdformat13.dir/ParserConfig.cc.o CMakeFiles/sdformat13.dir/ParticleEmitter.cc.o CMakeFiles/sdformat13.dir/Pbr.cc.o CMakeFiles/sdformat13.dir/Physics.cc.o CMakeFiles/sdformat13.dir/Plane.cc.o CMakeFiles/sdformat13.dir/Plugin.cc.o CMakeFiles/sdformat13.dir/Polyline.cc.o CMakeFiles/sdformat13.dir/PrintConfig.cc.o CMakeFiles/sdformat13.dir/Root.cc.o CMakeFiles/sdformat13.dir/SDF.cc.o CMakeFiles/sdformat13.dir/SDFExtension.cc.o CMakeFiles/sdformat13.dir/Scene.cc.o CMakeFiles/sdformat13.dir/SemanticPose.cc.o CMakeFiles/sdformat13.dir/Sensor.cc.o CMakeFiles/sdformat13.dir/Sky.cc.o CMakeFiles/sdformat13.dir/Sphere.cc.o CMakeFiles/sdformat13.dir/Surface.cc.o CMakeFiles/sdformat13.dir/Types.cc.o CMakeFiles/sdformat13.dir/Utils.cc.o CMakeFiles/sdformat13.dir/Visual.cc.o CMakeFiles/sdformat13.dir/World.cc.o CMakeFiles/sdformat13.dir/XmlUtils.cc.o CMakeFiles/sdformat13.dir/gz.cc.o CMakeFiles/sdformat13.dir/parser.cc.o CMakeFiles/sdformat13.dir/parser_urdf.cc.o CMakeFiles/sdformat13.dir/EmbeddedSdf.cc.o  /opt/homebrew/lib/libgz-math7.7.1.0.dylib /opt/homebrew/lib/libgz-utils2.2.0.0.dylib /opt/homebrew/Cellar/tinyxml2/9.0.0/lib/libtinyxml2.dylib /opt/homebrew/Cellar/tinyxml2/9.0.0/lib/libtinyxml2.dylib /opt/homebrew/opt/urdfdom/lib/liburdfdom_sensor.dylib /opt/homebrew/opt/urdfdom/lib/liburdfdom_sensor.dylib /opt/homebrew/opt/urdfdom/lib/liburdfdom_model_state.dylib /opt/homebrew/opt/urdfdom/lib/liburdfdom_model.dylib /opt/homebrew/opt/urdfdom/lib/liburdfdom_world.dylib /opt/homebrew/Cellar/console_bridge/1.0.2/lib/libconsole_bridge.dylib 
cd "/tmp/sdformat13-20230122-86620-17i65yt/sdformat-13.3.0~pre1/build/src" && /opt/homebrew/Cellar/cmake/3.25.2/bin/cmake -E cmake_symlink_library "../lib/libsdformat13.13.3.0~pre1.dylib" ../lib/libsdformat13.13.dylib ../lib/libsdformat13.dylib
[ 18%] Built target sdformat13
make: *** [all] Error 2
/opt/homebrew/Library/Homebrew/shims/shared/git --version
/opt/homebrew/Library/Homebrew/shims/shared/curl --version
/opt/homebrew/Library/Homebrew/ignorable.rb:29:in `block in raise'
BuildError: Failed executing: make install
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 1
==> Temporary files retained at:
/private/tmp/sdformat13-20230122-86620-17i65yt

==> Formula
Tap: osrf/simulation
Path: /opt/homebrew/Library/Taps/osrf/homebrew-simulation/Formula/sdformat13.rb
==> Configuration
HOMEBREW_VERSION: 3.6.20-14-g31ed690
ORIGIN: https://github.com/Homebrew/brew
HEAD: 31ed6906f927ec7c63b72c6f5c7d72ea6baa2fb4
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5a2bc0f10ddbe1a32843652e9532fa367f2c3a46
Core tap last commit: 6 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.NYpv7TrmAu/org.xquartz:0
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Library/Developer/CommandLineTools/usr/bin/git
/opt/homebrew/Library/Homebrew/shims/shared/curl --version
Curl: 7.85.0 => /usr/bin/curl
macOS: 13.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: N/A
Rosetta 2: false
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j10
CMAKE_PREFIX_PATH: /opt/homebrew/opt/openssl@1.1:/opt/homebrew/opt/readline:/opt/homebrew/opt/sqlite:/opt/homebrew/opt/ruby:/opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /opt/homebrew/opt/python@3.10/Frameworks
PKG_CONFIG_PATH: /opt/homebrew/opt/gz-cmake3/lib/pkgconfig:/opt/homebrew/opt/gz-utils2/lib/pkgconfig:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/xz/lib/pkgconfig:/opt/homebrew/opt/python@3.10/lib/pkgconfig:/opt/homebrew/opt/libyaml/lib/pkgconfig:/opt/homebrew/opt/ruby/lib/pkgconfig:/opt/homebrew/opt/gz-math7/lib/pkgconfig:/opt/homebrew/opt/tinyxml2/lib/pkgconfig:/opt/homebrew/opt/console_bridge/lib/pkgconfig:/opt/homebrew/opt/tinyxml/lib/pkgconfig:/opt/homebrew/opt/urdfdom_headers/lib/pkgconfig:/opt/homebrew/opt/urdfdom/lib/pkgconfig:/opt/homebrew/opt/pybind11/share/pkgconfig:/opt/homebrew/opt/eigen/share/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/cmake/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/pybind11/bin:/opt/homebrew/opt/doxygen/bin:/opt/homebrew/opt/gdbm/bin:/opt/homebrew/opt/openssl@1.1/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/python@3.10/bin:/opt/homebrew/opt/ruby/bin:/opt/homebrew/opt/gz-tools2/bin:/opt/homebrew/opt/urdfdom/bin:/opt/homebrew/opt/python@3.10/libexec/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: osrf/simulation/sdformat13 13.3.0~pre1 did not build
Logs:
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/00.options.out
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/01.cmake.cc
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/01.cmake
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/02.make.cc
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/build
     /Users/serkantas/Library/Logs/Homebrew/sdformat13/02.make
Do not report this issue to Homebrew/brew or Homebrew/core!

/opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/3.6.20-14-g31ed690\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.1\)\ curl/7.85.0 --header Accept-Language:\ en --retry 3 --location https://api.github.com/search/issues\?q=sdformat13\+repo\%3Aosrf\%2Fhomebrew-simulation\+state\%3Aopen\+in\%3Atitle\&per_page=100 --header Accept:\ application/vnd.github\+json --write-out '
'\%\{http_code\} --header Authorization:\ token\ ****** --header X-GitHub-Api-Version:2022-11-28 --dump-header /private/tmp/github_api_headers20230122-86245-1vd0g4z
2 Likes

New here. Just installed Gazebo on my MacBook Pro M1 with Ventura 13.2.1. When I run
gz sim shapes.sdf -g
A Gazebo icon appears in my dock labeled “ruby.” Then nothing. Help?

On macOS you need to run two terminals, one for the server, one for the GUI.

Terminal 1:

gz sim -s shapes.sdf

Terminal 2:

gz sim -g

The reason is that the fork behaviour used in ruby to run both server and gui from a single command is not supported in macOS.

Thank you for the reply! Now, when I try that, I get:

Error while loading the library [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-physics-system.dylib]: dlopen(/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-physics-system.dylib, 0x0085): Library not loaded: @rpath/libgz-sim7.7.dylib

Referenced from: <5062B7BA-E84F-3264-97E5-55ABAD17F2F5> /opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim7-physics-system.7.4.0.dylib

Reason: tried: '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/usr/lib/libgz-sim7.7.dylib' (no such file, not in dyld cache), (security policy does not allow @ path expansion)

**[Err] [SystemLoader.cc:140] Failed to load system plugin: (Reason: No plugins detected in library)**

**- Requested plugin name: [gz::sim::systems::Physics]**

**- Requested library name: [gz-sim-physics-system]**

**- Resolved library path: [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-physics-system.dylib]**

Error while loading the library [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-user-commands-system.dylib]: dlopen(/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-user-commands-system.dylib, 0x0085): Library not loaded: @rpath/libgz-sim7.7.dylib

Referenced from: <19421C98-0703-3171-B11E-9423B4FB0316> /opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim7-user-commands-system.7.4.0.dylib

Reason: tried: '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/usr/lib/libgz-sim7.7.dylib' (no such file, not in dyld cache), (security policy does not allow @ path expansion)

**[Err] [SystemLoader.cc:140] Failed to load system plugin: (Reason: No plugins detected in library)**

**- Requested plugin name: [gz::sim::systems::UserCommands]**

**- Requested library name: [gz-sim-user-commands-system]**

**- Resolved library path: [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-user-commands-system.dylib]**

Error while loading the library [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib]: dlopen(/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib, 0x0085): Library not loaded: @rpath/libgz-sim7.7.dylib

Referenced from: <AC5C3527-11C3-3B58-A78C-6DB3A6F02583> /opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim7-scene-broadcaster-system.7.4.0.dylib

Reason: tried: '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/usr/lib/libgz-sim7.7.dylib' (no such file, not in dyld cache), (security policy does not allow @ path expansion)

**[Err] [SystemLoader.cc:140] Failed to load system plugin: (Reason: No plugins detected in library)**

**- Requested plugin name: [gz::sim::systems::SceneBroadcaster]**

**- Requested library name: [gz-sim-scene-broadcaster-system]**

**- Resolved library path: [/opt/homebrew/Cellar/gz-sim7/7.4.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib]**

Hi, The error indicate no plugin detected. How can I fix it ? Thanks

Any resolution to this? More than a year later, still get same error. This is a different error than the SIP and RPATH error. For my system (M1 Mac) everything appears to have been built correctly, and the referenced dylib libraries are present. The error also indicates the correct path to where the files are, but it does not appear to load them.

In my case, this error relates to the 7.5 version of the files as follows:

Error while loading the library [/opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib]: dlopen(/opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib, 0x0085): Library not loaded: @rpath/libgz-sim7.7.dylib

Referenced from: <58106C21-3FE4-3C0B-BC26-8E8D6ED37A5C> /opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/libgz-sim7-scene-broadcaster-system.7.5.0.dylib

Reason: tried: '/opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/../lib/libgz-sim7.7.dylib' (no such file), '/opt/homebrew/Cellar/gz-plugin2/2.0.1/lib/../lib/libgz-sim7.7.dylib' (no such file), '/usr/local/lib/libgz-sim7.7.dylib' (no such file), '/usr/lib/libgz-sim7.7.dylib' (no such file, not in dyld cache)

[Err] [SystemLoader.cc:140] Failed to load system plugin: (Reason: No plugins detected in library)

- Requested plugin name: [gz::sim::systems::SceneBroadcaster]

- Requested library name: [gz-sim-scene-broadcaster-system]

- Resolved library path: [/opt/homebrew/Cellar/gz-sim7/7.5.0/lib/gz-sim-7/plugins/libgz-sim-scene-broadcaster-system.dylib]

There have been some updates in https://github.com/gazebosim/gz-sim/issues/1987 about this. Please check that issue for some workarounds.

1 Like

Also:

The osrf/homebrew-simulation patch may not wind up being the right way to catch this but I’ve verified it works on macOS Ventura. There are a couple of remaining issues with Qt though, so a build from source with patches mentioned in the links above will give you a more complete working version in the meanwhile (otherwise you will need to disable some of the GUI plugins).

Hello. My issue is a bit different. I get the following error when trying to run Gazebo:

Library error for [/opt/homebrew/Cellar/gz-sim7/7.6.0_2/lib/libgz-sim7-gz.7.6.0.dylib]: can't load /opt/homebrew/Cellar/gz-sim7/7.6.0_2/lib/libgz-sim7-gz.7.6.0.dylib

If this script was executed with /usr/bin/ruby, this error may be caused by
macOS System Integrity Protection. One workaround is to use a different
version of ruby, for example:
    brew install ruby
and add the following line to your shell profile:
    export PATH=/usr/local/opt/ruby/bin:$PATH
If you are using a colcon workspace, please ensure that the setup script
has properly set the DYLD_LIBRARY_PATH environment variables.

I have reinstalled ruby and ran the export command, and yet I still get this. any suggestions on how to fix it?

Hi there!

Can you try this section:

ulimit -n unlimited
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap osrf/simulation
brew install gz-harmonic

FYI, Garden is only supported on M1+ at the moment as far as I know

also if the snippet above did not work, try restart and re-do the #2 to #4. Skip the ulimit part.

1 Like

Yeah that worked! Thank you so much!

1 Like