[Issue Report]: macOS CI builds (arm64 / x86_64) fail to launch due to missing libSDL3.dylib

Author: bubioCreated Sep 19, 2026Updated Sep 19, 2026

Operating System

Mac

DevilutionX version

1.5.5

Describe

Launching devilutionx.app from the devilutionx.dmg produced by either .github/workflows/macOS_arm64.yml or .github/workflows/macOS_x86_64.yml shows the dialog "Fatal error! Cannot continue! / Failed loading SDL3 library." and the app fails to start.

Image

To Reproduce

  1. Both workflows follow the same path: run brew bundle install.
  2. Run cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DMACOSX_STANDALONE_APP_BUNDLE=ON (the x86_64 workflow also adds -DDISCORD_INTEGRATION=ON), then cmake --build build --target package to produce the DMG.
  3. Mount the DMG and launch devilutionx.app.
  4. The "Failed loading SDL3 library." dialog appears and the app does not start (identical symptom on both arm64 and x86_64).

Expected Behavior

No response

Additional context

Cause

  • Homebrew's sdl2 package is now an alias for sdl2-compat, a compatibility layer that implements the SDL2 API on top of SDL3. sdl2-compat does not contain a real SDL2 implementation itself; at runtime it uses dlopen() to dynamically load libSDL3.dylib.
  • This dependency does not show up in otool -L at link time (dlopen calls are outside the scope of build-time dependency resolution). As a result, fixup_bundle — the tool used during packaging, which only follows directly linked dependencies visible via otool -L — never copies libSDL3.dylib into the bundle.
  • Consequently, the distributed .app cannot find libSDL3.dylib at launch and fails. Because Homebrew formula resolution doesn't depend on the runner's macOS version but instead fetches the latest homebrew-core state at build time, this happens on both arm64 and x86_64 runners, and will continue to happen going forward.