Yasu3D / MercuryMapper

A chart editor for Mercury. "Forked" from BAKKA-Avalonia, re-written for stability and ease of use.
MIT License
15 stars 3 forks source link

Can't open arm64 release on macOS #13

Open muskit opened 5 months ago

muskit commented 5 months ago

There are two main issues that I've observed.

Lack of codesigning

After marking MercuryMapper as an executable, macOS will SIGKILL it on launch due to lack of code signature attached. It can, however, be signed with an adhoc signature: > codesign -s - -f MercuryMapper I have no idea if this adhoc-signed binary will work on other systems, but macOS no longer SIGKILLs it instantly on mine.

Lack of .dylib

Upon opening the adhoc-signed binary, it crashes with the following message.

> ./MercuryMapper
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'bass' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Users/***/Downloads/MercuryMapper-OSX-arm64/bass.dylib, 0x0001): tried: '/Users/***/Downloads/MercuryMapper-OSX-arm64/bass.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/***/Downloads/MercuryMapper-OSX-arm64/bass.dylib' (no such file), '/Users/***/Downloads/MercuryMapper-OSX-arm64/bass.dylib' (no such file)
dlopen(bass.dylib, 0x0001): tried: 'bass.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSbass.dylib' (no such file), '/usr/lib/bass.dylib' (no such file, not in dyld cache), 'bass.dylib' (no such file), '/usr/local/lib/bass.dylib' (no such file), '/usr/lib/bass.dylib' (no such file, not in dyld cache)
dlopen(/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass.dylib, 0x0001): tried: '/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass.dylib' (no such file), '/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass.dylib' (no such file)
dlopen(libbass.dylib, 0x0001): tried: 'libbass.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibbass.dylib' (no such file), '/usr/lib/libbass.dylib' (no such file, not in dyld cache), 'libbass.dylib' (no such file), '/usr/local/lib/libbass.dylib' (no such file), '/usr/lib/libbass.dylib' (no such file, not in dyld cache)
dlopen(/Users/***/Downloads/MercuryMapper-OSX-arm64/bass, 0x0001): tried: '/Users/***/Downloads/MercuryMapper-OSX-arm64/bass' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/***/Downloads/MercuryMapper-OSX-arm64/bass' (no such file), '/Users/***/Downloads/MercuryMapper-OSX-arm64/bass' (no such file)
dlopen(bass, 0x0001): tried: 'bass' (no such file), '/System/Volumes/Preboot/Cryptexes/OSbass' (no such file), '/usr/lib/bass' (no such file, not in dyld cache), 'bass' (no such file), '/usr/local/lib/bass' (no such file), '/usr/lib/bass' (no such file, not in dyld cache)
dlopen(/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass, 0x0001): tried: '/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass' (no such file), '/Users/***/Downloads/MercuryMapper-OSX-arm64/libbass' (no such file)
dlopen(libbass, 0x0001): tried: 'libbass' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibbass' (no such file), '/usr/lib/libbass' (no such file, not in dyld cache), 'libbass' (no such file), '/usr/local/lib/libbass' (no such file), '/usr/lib/libbass' (no such file, not in dyld cache)

   at ManagedBass.Bass.Init(Int32 Device, Int32 Frequency, DeviceInitFlags Flags, IntPtr Win, IntPtr ClsID)
   at MercuryMapper.Audio.BassSoundEngine..ctor() in X:\MercuryMapper\Audio\BassSoundEngine.cs:line 19
   at MercuryMapper.Audio.AudioManager..ctor(MainView mainView) in X:\MercuryMapper\Audio\AudioManager.cs:line 13
   at MercuryMapper.Views.MainView..ctor() in X:\MercuryMapper\Views\MainView.axaml.cs:line 41
   at MercuryMapper.MainWindow.!XamlIlPopulate(IServiceProvider, MainWindow) in X:\MercuryMapper\MainWindow.axaml:line 17
   at MercuryMapper.MainWindow.!XamlIlPopulateTrampoline(MainWindow)
   at MercuryMapper.MainWindow.InitializeComponent(Boolean loadXaml) in X:\MercuryMapper\Avalonia.Generators\Avalonia.Generators.NameGenerator.AvaloniaNameSourceGenerator\MercuryMapper.MainWindow.g.cs:line 22
   at MercuryMapper.MainWindow..ctor() in X:\MercuryMapper\MainWindow.axaml.cs:line 15
   at MercuryMapper.App.OnFrameworkInitializationCompleted() in X:\MercuryMapper\App.axaml.cs:line 19
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
   at MercuryMapper.Config.Program.Main(String[] args) in X:\MercuryMapper\Program.cs:line 13
zsh: abort      ./MercuryMapper

Looks like it wants the macOS-native .dylib versions of these libraries.

Yasu3D commented 5 months ago

Both ""known"" but didn't know it fully broke on arm64 macOS.

yellow is working on bundling libraries correctly and if you'd like to help with signing that would be neat.

The only missing libraries should be BASS, which can be downloaded here: https://www.un4seen.com/

MercuryMapper requires Bass, BassFX and BassFlac.

frozenpandaman commented 4 months ago

Hi! I'm also using the arm64 macOS release, release v2.0.1b. Running it also causes it to be insta SIGKILLed but codesigning as above fixes the issue.

Not running into any dylib issues on this version, all seems to be working perfectly so far.