Trouble Building In Mac OS

Trying to follow the Guide on the the wiki http://rawpedia.rawtherapee.com/MacOS and when downloading resources it says to use llvm 11 beacuse 12 has a bug. I have tried both the most current (13) located in /usr/local/Cellar/llvm/13.0.1_1/ and installed with brew install llvm. I also tried installing version 11 by using brew install llvm@11 located in /usr/local/Cellar/llvm@11/11.1.0_4/ I have changed my cmake command for each compilers location.

cmake … -DCMAKE_BUILD_TYPE=“release”
-DPROC_TARGET_NUMBER=“2”
-DCACHE_NAME_SUFFIX=“5.8-dev”
-DCMAKE_C_COMPILER=“/usr/local/Cellar/llvm/13.0.1_1/bin/clang”
-DCMAKE_CXX_COMPILER=“/usr/local/Cellar/llvm/13.0.1_1/bin/clang++”
-DWITH_LTO=“ON”
-DLENSFUNDBDIR=“/Applications/RawTherapee.app/Contents/Resources/share/lensfun”
-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=“/usr/local/lib/libomp.dylib”
-DOpenMP_CXX_FLAGS=“-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include”
-DOpenMP_CXX_LIB_NAMES=“libomp”
-DOpenMP_C_FLAGS=“-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include”
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_EXE_LINKER_FLAGS=“-L/usr/local/opt/libffi/lib -L/usr/local/lib”
-DCMAKE_AR=“/usr/local/Cellar/llvm/13.0.1_1/bin/llvm-ar”
-DCMAKE_RANLIB=“/usr/local/Cellar/llvm/13.0.1_1/bin/llvm-ranlib”
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.2

I get the following error

– The C compiler identification is Clang 13.0.1
– The CXX compiler identification is Clang 13.0.1
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Check for working C compiler: /usr/local/Cellar/llvm/13.0.1_1/bin/clang
– Check for working C compiler: /usr/local/Cellar/llvm/13.0.1_1/bin/clang - broken
CMake Error at /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler

"/usr/local/Cellar/llvm/13.0.1_1/bin/clang"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /Users/drover/Downloads/RawTherapee-metadata-exiv2/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_64626/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_64626.dir/build.make CMakeFiles/cmTC_64626.dir/build
Building C object CMakeFiles/cmTC_64626.dir/testCCompiler.c.o
/usr/local/Cellar/llvm/13.0.1_1/bin/clang   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -MD -MT CMakeFiles/cmTC_64626.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_64626.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_64626.dir/testCCompiler.c.o -c /Users/drover/Downloads/RawTherapee-metadata-exiv2/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_64626
/usr/local/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_64626.dir/link.txt --verbose=1
/usr/local/Cellar/llvm/13.0.1_1/bin/clang  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/usr/local/opt/libffi/lib -L/usr/local/lib  CMakeFiles/cmTC_64626.dir/testCCompiler.c.o -o cmTC_64626 
ld: library not found for -lSystem
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_64626] Error 1
make: *** [cmTC_64626/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:24 (project)

– Configuring incomplete, errors occurred!
See also “/Users/drover/Downloads/RawTherapee-metadata-exiv2/CMakeFiles/CMakeOutput.log”.
See also “/Users/drover/Downloads/RawTherapee-metadata-exiv2/CMakeFiles/CMakeError.log”.

Any ideas why this is happening would be appreciated. Also if there is any info i can provide that would help please ask for i will get back ASAP.

Thanks!

Sorry forgot to add that i did try the Run Build commands but they didn’t work either.

Hello @Jonathan_Drover, welcome to the forum.

I have old OSX 10.13.6, so not entirely relevant reference, but I have always found building RT from source on OSX to be hard. I used homebrew as a base. I have not tried the latest instructions though. My solution was to switch from OSX to Linux (with dual boot to Windows to operate Eizo Color Navigator calibration software). I had many other reasons to switch. My IMac was from 2010 and I wanted Linux.

Obviously OSX builds can be done, since we have these builds: Direct download links to the latest RawTherapee development version.

On the other hand, I find building on Linux (Debian) to be very easy and stable. I have had no issues.

Building on Linux is not helping at all on OSX unless you emulate Linux in a virtual machine. Hopefully an OSX RT expert can reach out.

Hey @KarlMagnusLarsson so I’m actually trying to build the tree for cr3 meta data support that you seem to be working on. I wasn’t home at the time but I’ve since built it using Linux which i knew would be easier just didn’t have it available at the time. Now the issue is getting a windows/mac output from building. It seems like there. The screens for my Linux machine sucks so id rather use my other machines for it. Still need to do some reading on the subject as Im sure its an easy thing to do I just need to look in to it but if you have any resources on the subject that would be helpful.