cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
660 stars 262 forks source link

BN doesn't launch in Apple Silicon #2309

Closed DazedNConfused- closed 1 month ago

DazedNConfused- commented 1 year ago

Describe the bug

When you attempt to run BN from the Application directly, nothing happens at all.

Attempting to run the game from the terminal through either /Contents/Resources/cataclysm-tiles or /Contents/MacOS/Cataclysm.sh yields an interesting error that is otherwise hidden:

dyld[70659]: Library not loaded: '/usr/local/Cellar/libvorbis/1.3.7/lib/libvorbis.0.dylib'
  Referenced from: '/Applications/Games/Cataclysm BN.app/Contents/Resources/libvorbisfile.3.dylib'
  Reason: tried: '/usr/local/Cellar/libvorbis/1.3.7/lib/libvorbis.0.dylib' (no such file), '/usr/local/lib/libvorbis.0.dylib' (no such file), '/usr/lib/libvorbis.0.dylib' (no such file)
[1]    70659 abort      ./cataclysm-tiles

Suspecting that a core library was somehow missing, I installed libvorbis through brew install libvorbis, but the error persists.

I suspect that the main culprit is that the library is being searched in /usr/local/Cellar (as per the logs), whereas brew in Apple Silicon uses /opt/homebrew. This is consistent with the output of brew info libvorbis:

==> libvorbis: stable 1.3.7 (bottled), HEAD
Vorbis General Audio Compression Codec
https://xiph.org/vorbis/
/opt/homebrew/Cellar/libvorbis/1.3.7 (157 files, 2.4MB) *
  Poured from bottle on 2023-01-26 at 11:34:48
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libvorbis.rb
License: BSD-3-Clause
==> Dependencies
Build: curl ✘, pkg-config ✔
Required: libogg ✔
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 50,290 (30 days), 154,264 (90 days), 606,658 (365 days)
install-on-request: 886 (30 days), 2,624 (90 days), 8,726 (365 days)
build-error: 0 (30 days)

Steps To Reproduce

  1. Attempt to run the game on Apple Silicon
  2. Nothing happens
  3. Re-attempt execution through the terminal instead

Screenshots

No response

Versions and configuration

Output of system_profiler SPSoftwareDataType SPHardwareDataType:

Software:

    System Software Overview:

      System Version: macOS 12.6 (21G115)
      Kernel Version: Darwin 21.6.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,2
      Chip: Apple M1 Max
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 64 GB
      System Firmware Version: 7459.141.1
      OS Loader Version: 7459.141.1
      Activation Lock Status: Disabled

Additional context

No response

aucun6352 commented 1 year ago

I solved it by installing the x86 version of the library

RoyalFox2140 commented 1 month ago

The mac version in this release contains a possible fix to the missing libraries but it requires a mac user to report that the issue is solved. https://github.com/cataclysmbnteam/Cataclysm-BN/releases/tag/2024-07-11

DazedNConfused- commented 1 month ago

Fix does indeed work (tested https://github.com/cataclysmbnteam/Cataclysm-BN/releases/tag/2024-07-11 on a M1). Thanks a lot @RoyalFox2140 !