Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace libfmt with std::format#7251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
nyllet wants to merge2 commits intoProject-OSRM:master
base:master
Choose a base branch
Loading
fromnyllet:remove_libfmt

Conversation

@nyllet
Copy link
Contributor

Issue

This is an alternative solution to#7238

Tasklist

Requirements / Relations

none

DennisOSRM reacted with eyes emoji
@nylletnyllet marked this pull request as draftSeptember 14, 2025 11:27
@afarber
Copy link
Contributor

Please do not forget to remove the fmt from scripts/update_dependencies.sh

@afarber
Copy link
Contributor

Hi@nyllet, your PR removes the fmt library entirely and switches directly tostd::format...

However, this might cause build failures on systems wherestd::format is incomplete. For example:

  • Clang with older libstdc++: The<format> header exists, but symbols are missing at link time
  • Some GCC 13 installations: Have incomplete chrono formatting support
  • Alpine Linux with GCC 14: Missing chrono formatters

I've just submitted#7261 which takes a different approach:

  • Adds a thin compatibility layer (util/format.hpp) that automatically usesstd::format when available
  • Falls back tofmt::format on systems wherestd::format doesn't work
  • Uses CMake runtime detection (check_cxx_source_runs) to test compile, link and execution
  • Also fixes the node_osrm C++17/C++20 ABI mismatch that was overlooked inUse C++20 #6877

This way, we can:

  1. Keep fmt as a fallback for systems with incomplete std::format
  2. Gradually phase out fmt as older compilers are retired
  3. Avoid breaking builds for users on platforms with partial C++20 support

Would you be open to reviewing#7261 as an alternative approach?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@nyllet@afarber

[8]ページ先頭

©2009-2025 Movatter.jp