Skip to content

fix: kill macOS startup crash (relink SFML audio to openal-soft)#39

Merged
davmoz merged 1 commit into
masterfrom
fix/macos-openal-soft
Jun 16, 2026
Merged

fix: kill macOS startup crash (relink SFML audio to openal-soft)#39
davmoz merged 1 commit into
masterfrom
fix/macos-openal-soft

Conversation

@davmoz

@davmoz davmoz commented Jun 16, 2026

Copy link
Copy Markdown
Owner

The crash, fixed for real

The intermittent launch crash on macOS was Apple's deprecated OpenAL.framework (linked by Homebrew's sfml@2) racing in CoreAudio on first device open. Previously only documented — now fixed.

On macOS the build 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, and points the exe at the local copy. Idempotent POST_BUILD step, guarded by find_library(openal-soft) (warns + falls back if absent).
  • CI (macOS) + BUILD.md install openal-soft; KNOWN_ISSUES.md updated.

Verified

  • otool -L shows no OpenAL.framework anywhere in the dependency tree.
  • Game launches reliably (was ~20% crash, now 0).
  • cmake --build + ctest pass.

Requires brew install openal-soft on macOS.

🤖 Generated with Claude Code

…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>
@davmoz davmoz merged commit 27c976b into master Jun 16, 2026
2 checks passed
@davmoz davmoz deleted the fix/macos-openal-soft branch June 16, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant