Add missing standard library includes for libc++ 23 - #860
Merged
Conversation
libc++ 23 removed a number of transitive includes, so headers that were
previously pulled in indirectly are no longer available. Building with
LLVM 23 fails with errors such as:
src/c_api/helpers.cpp:73:26: error: use of undeclared identifier 'malloc'
src/include/common/task_system/task.h:65:34: error: no type named
'exception_ptr' in namespace 'std'
src/processor/operator/aggregate/base_aggregate.cpp:21:66: error: no
member named 'bit_width' in namespace 'std'
Include the headers each translation unit actually uses. Two files
included the C header "math.h" while calling std::sqrt and std::log2,
which are only declared by <cmath>.
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.
libc++ 23 dropped several transitive includes, so building with LLVM 23 fails on missing
malloc,std::exception_ptr,std::bit_width, and similar. This adds the headers each file actually uses, and switches two files from"math.h"to<cmath>since they callstd::sqrt/std::log2.Follow-up to b8b2436. Verified with LLVM 23.1.0 and Apple clang 21.