fix(build): include <ostream> in io_config.hpp - #7714
Merged
DennisOSRM merged 1 commit intoSep 5, 2026
Conversation
IOConfig::ListInputFiles writes into a std::ostream, but the header only includes <array>, <filesystem>, <set>, <string> and <vector> and relies on one of them to pull in <ostream> transitively. libc++ 23 removed those transitive includes, so compiling against it fails with: error: invalid operands to binary expression ('std::ostream' and 'const char[10]'). Include <ostream> directly.
DennisOSRM
approved these changes
Sep 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7714 +/- ##
==========================================
+ Coverage 91.91% 94.80% +2.89%
==========================================
Files 526 526
Lines 42085 42085
==========================================
+ Hits 38682 39899 +1217
+ Misses 3403 2186 -1217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
Thanks so much for the contribution |
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.
Issue
There is no separate issue:
include/storage/io_config.hppfails to compile against libc++ 23, which no longer provides the transitive includes the header relies on.IOConfig::ListInputFileswrites into astd::ostream, but the header includes only<array>,<filesystem>,<set>,<string>and<vector>. Up to libc++ 22 one of those pulled in<ostream>; libc++ 23 removed the transitive includes, so theoperator<<(std::ostream&, const char*)overload is no longer declared:This showed up when building v26.9.0 with Homebrew's clang/libc++ 23 on macOS; the same header in v26.8.0 has the problem too, it just did not surface with libc++ 22.
The fix is to include
<ostream>directly.Tasklist
Verification
Built v26.9.0 with the patch using clang/libc++ 23 (arm64 macOS): all targets compile and all eight
osrm-*binaries link. Without the patch the same build fails with the error above.AI disclosure
An AI tool (Claude Code) was used to diagnose the failure and prepare this one-line change; the diagnosis and the resulting build were verified locally before submitting.