fix: kill macOS startup crash (relink SFML audio to openal-soft)#39
Merged
Conversation
…soft The intermittent launch crash was Apple's deprecated OpenAL.framework (which Homebrew's sfml@2 links) racing in CoreAudio on first device open. Rather than just document it, fix it: on macOS the build now ships a copy of libsfml-audio relinked against openal-soft next to the binary, so the game never loads the Apple framework. - cmake/use_openal_soft.sh copies libsfml-audio, repoints its OpenAL dependency to openal-soft, re-signs it, and points the executable at the local copy. Run as an idempotent POST_BUILD step, guarded by find_library(openal-soft); if openal-soft is absent CMake warns and falls back to the framework. - CI (macOS) and BUILD.md now install openal-soft; KNOWN_ISSUES documents the fix. Verified: no OpenAL.framework anywhere in the dependency tree, and the game launches reliably. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The crash, fixed for real
The intermittent launch crash on macOS was Apple's deprecated
OpenAL.framework(linked by Homebrew'ssfml@2) racing in CoreAudio on first device open. Previously only documented — now fixed.On macOS the build ships a copy of
libsfml-audiorelinked against openal-soft next to the binary, so the game never loads the Apple framework:cmake/use_openal_soft.shcopieslibsfml-audio, repoints its OpenAL dependency to openal-soft, re-signs, and points the exe at the local copy. IdempotentPOST_BUILDstep, guarded byfind_library(openal-soft)(warns + falls back if absent).BUILD.mdinstallopenal-soft;KNOWN_ISSUES.mdupdated.Verified
otool -Lshows noOpenAL.frameworkanywhere in the dependency tree.cmake --build+ctestpass.Requires
brew install openal-softon macOS.🤖 Generated with Claude Code