MacSourcePorts / MSPBuildSystem

Mac Source Ports Build System
11 stars 4 forks source link

dxx-rebirth: inconsistent OS requirements #89

Open Kristine1975 opened 3 weeks ago

Kristine1975 commented 3 weeks ago

Both d1x-rebirth and d2x-rebirth have MacOS 10.7 as minimum OS version in their Info.plist. However, both applications fail to start on MacOS 10.14 because libpng16.16.dylib uses dyld load commands that require a more recent OS version. I checked using otool -l, and all dylibs use these load commands (libpng just happens to be the first one the main executable tries to load).

It seems it's only the libraries that can't be loaded, the main executable can be loaded on older OS versions.

Crash report:

Process:               d1x-rebirth [3951]
Path:                  /Applications/D1X-Rebirth.app/Contents/MacOS/d1x-rebirth
Identifier:            com.macsourceports.D1X-Rebirth
Version:               D1X-Rebirth v0.58.1 (0.6.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           d1x-rebirth [3951]
User ID:               501

Date/Time:             2024-08-19 12:53:33.810 +0200
OS Version:            Mac OS X 10.14.6 (18G9028)
Report Version:        12
Anonymous UUID:        736A5B3F-927F-9284-6170-16922E9FA505

Time Awake Since Boot: 13000 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @executable_path/libs-x86_64/libpng16.16.dylib
  Referenced from: /Applications/D1X-Rebirth.app/Contents/MacOS/d1x-rebirth
  Reason: no suitable image found.  Did find:
    /Applications/D1X-Rebirth.app/Contents/MacOS/libs-x86_64/libpng16.16.dylib: cannot load 'libpng16.16.dylib' (load command 0x80000034 is unknown)
    /Applications/D1X-Rebirth.app/Contents/MacOS/libs-x86_64/libpng16.16.dylib: stat() failed with errno=1
    /Applications/D1X-Rebirth.app/Contents/MacOS/libs-x86_64/libpng16.16.dylib: cannot load 'libpng16.16.dylib' (load command 0x80000034 is unknown)
    /Applications/D1X-Rebirth.app/Contents/MacOS/libs-x86_64/libpng16.16.dylib: stat() failed with errno=1

Binary Images:
       0x10cdec000 -        0x10cf07ffb +com.macsourceports.D1X-Rebirth (D1X-Rebirth v0.58.1 - 0.6.0) <2BC1DA8B-9E43-30DD-A3E3-A1D1306DA8B2> /Applications/D1X-Rebirth.app/Contents/MacOS/d1x-rebirth
       0x113f57000 -        0x113fc170f  dyld (655.1.1) <5C085E07-E51D-35EC-BE29-92A5782AA39F> /usr/lib/dyld
MacSourcePortsAdmin commented 3 weeks ago

Yes, this is because of my approach of bundling Homebrew libraries, which are always built or delivered for the version of macOS you're running. There was a breaking change from 10.14 to 10.15 (likely timed to coincide to the 32-bit cutoff) and so the libraries don't work prior to 10.15.

I've been working for a few months now on building all my own libraries with reverse compatibility as far back as 10.7, and now I'm trying to do rebuilds of all the projects. I'll let you know when I get DXX-Rebirth rebuilt.

Kristine1975 commented 3 weeks ago

Thank you for your reply! And thank you both for maintaining compatibility with older OS, and for the Mac Source Ports project in general!