Repository navigation
Fix MacOSARM64 CI: update Google Benchmark and disable its -Werror - #194
Merged
Merged
Conversation
macos-latest moved to the macOS 26 image (AppleClang 21), whose libc++ annotates std::mutex for thread safety analysis. Google Benchmark 1.5.5 forces -Werror on Release builds and its own mutex wrapper annotations conflict, failing the build. Update to 1.9.5 and set BENCHMARK_ENABLE_WERROR OFF so warnings in the third party library can't break the build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI has been failing since September on MacOSARM64-Clang, in the CMake Install Release step. No code change caused it: the last passing commit is
ba93f17, and the first failure was06969a1, a.gitignorechange.macos-latestmoved to the macos-26-arm64 image, which uses AppleClang 21 / Xcode 26.6. Its libc++ now annotatesstd::mutexfor Clang's thread safety analysis. Google Benchmark 1.5.5 forces-Werroron Release builds, and its ownMutexwrapper annotations are disabled because its feature check fails. Clang therefore reports the wrapper as holding and releasing a mutex it doesn't own:Upstream issue: google/benchmark#2263. The fix (google/benchmark#2275) is merged but not in a release yet.
Fix
BENCHMARK_ENABLE_WERROR OFF(an option added after 1.5.5), so warnings in the third-party library can't fail our build. Only the benchmark dependency is affected; FastNoise2's own flags are unchanged.Testing
-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONShits the same twomutex.herrors with 1.5.5. Newer Clang also hits-Wc2y-extensionserrors in 1.5.5.FastNoiseBenchmarkwith no errors or warnings.FastNoiseBenchmarkandFastNoiseCpp11Testbuild and run with MSVC, clang-cl, GCC 13.3 and Clang 18.1.<name>_medianentries withitems_per_second, which is whatgenerate_html_charts.py -f_median$reads. The new_cvaggregate is filtered out by that pattern.EXCLUDE_FROM_ALL, so nothing from it is installed into the CI packages, same as before.