Skip to content

libcxxabi: Include <sys/random.h> for getentropy on Darwin - #157

Merged
thevar1able merged 1 commit into
ClickHouse/release-23.xfrom
darwin-getentropy-include
Nov 16, 2026
Merged

thevar1able merged 1 commit into
ClickHouse/release-23.xfrom
darwin-getentropy-include

Conversation

@thevar1able

Copy link
Copy Markdown
Member

#155 seeds the thread_local destructor secret with getentropy outside Linux and gets it from <unistd.h>. macOS declares getentropy in <sys/random.h> instead, so cxa_thread_atexit.cpp no longer compiles there: use of undeclared identifier 'getentropy'. Include <sys/random.h> on __APPLE__.

Checked by compiling the same include block for arm64-apple-macos11, x86_64-pc-freebsd13 and x86_64-pc-solaris2.11 against their sysroots.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=109239&sha=59f88c278ff1593e4a17d69a24474ce2ecbf84b6&name_0=PR&name_1=Build%20%28arm_darwin%29
Related: #155
Related: ClickHouse/ClickHouse#109239

🤖 Generated with Claude Code

@thevar1able
thevar1able merged commit 6bd203b into ClickHouse/release-23.x Nov 16, 2026
13 checks passed
thevar1able added a commit to ClickHouse/ClickHouse that referenced this pull request Nov 16, 2026
alexey-milovidov added a commit to ClickHouse/ClickHouse that referenced this pull request Nov 16, 2026
… fix for illumos

Advances the submodule to the tip of `ClickHouse/release-23.x`, which
initializes the secret with `getentropy` on non-Linux platforms
(ClickHouse/llvm-project#155, ClickHouse/llvm-project#157)
and includes an `InstCombine` fix (ClickHouse/llvm-project#156).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov added a commit to ClickHouse/ClickHouse that referenced this pull request Nov 17, 2026
The previous bump pulled in the `thread_local` destructor secret change in
`libcxxabi`, which calls `getentropy` without including `<sys/random.h>` on
macOS. Move to the tip of `ClickHouse/release-23.x`, which adds that include
(ClickHouse/llvm-project#157).

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=132041&sha=dbd91ed5a46a8ceaaaafc6c0c0075458f86e5cad&name_0=PR&name_1=Build%20%28arm_darwin%29
Related: #132041

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant