From 1bfb8f2cb7e4721f802ae06f1c9e758724fda279 Mon Sep 17 00:00:00 2001 From: Mooneer Salem Date: Wed, 2 Sep 2026 18:13:56 -0700 Subject: [PATCH] CI: Use macos-26 for running tests (#1478) * Remove deprecated macos-14, test only on macos-26 due to GitHub issues. * Work around dyld error when enabling sanitizers. * Readd macOS 14 and 15 to tests. * Add PR #1478 to changelog. --- .github/workflows/cmake-macos.yml | 4 ++-- USER_MANUAL.md | 1 + src/CMakeLists.txt | 1 + src/clean-duplicate-rpaths.sh | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 src/clean-duplicate-rpaths.sh diff --git a/.github/workflows/cmake-macos.yml b/.github/workflows/cmake-macos.yml index 2afde805..4525d038 100644 --- a/.github/workflows/cmake-macos.yml +++ b/.github/workflows/cmake-macos.yml @@ -15,7 +15,7 @@ env: jobs: lint: - runs-on: macos-15 + runs-on: macos-26 steps: - uses: actions/checkout@v6 @@ -61,7 +61,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-15] # ARM64 + os: [macos-26] # ARM64 sanitizer: [WITH_ASAN=0, WITH_ASAN=1, WITH_TSAN=1, WITH_UBSAN=1] runs-on: ${{ matrix.os }} diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 7fea1e0f..fe9e0b16 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -952,6 +952,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes 1. Bugfixes: * Add logic to prevent FIFO sizes that are too small to allow TX thread to function. (PR #1474) * Fix RX/TX level-meter gauge contamination. (PR #1475) - thanks @barjac! + * macOS: Fix dyld error on startup when enabling sanitizers in build. (PR #1478) ## V2.4.0 August 2026 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 208b888e..e341da6a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -215,6 +215,7 @@ if(APPLE) POST_BUILD COMMAND rm -rf dist_tmp FreeDV.dmg || true COMMAND DYLD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src:${portaudio_BINARY_DIR}:${DYLD_LIBRARY_PATH} ${CMAKE_SOURCE_DIR}/macdylibbundler/dylibbundler ARGS -od -b -x FreeDV.app/Contents/MacOS/FreeDV -d FreeDV.app/Contents/libs -p @loader_path/../libs/ -i /usr/lib -s ${CODEC2_BUILD_DIR}/src -s ${CMAKE_BINARY_DIR}/codec2_build/src ${PORTAUDIO_BUNDLE_ARG} -s ${rade_BINARY_DIR}/src -s `dirname ${CLANG_SANITIZER_FILE}` -ns + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/clean-duplicate-rpaths.sh FreeDV.app/Contents/MacOS/FreeDV COMMAND cp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/freedv.icns FreeDV.app/Contents/Resources COMMAND rm ARGS -rf FreeDV.app/Contents/Frameworks COMMAND mkdir ARGS FreeDV.app/Contents/Frameworks diff --git a/src/clean-duplicate-rpaths.sh b/src/clean-duplicate-rpaths.sh new file mode 100755 index 00000000..025f4b47 --- /dev/null +++ b/src/clean-duplicate-rpaths.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in `otool -l $1 | grep -A2 LC_RPATH | grep path | awk '{ print $2; }' | tail +2`; do + install_name_tool -delete_rpath "$i" $1 +done