I tried to compile and install RawTherapee on my Mac Mini M1, but the programs crashes instantly when I try to run it.
I used HomeBrew to install the dependencies.
cmake command and its output:
export PKG_CONFIG_PATH=/opt/homebrew/Cellar/libffi/3.3_2/lib/pkgconfig:/opt/homebrew/Cellar/expat/2.2.10/lib/pkgconfig && \
/opt/homebrew/Cellar/cmake/3.19.4/bin/cmake .. -DCMAKE_BUILD_TYPE="release" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.1" \
-DPROC_TARGET_NUMBER="1" \
-DCACHE_NAME_SUFFIX="5.8-dev" \
-DCMAKE_C_COMPILER="/opt/homebrew/Cellar/llvm/11.0.1/bin/clang" \
-DCMAKE_CXX_COMPILER="/opt/homebrew/Cellar/llvm/11.0.1/bin/clang++" \
-DWITH_LTO="ON" \
-DLENSFUNDBDIR="/Users/sguyader/.local/share/lensfun/updates/version_2" \
-DCMAKE_BUILD_TYPE=Release \
-DOpenMP_C_FLAGS="-fopenmp=libomp" \
-DOpenMP_CXX_FLAGS="-fopenmp=libomp" \
-DOpenMP_C_LIB_NAMES="libomp" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_libomp_LIBRARY="/opt/homebrew/lib/libomp.dylib" \
-DOpenMP_CXX_FLAGS="-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /opt/homebrew/lib/libomp.dylib -I/opt/homebrew/include/" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_C_FLAGS="-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /opt/homebrew/lib/libomp.dylib -I/opt/homebrew/include/" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/Cellar/libffi/3.3_2/lib -L/opt/homebrew/lib" \
-DCMAKE_AR="/opt/homebrew/Cellar/llvm/11.0.1/bin/llvm-ar" \
-DCMAKE_RANLIB="/opt/homebrew/Cellar/llvm/11.0.1/bin/llvm-ranlib"
-- The C compiler identification is Clang 11.0.1
-- The CXX compiler identification is Clang 11.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/Cellar/llvm/11.0.1/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/Cellar/llvm/11.0.1/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE: Release
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Checking for module 'gtk+-3.0>=3.16'
-- Found gtk+-3.0, version 3.24.24
-- Checking for module 'gtkmm-3.0>=3.16'
-- Found gtkmm-3.0, version 3.24.3
-- Checking for module 'glib-2.0>=2.48'
-- Found glib-2.0, version 2.66.4
-- Checking for module 'glibmm-2.4>=2.48'
-- Found glibmm-2.4, version 2.66.0
-- Checking for module 'cairomm-1.0'
-- Found cairomm-1.0, version 1.14.2
-- Checking for module 'gio-2.0>=2.48'
-- Found gio-2.0, version 2.66.4
-- Checking for module 'giomm-2.4>=2.48'
-- Found giomm-2.4, version 2.66.0
-- Checking for module 'gthread-2.0>=2.48'
-- Found gthread-2.0, version 2.66.4
-- Checking for module 'gobject-2.0>=2.48'
-- Found gobject-2.0, version 2.66.4
-- Checking for module 'sigc++-2.0>=2.3.1'
-- Found sigc++-2.0, version 2.10.6
-- Checking for module 'lensfun>=0.2'
-- Found lensfun, version 0.3.95.0
-- Checking for module 'librsvg-2.0>=2.40'
-- Found librsvg-2.0, version 2.50.3
-- Checking for module 'lcms2>=2.6'
-- Found lcms2, version 2.11
-- Checking for module 'expat>=2.1'
-- Found expat, version 2.2.10
-- Checking for module 'fftw3f'
-- Found fftw3f, version 3.3.9
-- Checking for module 'libiptcdata'
-- Found libiptcdata, version 1.0.4
-- Checking for module 'libtiff-4>=4.0.4'
-- Found libtiff-4, version 4.2.0
-- Found JPEG: /opt/homebrew/lib/libjpeg.dylib (found version "90")
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Found PNG: /opt/homebrew/lib/libpng.dylib (found version "1.6.37")
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
-- Binutils version detected as less than 2.29 - setting CMake parameters to enable LTO linking:
CMAKE_AR="/opt/homebrew/Cellar/llvm/11.0.1/bin/llvm-ar"
CMAKE_RANLIB="/opt/homebrew/Cellar/llvm/11.0.1/bin/llvm-ranlib"
-- Found OpenMP_C: -Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /opt/homebrew/lib/libomp.dylib -I/opt/homebrew/include/ (found version "5.0")
-- Found OpenMP_CXX: -Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /opt/homebrew/lib/libomp.dylib -I/opt/homebrew/include/ (found version "5.0")
-- Found OpenMP: TRUE (found version "5.0")
-- Performing Test _fftw3f_multithread
-- Performing Test _fftw3f_multithread - Failed
-- Performing Test LENSFUN_HAS_LOAD_DIRECTORY
-- Performing Test LENSFUN_HAS_LOAD_DIRECTORY - Success
-- Found MacIntegration: /opt/homebrew/lib/libgtkmacintegration-gtk3.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sguyader/PhotoApps/rtrepo/build
Compiling succeeded but I got the following warning a number of times:
clang-11: warning: /opt/homebrew/lib/libomp.dylib: 'linker' input unused [-Wunused-command-line-argument]
And at the end of the building process:
[100%] Built target rth-cli
ld: LTO remark: <unknown>:0:0: loop not vectorized: value that could not be identified as reduction is used outside the loop
ld: warning: <unknown>:0:0: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering
ld: warning: <unknown>:0:0: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering
[100%] Built target rth
/opt/homebrew/Cellar/cmake/3.19.4/bin/cmake -E cmake_progress_start /Users/sguyader/PhotoApps/rtrepo/build/CMakeFiles 0
Here’s the crash info:
Process: rawtherapee [51668]
Path: /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
Identifier: com.rawtherapee.RawTherapee
Version: 5.8.2664 (5.8.2664)
Code Type: ARM-64 (Native)
Parent Process: ??? [1]
Responsible: rawtherapee [51668]
User ID: 501
Date/Time: 2021-02-01 21:37:18.255 -0400
OS Version: macOS 11.1 (20C69)
Report Version: 12
Anonymous UUID: 645651DB-3F03-76CF-AC23-A5BF04C101EF
Time Awake Since Boot: 11000 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_FALLBACK_LIBRARY_PATH=/Applications/RawTherapee.app/Contents/Frameworks
Dyld Error Message:
dyld: Using shared cache: 64510D3B-D7B4-3C73-803C-AD9F01B790AD
Library not loaded: /Applications/RawTherapee.app/Contents/Frameworks/libomp.dylib
Referenced from: /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
Reason: image not found
Binary Images:
0x102248000 - 0x102b23fff +com.rawtherapee.RawTherapee (5.8.2664 - 5.8.2664) <94248D24-143E-33D4-982F-4921B416B03E> /Applications/RawTherapee.app/Contents/MacOS/rawtherapee
0x102f18000 - 0x102f93fff dyld (832.7.1) <B7DB9E8A-A898-3C11-91A0-2B0264F05CB6> /usr/lib/dyld
Model: Macmini9,1, BootROM 6723.61.3, proc 8:4:4 processors, 8 GB, SMC
Graphics: kHW_AppleM1Item, Apple M1, spdisplays_builtin
Memory Module: lp_ddr4
AirPort: spairport_wireless_card_type_airport_extreme, wl0: Oct 20 2020 12:49:54 version 18.20.222.14.7.8.100 FWID 01-ba327c2d
Bluetooth: Version 8.0.2f9, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
USB Device: USB 3.1 Bus
USB Device: USB3.0 Hub
USB Device: USB2.0 Hub
USB Device: CHERRY Wired Keyboard
USB Device: USB 3.1 Bus
USB Device: BillBoard Device
USB Device: USB 3.0 Bus
USB Device: USB 2.0 Hub
USB Device: Portable SSD T5
USB Device: USB Receiver
USB Device: UMC204HD 192k
Thunderbolt Bus: Mac mini, Apple Inc., 0.0
Thunderbolt Bus: Mac mini, Apple Inc., 0.0