fix(ci): fix macOS ci to use provided fmt#670
Conversation
| if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
| # Work around AppleClang 21 rejecting fmt's consteval format-string checks | ||
| # while compiling vendored avro-cpp in C++23 mode. | ||
| target_compile_definitions(avrocpp_s PUBLIC FMT_CONSTEVAL=) |
There was a problem hiding this comment.
Can you try PRIVATE, so that FMT_CONSTEVAL= won't propagate. Not sure if that work :)
There was a problem hiding this comment.
That makes sense. The current failure happens while compiling avrocpp_s itself, so PRIVATE may be sufficient and would avoid leaking the workaround to downstream targets. I’ll try switching it to PRIVATE and let CI verify whether Iceberg sources still compile without inheriting FMT_CONSTEVAL=.
There was a problem hiding this comment.
It seems PRIVATE won't work :(
There was a problem hiding this comment.
I changed it back to PUBLIC.
|
I think a simpler fix would be to temporarily introduce a higher version of // lang/c++/CMakeLists.txt
find_package(fmt QUIET)
if (NOT fmt_FOUND)
include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.2.1
GIT_PROGRESS TRUE
USES_TERMINAL_DOWNLOAD TRUE
)
FetchContent_MakeAvailable(fmt)
endif () |
I think this is a better approach. We can see that homebrew is available on the macos-26 image: https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md. Homebrew has fmt 12.1.0 as the stable version: https://formulae.brew.sh/formula/fmt. We can add a step to call |
|
Thank you for fixing it, @slfan1989! |
@wgtmac @zhjwpku @HuaHuaY Thanks for the review and suggestion! |
Summary
Fix the S3 build on macOS 26 / AppleClang by disabling fmt's consteval format-string checks for vendored avro-cpp.
Problem
The S3 CI job on AArch64 macOS 26 fails while compiling vendored avro-cpp:
https://github.com/apache/iceberg-cpp/actions/runs/26262392739/job/77298497335?pr=669