feat(setup): install macOS Gazebo from a locked conda-forge environment

Homebrew rebuilds and drops the gz bottles whenever homebrew-core bumps
protobuf or abseil, which breaks the macOS Gazebo install until the pins
catch up. conda-forge keeps every package it has published, so
Tools/setup/macos/pixi.toml and its lock install the same gz, protobuf,
abseil, OpenCV and GStreamer binaries until the lock is updated on
purpose. OpenCV is the headless build, and GStreamer brings the good,
bad and ugly plugin sets the gz camera plugin's pipeline uses.

macos.sh installs the environment with pixi and loads it from the venv
activation through a small script, since pixi shell-hook would export
the installing shell's PATH. The build and the gz launch do not depend
on that activation: CMake searches the environment like it pins the
.venv Python, and px4-rc.gzsim sources gz_env.sh before it looks for
gz, which loads the environment when it is not already active and puts
its lib dir ahead of Homebrew's in the dyld fallback path.
conda-forge's gz-transport13 does not pull in cppzmq, so the manifest
lists it.

The osrf/simulation pin, the protobuf pin and the weekly bot that
refreshed them are removed. The homebrew-core commit moves into
homebrew-pins.txt unchanged.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche committed 2026-09-26 15:12:00 -07:00
1 parent de9c69316e
commit a8b0e91ebe
15 files changed
+11219 -584

No files matched your search

+12 -1
View File
@@ -24,10 +24,21 @@ export GZ_SIM_SERVER_CONFIG_PATH=$PX4_GZ_SERVER_CONFIG
# gobject-introspection typelibs reference libs by bare basename,
# which fails to resolve unless we add Homebrew's lib dir to the
# fallback search path. Prepend so it beats any system-placed libs,
# and preserve any existing value the user has set.
# and preserve any existing value the user has set. With the Gazebo
# environment from Tools/setup/macos/pixi.toml loaded, its lib dir goes
# first, so a leftover Homebrew Gazebo is never loaded next to it.
if [ "$(uname)" = "Darwin" ]; then
# Load the Gazebo environment from Tools/setup/macos/pixi.toml when the
# venv that normally loads it was not activated, so gz is on PATH.
if [ -z "$CONDA_PREFIX" ] && [ -f "@PX4_SOURCE_DIR@/.venv/bin/px4-gz-env.sh" ]; then
. "@PX4_SOURCE_DIR@/.venv/bin/px4-gz-env.sh"
fi
HOMEBREW_PREFIX=${HOMEBREW_PREFIX:-$(brew --prefix 2>/dev/null)}
if [ -n "$HOMEBREW_PREFIX" ]; then
export DYLD_FALLBACK_LIBRARY_PATH="$HOMEBREW_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_PATH}"
fi
if [ -n "$CONDA_PREFIX" ]; then
export DYLD_FALLBACK_LIBRARY_PATH="$CONDA_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_PATH}"
fi
fi