Skip to content

Link FreeBSD builds against the FreeBSD 12 libc again - #154

Merged
kjanat merged 1 commit into
masterfrom
fix/freebsd-12-parallelism
Sep 27, 2026
Merged

kjanat merged 1 commit into
masterfrom
fix/freebsd-12-parallelism

Conversation

@kjanat

@kjanat kjanat commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Both FreeBSD legs of the v0.27.0 release failed to link with undefined reference to sched_getaffinity. std's available_parallelism calls it on FreeBSD, and it only exists from FreeBSD 13.1.

On FreeBSD the extractor pool now uses num_cpus::get(), which reads sysconf(_SC_NPROCESSORS_ONLN) with a sysctl hw.ncpu fallback. Every other target keeps available_parallelism.

Both x86_64-unknown-freebsd and aarch64-unknown-freebsd (nightly -Z build-std) link against the FreeBSD 12.4 sysroots CI uses, and each binary imports sysconf@FBSD_1.0 and no sched_getaffinity.

std's `available_parallelism` calls `sched_getaffinity` on FreeBSD,
which FreeBSD 12 libc lacks, so both FreeBSD release legs failed to
link. On FreeBSD the extractor pool now sizes itself with
`num_cpus::get()`, which uses `sysconf` and `sysctl`. Other targets keep
`available_parallelism`.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T23:06:48.529159Z d88cf02 PR opened
🔒 Security Review ✅ Completed 2026-09-27T23:07:50.382683Z d88cf02 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​num_cpus@​1.17.010010093100100

View full report

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
runner d88cf02 Commit Preview URL

Branch Preview URL
Sep 27 2026, 11:05 PM

@kjanat
kjanat merged commit 29d1c0a into master Sep 27, 2026
19 of 20 checks passed
@kjanat
kjanat deleted the fix/freebsd-12-parallelism branch September 27, 2026 23:05
@kjanat kjanat added bug Something isn't working area: core Pipeline, policy, planning and the cascade in runner-core labels Sep 27, 2026
@kjanat kjanat self-assigned this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Pipeline, policy, planning and the cascade in runner-core bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant