RawTherapee-dev Apple M1 𝛽-test

https://kd6kxr.keybase.pub/RawTherapee_macOS_11.3_arm64_5.8-3033-g55ceb5b24.zip
https://kd6kxr.keybase.pub/RawTherapee_macOS_11.3_arm64_5.8-3034-g8bd9bddfc.zip

https://kd6kxr.keybase.pub/RawTherapee_macOS_11.3_arm64_5.8-3046-g5268b94cf.zip
Here’s a native arm64 build for M1 for your testing.


  • It will not run on Intel-based Macs.

  • Slider-buttons are not grabbable on the macOS 12 Monterey-beta, which some of you may be using now. This is probably due to a change in the way Monterey interprets and reports mouse movements to gtk+3, the graphical interface engine of RT.


There is an associated PR for the bundle fix:


Also note that your contribution is optional and useful, as M1 Macs don’t come free.

rbcode

4 Likes

Error in libomp12, have downgraded to 11.1 and replaced build. This introduces a crash-after-exit which appears non-destructive.

Hi, your M1 build works fine on my M1 Mac Mini.

I tried to compile it, using the instructions from Rawpedia, but the build crashes immediately.
Do you have specific instructions for M1 builds?

Ultimately, I’d also like to try compiling ART for MacOS.

Edit: I get this crash report when I close RT

Process:               rawtherapee [50096]
Path:                  /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
Identifier:            com.rawtherapee.RawTherapee
Version:               5.8.2953 (5.8.2953)
Code Type:             ARM-64 (Native)
Parent Process:        ??? [1]
Responsible:           rawtherapee [50096]
User ID:               501

Date/Time:             2021-08-27 10:29:34.227 -0400
OS Version:            macOS 11.5.2 (20G95)
Report Version:        12
Anonymous UUID:        645651DB-3F03-76CF-AC23-A5BF04C101EF


Time Awake Since Boot: 930 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

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

Termination Reason:    DYLD, [0x4] Symbol missing

Dyld Error Message:
  Symbol not found: _fftwf_cleanup_threads
  Referenced from: /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
  Expected in: flat namespace

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   dyld                          	0x000000010103ede0 __abort_with_payload + 8
1   dyld                          	0x0000000101047110 abort_with_payload_wrapper_internal + 104
2   dyld                          	0x0000000101047144 abort_with_payload + 16
3   dyld                          	0x0000000100fe191c dyld::halt(char const*) + 652
4   dyld                          	0x0000000100fe19e8 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 204
5   libdyld.dylib                 	0x0000000199d2bcf4 _dyld_fast_stub_entry(void*, long) + 168
6   libdyld.dylib                 	0x0000000199d2bc14 dyld_stub_binder + 60
7   com.rawtherapee.RawTherapee   	0x000000010055bb80 main + 3756
8   libdyld.dylib                 	0x0000000199d2d430 start + 4

Thread 1:
0   libsystem_pthread.dylib       	0x0000000199d0a5cc start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	0x0000000199d0a5cc start_wqthread + 0

...

I wonder if this means fftw-f needs different configure options.

When I run cmake, the test for multithreaded fftw-f always fails, I don’t know if it’s normal.

In fact when I compile RT, I see that it launches fine if I run it from command line (inside build/MacOS).
It’s the bundle generation that fails:

Creating macOS bundle
PROJECT_NAME:           RawTherapee
PROJECT_VERSION:        5.8.2953
PROJECT_SOURCE_DIR:     /Users/sguyader/PhotoApps/rtrepo
CMAKE_BUILD_TYPE:       release
PROC_BIT_DEPTH:         64
MINIMUM_SYSTEM_VERSION: 11.4
GTK_PREFIX:             /opt/homebrew/Cellar/gtk+3/3.24.30
PWD:                    /Users/sguyader/PhotoApps/rtrepo/build

-- Removing old files:

-- Creating bundle container:

-- Copying binary executable files.

-- Copying Resources directory.
ditto: Cannot get the real path for source '/opt/share/lensfun/version_2/*'
ditto: Cannot get the real path for source '/opt/lib/liblensfun.2.dylib'
ditto: Cannot get the real path for source '/opt/lib/libomp.dylib'

-- Copying dependencies from /opt/homebrew/Cellar/gtk+3/3.24.30.
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libexpat.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgtkmacintegration-gtk3.4.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libfftw3f.3.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libfftw3f_omp.3.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgiomm-2.4.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgio-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libglibmm-2.4.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgobject-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libglib-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libintl.8.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libsigc-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgthread-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgtkmm-3.0.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libatkmm-1.6.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgdkmm-3.0.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgtk-3.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgdk-3.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libatk-1.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libcairo-gobject.2.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libpangomm-1.4.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libcairomm-1.0.1.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libpangocairo-1.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libpango-1.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libharfbuzz.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libcairo.2.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libgdk_pixbuf-2.0.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libiptcdata.0.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libjpeg.9.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/liblcms2.2.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libpng16.16.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libtiff.5.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/liblensfun.2.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/librsvg-2.2.dylib (No such file or directory)
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: RawTherapee.app/Contents/Frameworks/libomp.dylib (No such file or directory)

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee-cli

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee
ditto: Cannot get the real path for source '/opt/lib/libjpeg.62.dylib'
ditto: Cannot get the real path for source 'pkgcfg_lib_EXPAT_expat:FILEPATH=/opt/homebrew/Cellar/expat/2.4.1/lib/libexpat.dylib'
ditto: Cannot get the real path for source '/opt/lib/libz.1.dylib'
ditto: Cannot get the real path for source '/opt/lib/libpng16.16.dylib'
ditto: Cannot get the real path for source '/opt/lib/libpng12.0.dylib'
ditto: Cannot get the real path for source '/opt/lib/libtiff.5.dylib'
ditto: Cannot get the real path for source '/opt/lib/libomp.dylib'

-- Copying configuration files from /opt/homebrew/Cellar/gtk+3/3.24.30:
cp: /opt//lib/gdk-pixbuf-2.0: No such file or directory

-- Copying library modules from /opt/homebrew/Cellar/gtk+3/3.24.30:
cp: /opt//lib/gdk-pixbuf-2.0: No such file or directory
ditto: can't get arch info for ''
ditto: Could not parse the Mach-O architectures to copy

-- Removing static libraries and cache files:

-- Flattening the Frameworks folder
cp: RawTherapee.app/Contents/Frameworks/gdk-pixbuf-2.0/2*/loaders/*: No such file or directory
cp: RawTherapee.app/Contents/Frameworks/gtk-3.0/3*/immodules/*.dylib: No such file or directory
cp: RawTherapee.app/Contents/Frameworks/gtk-3.0/3*/immodules/*.so: No such file or directory
rm: RawTherapee.app/Contents/Frameworks/gtk-3.0: No such file or directory
rm: RawTherapee.app/Contents/Frameworks/gdk-pixbuf-2.0: No such file or directory

-- Copy GTK+3 theme and icon resources:
ditto: Cannot get the real path for source '/opt/share/themes/Mac/gtk-3.0/gtk-keys.css'
ditto: Cannot get the real path for source '/opt/share/themes/Default/gtk-3.0/gtk-keys.css'

-- Copy Adwaita icons
cp: /opt/share/icons/Adwaita/16x16/actions/*: No such file or directory
cp: /opt/share/icons/Adwaita/16x16/devices/*: No such file or directory
cp: /opt/share/icons/Adwaita/16x16/mimetypes/*: No such file or directory
cp: /opt/share/icons/Adwaita/16x16/places/*: No such file or directory
cp: /opt/share/icons/Adwaita/16x16/status/*: No such file or directory
cp: /opt/share/icons/Adwaita/16x16/ui/*: No such file or directory
cp: /opt/share/icons/Adwaita/48x48/devices/*: No such file or directory
cp: /opt/share/icons/Adwaita/index.theme: No such file or directory
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 244: /opt/bin/gtk-update-icon-cache: No such file or directory
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 244: /opt/bin/gtk-update-icon-cache-3.0: No such file or directory
cp: /opt/share/icons/hicolor: No such file or directory
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/* (No such file or directory)

-- Build GTK3 databases:
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 254: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gdk-pixbuf.loaders: No such file or directory
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 255: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules: No such file or directory
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 255: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules: No such file or directory
sed: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gdk-pixbuf.loaders: No such file or directory
sed: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules: No such file or directory
sed: RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules: No such file or directory
rm: RawTherapee.app/Contents/Resources/etc/*.bak: No such file or directory

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee-cli

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee

-- Copying shared files from /opt/homebrew/Cellar/gtk+3/3.24.30:
ditto: Cannot get the real path for source '/opt/share/mime'

-- Installing required application bundle files:
Directory 'RawTherapee.app/Contents/Resources/share/mime/packages' does not exist!
cp: /opt/share/locale: No such file or directory

-- Build glib database:
cp: /opt/share/glib-2.0/schemas: No such file or directory
/Users/sguyader/PhotoApps/rtrepo/tools/osx/macosx_bundle.sh: line 282: /opt/bin/glib-compile-schemas: No such file or directory

-- Registering @rpath into the main executable.

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee-cli

-- Modifying install names: RawTherapee.app/Contents/MacOS/rawtherapee

-- Registering @rpath in Frameworks folder.
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*dylib (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*dylib (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*so (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*so (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*cli (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: RawTherapee.app/Contents/Frameworks/*cli (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: RawTherapee.app/Contents/Frameworks found in: RawTherapee.app/Contents/MacOS/rawtherapee-cli (for architecture arm64), required for specified option "-delete_rpath RawTherapee.app/Contents/Frameworks"

-- Preparing disk image sources at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/43520.XXXXXXXXXXXX.jtDHUrgg:

-- Creating disk image:
...................................................................
created: /Users/sguyader/PhotoApps/rtrepo/build/RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc.dmg

-- Zipping disk image for redistribution:
  adding: RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc_folder/ (stored 0%)
  adding: RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc_folder/RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc.dmg (deflated 2%)
  adding: RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc_folder/rawtherapee-cli (deflated 61%)
  adding: RawTherapee_macOS_11.4__5.8-3034-g8bd9bddfc_folder/INSTALL.readme.rtf (deflated 36%)

-- Finishing build:
Script complete.
Built target macosx_bundle

-DLOCAL_PREFIX value in the cmake issuance should be set to /opt/homebrew instead of /opt as I see some possibly incomplete paths.

1 Like

I changed the prefix to /opt/homebrew but it still doesn’t work:

And when I install RT from the new bundle, it crashes instantly:

Process:               rawtherapee [7785]
Path:                  /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
Identifier:            com.rawtherapee.RawTherapee
Version:               5.8.2953 (5.8.2953)
Code Type:             ARM-64 (Native)
Parent Process:        ??? [1]
Responsible:           rawtherapee [7785]
User ID:               501

Date/Time:             2021-08-27 14:54:35.953 -0400
OS Version:            macOS 11.5.2 (20G95)
Report Version:        12
Anonymous UUID:        645651DB-3F03-76CF-AC23-A5BF04C101EF

Sleep/Wake UUID:       26EFA95F-3776-425B-96AA-4CDDD9123803

Time Awake Since Boot: 13000 seconds
Time Since Wake:       6500 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:
  dyld: Using shared cache: 74867C57-7C81-38D6-BB42-68EC05B7B3CB
Library not loaded: /Applications/RawTherapee.app/Contents/Frameworks/libgtkmacintegration-gtk3.4.dylib
  Referenced from: /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
  Reason: image not found

Binary Images:
       0x104b08000 -        0x1054fffff +com.rawtherapee.RawTherapee (5.8.2953 - 5.8.2953) <BF41ACD5-F47E-3946-AEDB-4D5EEBB538DB> /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
       0x105ac0000 -        0x105b3ffff  dyld (852.2) <17D14D9B-B6B2-35DC-B157-4FD60213BE99> /usr/lib/dyld
       0x19ab52000 -        0x19aedefff  com.apple.Foundation (6.9 - 1777.103) <B64AAE92-8C63-3FF9-8C0C-F9C10FCE7782> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x1a4388000 -        0x1a43a1fff  libexpat.1.dylib (26) <D6660721-945B-3EB1-81A9-9A1C806D78F1> /usr/lib/libexpat.1.dylib

Model: Macmini9,1, BootROM 6723.140.2, proc 8:4:4 processors, 8 GB, SMC 
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: LPDDR4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Jul  7 2021 00:48:27 version 18.50.40.10.7.8.121 FWID 01-f5ad2691
Bluetooth: Version 8.0.5d7, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
USB Device: BillBoard Device
USB Device: USB 3.0 Bus
USB Device: USB3.1 Hub
USB Device: UMC204HD 192k
USB Device: USB2.1 Hub
USB Device: CHERRY Wired Keyboard
USB Device: Android
Thunderbolt Bus: Mac mini, Apple Inc.
Thunderbolt Bus: Mac mini, Apple Inc.

Ok, be sure to apply the diff from the PR mentioned above, and also the architecture flag.

curl https://patch-diff.githubusercontent.com/raw/Beep6581/RawTherapee/pull/6346.diff | git apply

To your cmake command add the following flags:

-DLOCAL_PREFIX:STRING="/opt/homebrew"

-DCMAKE_OSX_ARCHITECTURES=arm64

I just added these flags to rawpedia, too.

1 Like

Thanks! There’s some progress, but still some issues left: mostly warnings about file changes and code signing, but also problems with GTK3 databases building (files not found) and errors about @rpath registering in Frameworks folder,

The app crashes a couple seconds later than before:

Process:               rawtherapee [47129]
Path:                  /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
Identifier:            com.rawtherapee.RawTherapee
Version:               5.8.2954 (5.8.2954)
Code Type:             ARM-64 (Native)
Parent Process:        ??? [1]
Responsible:           rawtherapee [47129]
User ID:               501

Date/Time:             2021-08-27 15:38:40.788 -0400
OS Version:            macOS 11.5.2 (20G95)
Report Version:        12
Anonymous UUID:        645651DB-3F03-76CF-AC23-A5BF04C101EF

Sleep/Wake UUID:       435CCD52-D9AF-4A31-8091-82ECEAE9BE76

Time Awake Since Boot: 16000 seconds
Time Since Wake:       9100 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x00000001051d8000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x1051d8000:
    __LINKEDIT                  104f68000-1051d8000    [ 2496K] r--/r-- SM=COW  /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
--> mapped file                 1051d8000-1051dc000    [   16K] r--/r-x SM=PRV  Object_id=7fd4e1f5
    __TEXT                      10545c000-1054dc000    [  512K] r-x/r-x SM=COW  /usr/lib/dyld

Application Specific Information:
dyld: launch, loading dependent libraries
/Applications/RawTherapee.app/Contents/Frameworks/libgtkmacintegration-gtk3.4.dylib

Thread 0 Crashed:
0   dyld                          	0x00000001054ba1e0 memcmp + 16
1   dyld                          	0x000000010547a7fc ImageLoaderMachO::validateFirstPages(linkedit_data_command const*, int, unsigned char const*, unsigned long, long long, ImageLoader::LinkContext const&) + 136
2   dyld                          	0x000000010548178c ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 268
3   dyld                          	0x00000001054793ec ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 172
4   dyld                          	0x0000000105460588 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 668
5   dyld                          	0x0000000105469bd0 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1368
6   dyld                          	0x00000001054695f4 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 208
7   dyld                          	0x0000000105469300 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1100
8   dyld                          	0x0000000105468ac4 dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 252
9   dyld                          	0x0000000105460104 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 468
10  dyld                          	0x000000010545fca8 dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + 196
11  dyld                          	0x000000010546a574 dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*, unsigned int&) + 56
12  dyld                          	0x0000000105474970 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 344
13  dyld                          	0x0000000105473128 ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&, char const*) + 160
14  dyld                          	0x0000000105462a08 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&, unsigned int) + 328
15  dyld                          	0x0000000105465208 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 7964
16  dyld                          	0x000000010545d258 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 476
17  dyld                          	0x000000010545d038 _dyld_start + 56

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x00000001051d8000   x1: 0x000000016b999600   x2: 0x0000000000001288   x3: 0x0000000000040001
    x4: 0x0000000000000003   x5: 0x0000000000000000   x6: 0x00000001054e4280   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x000000016b999fe0  x10: 0x0000000000000001  x11: 0x0001803000000000
   x12: 0x0000000000000032  x13: 0x0004000000000000  x14: 0x000000000001ce48  x15: 0x000000016b999f60
   x16: 0x00000000000000c5  x17: 0x000000016b999f78  x18: 0x0000000000000000  x19: 0x00000001054e9930
   x20: 0x0000000000001298  x21: 0x000000016b999600  x22: 0x00000001051d8000  x23: 0x0000000000000003
   x24: 0x000000016b99a848  x25: 0x000000016b9a1718  x26: 0x000000010445c800  x27: 0x000000016b999600
   x28: 0x0000000000000016   fp: 0x000000016b999000   lr: 0x000000010547a7fc
    sp: 0x000000016b998fc0   pc: 0x00000001054ba1e0 cpsr: 0x20000000
   far: 0x00000001051d8000  esr: 0x92000007


Binary Images:
       0x10445c000 -        0x104e53fff +com.rawtherapee.RawTherapee (5.8.2954 - 5.8.2954) <4C70CA9D-C987-3915-A8A2-A241682BD000> /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
       0x10545c000 -        0x1054dbfff  dyld (852.2) <17D14D9B-B6B2-35DC-B157-4FD60213BE99> /usr/lib/dyld
       0x19ab52000 -        0x19aedefff  com.apple.Foundation (6.9 - 1777.103) <B64AAE92-8C63-3FF9-8C0C-F9C10FCE7782> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x1a4388000 -        0x1a43a1fff  libexpat.1.dylib (26) <D6660721-945B-3EB1-81A9-9A1C806D78F1> /usr/lib/libexpat.1.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=506.7M resident=0K(0%) swapped_out_or_unallocated=506.7M(100%)
Writable regions: Total=8416K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8416K(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8176K        1 
VM_ALLOCATE                        1.0G        1 
__AUTH                              45K        1 
__AUTH_CONST                       243K        2 
__DATA                             372K        5 
__DATA_CONST                      1235K        4 
__DATA_DIRTY                        29K        1 
__LINKEDIT                       492.6M        4 
__OBJC_CONST                       112K        1 
__TEXT                            14.1M        4 
mapped file                         16K        1 
===========                     =======  ======= 
TOTAL                              1.6G       26 

Model: Macmini9,1, BootROM 6723.140.2, proc 8:4:4 processors, 8 GB, SMC 
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: LPDDR4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Jul  7 2021 00:48:27 version 18.50.40.10.7.8.121 FWID 01-f5ad2691
Bluetooth: Version 8.0.5d7, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
USB Device: USB 3.1 Bus
USB Device: USB 3.1 Bus
USB Device: BillBoard Device
USB Device: USB 3.0 Bus
USB Device: USB3.1 Hub
USB Device: UMC204HD 192k
USB Device: USB2.1 Hub
USB Device: CHERRY Wired Keyboard
USB Device: Android
Thunderbolt Bus: Mac mini, Apple Inc.
Thunderbolt Bus: Mac mini, Apple Inc.

Also try a git pull as the version is behind.

I had done the git pull already, and applied your patch right after.

% git describe

5.8-3035-g42fecdada

Is your version up to commit 42fecdada on dev?

Yes it is.

The codesignature doesnt have to be Apple dev, but at least signed with a self signed cert. Not sure if Big Sur or Monterey have any bypass mechanism for that.

But besides the code signature, there are some errors that might be more important (I think… I’m just a noob on MacOS).

For example, the GTK3 libs are not copied. And that @rpath thing looks suspicious to me.

I found this about code signing: Code-signing requirements for scripts and apps in Big Sur – The Eclectic Light Company

If I understand, I should be able to sign my app with an ad-hoc signature, without the need to be an Apple dev. Now I have to figure out how to get such ad-hoc signature. Otherwise, I’ll try building the app with Xcode.

I read that to get an ad-hoc signature, you just need to provide the “-” identity to codesign. I tried and added -DCODESIGNID="-" to the cmake options, but it didn’t change.

Most importantly you’ll have to generate the certificate/identity for codesign to use.

Unfortunately Monterey does not give me the same symbology in the crash reports as Big Sur is giving you. Also note that homebrew M1 binaries poured from bottles come codesigned. Codesigning the app yourself will override those signature components. If you brew install --build-from-source everything, there shouldn’t be artifact signatures. They throw warnings but won’t error.
Seems like your macosx_bundle.sh may not be calculating the path for the correct gtk+3 thingies. Those errors should not be. Most other warnings in the script is ignorable and due to a bit of redundant recursion which provides for the configuration of the chain of dependencies within the set of libraries.

1 Like

Here’s another method that works by generating the cert on the command line, and importing the resulting .p12 into Keychain Access.

ref.
https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG10

1 Like