Skip to content

Add missing standard library includes for libc++ 23 - #860

Merged
adsharma merged 1 commit into
LadybugDB:mainfrom
daeho-ro:fix-libcxx-missing-includes
Aug 30, 2026
Merged

Add missing standard library includes for libc++ 23#860
adsharma merged 1 commit into
LadybugDB:mainfrom
daeho-ro:fix-libcxx-missing-includes

Conversation

@daeho-ro

@daeho-ro daeho-ro commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

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 call std::sqrt/std::log2.

Follow-up to b8b2436. Verified with LLVM 23.1.0 and Apple clang 21.

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>.
@adsharma
adsharma merged commit 4dfde6c into LadybugDB:main Aug 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants