Uh oh!
There was an error while loading. Please reload this page.
Haiku: Fix native component build - #126701
Conversation
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
Updates native build configuration to improve compatibility with Haiku when building dotnet/runtime native components, primarily by feature-detecting pthread robust-mutex APIs and adjusting Haiku linker behavior in CMake.
Changes:
- Add CMake feature checks for
pthread_mutex_consistentandpthread_mutexattr_setrobust, and expose them viapal_config.h. - Conditionally compile robust-mutex initialization and recovery paths in
pal_crossprocessmutex.cbased on those feature macros. - Adjust Haiku CMake linker-group settings as a workaround for missing upstream CMake support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/native/libs/System.Native/pal_crossprocessmutex.c | Guard robust mutex attr usage and EOWNERDEAD recovery logic behind feature macros. |
| src/native/libs/configure.cmake | Add configure-time detection for robust-mutex related pthread APIs. |
| src/native/libs/Common/pal_config.h.in | Export new HAVE_PTHREAD_MUTEX_* feature macros to native builds. |
| eng/native/configurecompiler.cmake | Set Haiku linker-group rescan settings and adjust Haiku linker flags. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c66034d to
544eeecCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
am11
commented
Apr 25, 2026
@jkoritzinsky, this one. is also ready. (needed to actually build runtime repo for Haiku) |
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
92066fc to
8b68c4aCompareUh oh!
There was an error while loading. Please reload this page.
trungnt2910
commented
Apr 28, 2026
For documentation purposes: Haiku does not support robust mutexes: https://dev.haiku-os.org/ticket/20033 |
Seems like the priority is runtime code size, not portability. Reverted the cross-process mutex implementation choice to a OS-based list instead of a dynamic configure-time check. Also tell the managed counterpart that Haiku does not support this feature to prevent future issues.
5f29a8b to
4d24579Comparejkoritzinsky
commented
Apr 28, 2026
/ba-g ios infra failure unrelated |
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
Part of #55803.