Skip to content

Fix haiku and illumos x64 builds - #131700

Merged
jkotas merged 6 commits into
dotnet:mainfrom
am11:chore/fix-community-platform-builds
Aug 8, 2026
Merged

Fix haiku and illumos x64 builds#131700
jkotas merged 6 commits into
dotnet:mainfrom
am11:chore/fix-community-platform-builds

Conversation

@am11

@am11 am11 commented Aug 1, 2026

Copy link
Copy Markdown
Member

Regarding _X, the alternative was to rename it to PAL_X everywhere but that turned it into a 1400+ lines of change; can apply if needed.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 1, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@am11 am11 added area-Infrastructure os-SunOS SunOS, currently not officially supported os-haiku and removed area-Diagnostics-coreclr labels Aug 1, 2026
@am11
am11 temporarily deployed to copilot-pat-pool August 1, 2026 17:36 — with GitHub Actions Inactive
@am11
am11 temporarily deployed to copilot-pat-pool August 1, 2026 17:37 — with GitHub Actions Inactive
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@am11
am11 requested a review from jkotas August 1, 2026 17:43
@am11
am11 force-pushed the chore/fix-community-platform-builds branch 2 times, most recently from 344d833 to 15f2342 Compare August 1, 2026 18:21
Comment thread src/coreclr/jit/gentree.cpp Outdated
@am11
am11 force-pushed the chore/fix-community-platform-builds branch 15 times, most recently from 302d268 to 3c00744 Compare August 1, 2026 21:51
Comment thread src/coreclr/jit/gentree.cpp
Comment thread src/coreclr/jit/gentree.cpp
Comment thread src/native/corehost/hostmisc/pal.h Outdated
Comment thread src/native/minipal/ospagesize.c
@am11
am11 requested a review from jkotas August 5, 2026 18:38
@am11

am11 commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@jkotas can this be merged?

Comment thread src/coreclr/debug/crashreport/config.h.in Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes a set of platform-specific tweaks to restore/build successfully on Haiku and illumos/SunOS x64, primarily by adjusting atomic usage, header/feature guards, and build-time configuration for crashreport.

Changes:

  • Add Haiku+clang-specific atomic load/store usage in minipal_getpagesize.
  • Tighten Sysctl-dependent networking statistics compilation guards for platforms missing sys/sysctl.h.
  • Address SunOS _X macro collisions in corehost PAL headers, and add crashreport CMake configure-time feature detection.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/native/minipal/ospagesize.c Uses clang __c11_atomic_* on Haiku to cache page size.
src/native/libs/System.Native/pal_networkstatistics.c Gates route/sysctl-based implementations on HAVE_SYS_SYSCTL_H.
src/native/corehost/hostmisc/pal.unix.c Adds DT_* fallback values and switches /proc/self/maps scanning to a runtime-built sscanf format.
src/native/corehost/hostmisc/pal.h Introduces PAL_X and redefines _X after generated config includes, with a SunOS workaround.
src/coreclr/jit/gentree.cpp Suppresses a SunOS GCC warning around CanAssignFrom in a local-load fast-path.
src/coreclr/debug/crashreport/inproccrashreporter.cpp Includes generated config.h and uses feature macros to gate headers.
src/coreclr/debug/crashreport/configure.cmake Adds CMake checks and generates config.h.
src/coreclr/debug/crashreport/config.h.in Template for generated crashreport feature macros.
src/coreclr/debug/crashreport/CMakeLists.txt Wires crashreport configure.cmake and binary include dir into the build.
Suppressed comments (1)

src/native/corehost/hostmisc/pal.unix.c:385

  • The snprintf that builds fmt is invariant across loop iterations but is currently executed once per /proc/self/maps line. It can be moved before the while loop to avoid repeated work in what can be a fairly large file.
        // Build the sscanf format dynamically to safely handle parenthesized PATH_MAX values on some platforms (like Haiku)
        char fmt[64];
        snprintf(fmt, sizeof(fmt), "%%*p-%%*p %%*[-rwxsp] %%*p %%*[:0-9a-f] %%*d %%%ds\n", PATH_MAX);

        char buf[PATH_MAX + 1]; // + 1 for the NUL terminator
        if (sscanf(line, fmt, buf) == 1)

Comment thread src/coreclr/debug/crashreport/configure.cmake Outdated
Comment thread src/native/corehost/hostmisc/pal.unix.c
Comment thread src/coreclr/jit/gentree.cpp
Comment thread src/native/libs/System.Native/pal_networkstatistics.c
Comment thread src/coreclr/vm/common.h Outdated
@jkotas
jkotas enabled auto-merge (squash) August 8, 2026 19:22
@jkotas
jkotas merged commit 9904b93 into dotnet:main Aug 8, 2026
187 checks passed
@am11

am11 commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@jkotas, thanks!

@am11
am11 deleted the chore/fix-community-platform-builds branch August 8, 2026 22:23
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 10, 2026
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Aug 11, 2026
---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure community-contribution Indicates that the PR has been added by a community member os-haiku os-SunOS SunOS, currently not officially supported

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants