build: compile against fmt 10 and 11 - #3722
Draft
melonakos wants to merge 2 commits into
Draft
Conversation
fmt 10 made formatter::format() const and fmt 11 moved fmt::join to ranges.h, so ArrayFire no longer built against a system fmt (Arch, Homebrew, Ubuntu 24.10+). Make every custom formatter's format() const, include ranges.h where join is used, and turn the Version formatter's in-place flag mutation into locals so "{:Mm}" still renders 1.2 rather than 1.2.0. Output is unchanged under the pinned fmt 8. Fixes #3692 and #3596.
debug.hpp and NodeIO.hpp included spdlog/fmt/bundled/format.h directly, which does not exist when spdlog is built against an external fmt. Nothing in src includes these headers today, but they now compile under both layouts.
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.
fmt 10 made formatter::format() const and fmt 11 moved fmt::join to ranges.h, so ArrayFire no longer builds against a system fmt on Arch, Homebrew, or recent Ubuntu:
Every custom formatter's format() is now const, ranges.h is included where join is used, and the Version formatter combines its parsed flags into locals instead of mutating them, so
{:Mm}still renders 1.2 rather than 1.2.0 (the patch on #3596 lost that, and the OpenCL backend uses it for -cl-std). The two debug headers that nothing includes also stop naming spdlog's bundled fmt directly. Built the CPU backend against fmt 11.2 / spdlog 1.15 and against the pinned fmt 8.1 / spdlog 1.9, and the CUDA backend against fmt 8; a standalone probe compiles the CUDA and debug formatter headers under both fmt versions with identical output. The OpenCL file was not built here. Fixes #3692 and #3596.