To achieve this I unfortunately had to disable libomp support as it was creating linking issues.
Otherwise I’d end up the compilation with a make error 2 right after a linker error
Undefined symbols for architecture x86_64:
"___kmpc_barrier", referenced from:
...
Here are the steps I followed:
Prebuild options
I edited the CMakeLists.txt options changing:
option(OPTION_OMP "Build with OpenMP support" ON)
In:
option(OPTION_OMP "Build with OpenMP support" OFF)
And in any case I’ve added at the end of the page:
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lomp")
I also added an option to hide “deprecate-register” warnings that were cluttering the make output changing:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-unused-result")
into:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-result")
.
Building ART
In order to build it:
mkdir build
→ creating the folder in which to build the project
cd build
→ changing folder
export SYSTEM_VERSION_COMPAT=1
→ it expects to find macOS version 10.something while newer versions of macOS are actually using version 12, this makes the OS appear to the compiler as 10.16
sudo xcode-select --switch /Applications/Xcode.app
→ don’t really know why but it stopped at 1% if I selected /Library/Developers/CommandLineTools as compilation tools
export
option to support library indexing of software installed through brew, otherwise the compilation would stop at 2% telling me that libssh.h couldn’t be found from exiv2 sources, there should be some way to add those onto the CMakeLists.txt file but I really don’t know how.
export LIBRARY_PATH=/usr/local/opt/libtiff/lib:/usr/local/opt/libssh/lib:/usr/local/opt/libomp/lib:/usr/local/lib
export C_INCLUDE_PATH=/usr/local/opt/libssh/include:/usr/local/opt/libomp/include:/usr/local/include
export CPLUS_INCLUDE_PATH=/usr/local/opt/libssh/include:/usr/local/opt/libomp/include:/usr/local/include
cmake ..
→ loads the build environment from root folder
make
→ to compile the program
make install
→ to collect the remaining files
make macosx_bundle
→ this creates a dmg file containing the built ART version.
Comments
Does anyone know if and how libomp is affecting the program itself and how to fix this problem?
Also I’ve noticed the graphics of the program are not retina-ready but currently showing as lower resolution, is there any way to fix this as well? I’ve tried opening an issue on agriggio’s bitbucket repo but really couldn’t as that page loads as I was not logged in on bitbucket.
Download link
I’ve uploaded the disk image output here:
with libomp and without libraw → https://file.io/oJPXb1IPoPDt
without libomp and with libraw → https://file.io/MNuzrUT7I8ax
Update
After reinstalling command line tools and after a few problems with Xcode I’ve retried building it with the only addition of set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lomp")
and apparently managed to build it. Don’t really know what’s going on as I had already tried this config.
Here is the current CMakeLists.txt: https://file.io/BYSEojdDXwXM