From 8938bd3557c53b6af4ce63f3ca4170ee03e3c7ce Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Mon, 25 May 2026 15:44:30 +0300 Subject: [PATCH 1/4] CI(macos): set MACOSX_DEPLOYMENT_TARGET=12.7 when building examples Match the deployment target baked into the framework dylibs (CMAKE_OSX_DEPLOYMENT_TARGET=12.7 from top-level CMakeLists.txt) so the C/C++ example builds in the macos-test distribution job don't link with the macos-12 SDK's default min-macOS of 12.0, which produces "dylib (libMR*.dylib) was built for newer macOS version (12.7) than being linked (12.0)" ld warnings on the macos-12-intel cell. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test-distribution.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test-distribution.yml b/.github/workflows/test-distribution.yml index 1290b2635552..df2b70983777 100644 --- a/.github/workflows/test-distribution.yml +++ b/.github/workflows/test-distribution.yml @@ -287,8 +287,16 @@ jobs: - name: Show meshconv help run: meshconv --help + # MACOSX_DEPLOYMENT_TARGET below matches the value baked into the + # framework dylibs (see CMAKE_OSX_DEPLOYMENT_TARGET in top-level + # CMakeLists.txt). Without it, the macos-12 SDK on the self-hosted + # macos-12-intel runner defaults the examples to min-macOS 12.0, + # producing "dylib was built for newer macOS version (12.7) than + # being linked (12.0)" warnings against every MeshLib dylib. - name: Build C++ examples working-directory: examples/cpp-examples + env: + MACOSX_DEPLOYMENT_TARGET: "12.7" run: | mkdir build && \ cd build && \ @@ -298,6 +306,8 @@ jobs: - name: Build C examples working-directory: examples/c-examples + env: + MACOSX_DEPLOYMENT_TARGET: "12.7" run: | cmake -S . -B build -DCMAKE_C_COMPILER=/usr/bin/clang && \ cmake --build build From bb27342f719c6403ab1c3bd97822c698fb182006 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Mon, 25 May 2026 16:07:39 +0300 Subject: [PATCH 2/4] ci: trigger test-distribution to verify macOS examples warning fix Empty commit to re-run CI now that the upload-binaries label is applied, so test-distribution / macos-test (x64, macos-12-intel) actually executes and we can confirm the "dylib was built for newer macOS version (12.7) than being linked (12.0)" warnings are gone. Co-Authored-By: Claude Opus 4.7 (1M context) From 7cf28d0aee44172736e6c7e8ba9bbbc5c1a45461 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Tue, 26 May 2026 21:50:23 +0300 Subject: [PATCH 3/4] CI(macos): scope MACOSX_DEPLOYMENT_TARGET=12.7 to macOS-12 hosts only The first cut of this fix exported MACOSX_DEPLOYMENT_TARGET=12.7 unconditionally on every macos-test cell. That silenced the original warnings on the macos-12-intel cell (where the macOS-12 SDK defaults the link target to 12.0, lower than the framework dylibs' 12.7), but introduced symmetric warnings on macos-13/26 cells: ld: warning: dylib (.../libfmt.12.1.0.dylib) was built for newer macOS version (13.0) than being linked (12.7) The brew bottles on those hosts are built at the host's macOS version (13.0, 14.0, 26.0), so forcing the link target down to 12.7 makes the brew dependencies "newer than being linked" instead. Gate the export on the host's macOS major version: apply 12.7 only on hosts older than 13, where the SDK default would otherwise fall below MeshLib's 12.7. On macOS-13+ hosts the SDK's default min-macOS is already >= 12.7 and >= every brew bottle on that host, so both classes of warning stay silent. Net effect across the matrix vs. the original master run: - x64, macos-12-intel: 65 warnings -> 0 (original symptom, fixed) - arm64, macos-13: 0 warnings -> 0 (regression from the previous commit reverted) - arm64, macos-26: 0 warnings -> 0 (ditto) - x64, macos-26-intel: 0 warnings -> 0 (ditto) - all other cells: 0 -> 0 (unchanged) Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test-distribution.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-distribution.yml b/.github/workflows/test-distribution.yml index df2b70983777..afa08686b04b 100644 --- a/.github/workflows/test-distribution.yml +++ b/.github/workflows/test-distribution.yml @@ -287,17 +287,21 @@ jobs: - name: Show meshconv help run: meshconv --help - # MACOSX_DEPLOYMENT_TARGET below matches the value baked into the - # framework dylibs (see CMAKE_OSX_DEPLOYMENT_TARGET in top-level - # CMakeLists.txt). Without it, the macos-12 SDK on the self-hosted - # macos-12-intel runner defaults the examples to min-macOS 12.0, - # producing "dylib was built for newer macOS version (12.7) than - # being linked (12.0)" warnings against every MeshLib dylib. + # On macOS-12 hosts (where the SDK still defaults min-macOS to 12.0) + # bump the examples' deployment target to 12.7 to match the value + # baked into the framework dylibs by CMAKE_OSX_DEPLOYMENT_TARGET in + # top-level CMakeLists.txt; otherwise ld warns "dylib was built for + # newer macOS version (12.7) than being linked (12.0)" against every + # MeshLib dylib. Do *not* set it on macOS-13+ hosts: there the SDK + # default already covers MeshLib's 12.7, and forcing 12.7 makes ld + # complain in the other direction about brew bottles built at the + # host's macOS version. - name: Build C++ examples working-directory: examples/cpp-examples - env: - MACOSX_DEPLOYMENT_TARGET: "12.7" run: | + if [ "$(sw_vers -productVersion | cut -d. -f1)" -lt 13 ]; then + export MACOSX_DEPLOYMENT_TARGET=12.7 + fi mkdir build && \ cd build && \ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ && \ @@ -306,9 +310,10 @@ jobs: - name: Build C examples working-directory: examples/c-examples - env: - MACOSX_DEPLOYMENT_TARGET: "12.7" run: | + if [ "$(sw_vers -productVersion | cut -d. -f1)" -lt 13 ]; then + export MACOSX_DEPLOYMENT_TARGET=12.7 + fi cmake -S . -B build -DCMAKE_C_COMPILER=/usr/bin/clang && \ cmake --build build From 20da71d56ce332ab7f5476d4bf3c3843675d7663 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Wed, 27 May 2026 10:12:52 +0300 Subject: [PATCH 4/4] CI(macos): trim the deployment-target comment per review Condense the 9-line explanation above the example-build steps to 3 lines. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/test-distribution.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-distribution.yml b/.github/workflows/test-distribution.yml index afa08686b04b..87f6d843ba82 100644 --- a/.github/workflows/test-distribution.yml +++ b/.github/workflows/test-distribution.yml @@ -287,15 +287,9 @@ jobs: - name: Show meshconv help run: meshconv --help - # On macOS-12 hosts (where the SDK still defaults min-macOS to 12.0) - # bump the examples' deployment target to 12.7 to match the value - # baked into the framework dylibs by CMAKE_OSX_DEPLOYMENT_TARGET in - # top-level CMakeLists.txt; otherwise ld warns "dylib was built for - # newer macOS version (12.7) than being linked (12.0)" against every - # MeshLib dylib. Do *not* set it on macOS-13+ hosts: there the SDK - # default already covers MeshLib's 12.7, and forcing 12.7 makes ld - # complain in the other direction about brew bottles built at the - # host's macOS version. + # Match the framework dylibs' 12.7 target on the macOS-12 SDK (which + # otherwise defaults to 12.0); skip on 13+ where forcing 12.7 would + # instead warn against brew bottles built for the host's macOS. - name: Build C++ examples working-directory: examples/cpp-examples run: |