Repository navigation
fix(#165): load the platform pthread/dl libraries on macOS - #186
Merged
s2x merged 1 commit intoNov 6, 2026
Merged
Conversation
s2x
deleted the
fix/issue-165-bug-nativeclient-macos-support-is-broken
branch
November 6, 2026 21:38
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
NativeClientloadedlibpthread.so.0andlibdl.so.2unconditionally, soNativeClient::getInstance()failed on macOS before the FDB library was usable.src/NativeClient.php: platform-aware pthread/dl selection —libSystem.B.dylibon Darwin,
libpthread.so.0/libdl.so.2on Linux, a clearRuntimeExceptionelsewhere — and a platform-aware default soname(
libfdb_c.dylibon macOS).tests/Unit/NativeClientPlatformLibrariesTest.php(new): Darwin/Linuxmappings, unsupported OS rejection and default soname, without needing macOS.
tests/Unit/NativeClientLibraryPathTest.php: readsFDB_LIBRARY_PATHfirst,adds Homebrew/
/usr/local/lib//usr/lib.dyliband Linuxlib64paths,uses a platform-neutral skip message, and saves/restores the ambient
FDB_LIBRARY_PATHinstead of unsetting it.docs/getting-started.md/README.mddocument the macOS library name andFDB_LIBRARY_PATH;CHANGELOG.mdrecords the fix.Refs #165 — the code is merged, but the macOS runtime load is still a manual
check (no macOS runner here), so the issue stays open until that is done.
How it was tested
617 tests, 1267 assertions; full suite926 tests, 2500 assertions, 6 skipped; Integration309 tests, 1233 assertions, 6 skipped.FDB_LIBRARY_PATH: the value survives the suite.resolveLibraryPath()precedence is unchanged.git diff --checkpass.and inspected against
libSystem/dyld semantics, but the real load remains amanual/macOS-CI check.
Checklist
CHANGELOG.mdupdated under[Unreleased]fix: ...)