yuxshao / ptcollab

A collaborative piano-roll music sequencer!

Home Page:https://yuxshao.github.io/ptcollab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.6.4.0 - v0.6.4.5 macOS release artifacts require higher macOS version than indicated

OPNA2608 opened this issue · comments

...because some of the dependencies are fetched from Homebrew.

On 10.13

Dyld Error Message:
  Library not loaded: @executable_path/../Frameworks/librtmidi.6.dylib
  Referenced from: /Users/USER/*/ptcollab.app/Contents/MacOS/ptcollab
  Reason: no suitable image found. Did find:
    <HOME>/tmp/ptcollab-v0.6.4.0-macOS-x86_64/ptcollab.app/Contents/MacOS/../Frameworks/librtmidi.6.dylib: cannot load 'librtmidi.6.dylib' (load command 0x80000034 is unknown)
    <HOME>/tmp/ptcollab-v0.6.4.0-macOS-x86_64/ptcollab.app/Contents/MacOS/../Frameworks/librtmidi.6.dylib: cannot load 'librtmidi.6.dylib' (load command 0x80000034 is unknown)

This affects at least librtmidi.6.dylib and libogg.0.dylib. Running the artifacts on higher macOS version is reported to be working OOTB.
(What's the minimum? Highest known-broken we've found from users is 10.14, lowest known-working 12.6.3. Maybe 10.15?)

The long-term solution might be to build any required libraries like that on CI instead of fetching them from Homebrew, unless there's a way to make Homebrew locally build the libraries an older macOS target? Have not explored whether that's possible, not using Homebrew on my Mac.

Alternatively, upgrading to Qt6 will also "solve" this issue by bumping up the minimum macOS version, more closely matching Homebrew's release support.
image
image


As a temporary workaround, here are replacement dylibs I fetched from a recent Nixpkgs revision. Placing them into ptcollab.app/Frameworks/ should fix the issue on affected versions.

More technical notes on these libraries

The librtmidi.6.dylib included here has extra dylib dependencies due to how it was built (libcelt, libjack, libopus) and I didn't look into slimming that down, this was done as a quick fix. It was also hex-edited to satisfy a version constraint demanded by the ptcollab binary, because it demands an RtMidi version 7.0.0 which… I'm not sure how it comes up with that version?
The vorbis libs might be fine as-is, but I've included replacements just in case.