Hi, I have tried installing SOFIE on Mac OS, but I am met with errors again. Here is my process:
I have xcode already installed. I downloaded Protobuf then ran:
unzip protoc-3.19.4-osc-x86_64.zip -d %HOME/.local
export PATH="$PATH:$HOME/.local/bin"
Next I followed the instructions at Installing ROOT - ROOT, which meant I ran the following line by line:
$ git clone --branch latest-stable https://github.com/root-project/root.git root_src
$ mkdir root_build root_install && cd root_build
$ cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src -Dtmva-sofie=ON
$ cmake --build . -- install -j3
$ source ../root_install/bin/thisroot.sh
I was met with an error 48% into the build:
[ 48%] Built target MetaCling
[ 48%] **Creating directories for 'clad'**
[ 48%] **Performing download step (git clone) for 'clad'**
-- clad download command succeeded. See also /Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-download-*.log
[ 48%] **No update step for 'clad'**
[ 48%] **No patch step for 'clad'**
[ 48%] **Performing configure step for 'clad'**
CMake Error at /Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-Release.cmake:37 (message):
Command failed: 1
'/Applications/CMake.app/Contents/bin/cmake' '-G' 'Unix Makefiles' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_C_COMPILER=/Library/Developer/CommandLineTools/usr/bin/cc' '-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread -fPIC' '-DCMAKE_CXX_COMPILER=/Library/Developer/CommandLineTools/usr/bin/c++' '-DCMAKE_CXX_FLAGS= -std=c++11 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-strict-aliasing -Wwrite-strings -Wno-shadow -Wno-unused-parameter -Wno-deprecated-declarations -fPIC -fno-rtti' '-DCMAKE_CXX_STANDARD=11' '-DCMAKE_INSTALL_PREFIX=/Users/danielmilne/root_build/etc/cling//plugins' '-DLLVM_DIR=/Users/danielmilne/root_build/interpreter/llvm/src' '-DClang_DIR=/Users/danielmilne/root_build/interpreter/llvm/src/tools/clang/' '-DCLANG_INCLUDE_DIRS=/Users/danielmilne/root_src/interpreter/llvm/src/tools/clang/include' '/Users/danielmilne/root_build/interpreter/llvm/src/tools/clang/include' '-DCLAD_BUILD_STATIC_ONLY=ON' '-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON' '-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' '-GUnix Makefiles' '/Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad'
See also
/Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-*.log
-- stdout output is:
-- stderr output is:
CMake Warning:
Ignoring extra path from command line:
/Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad
CMake Error: The source directory "/Users/danielmilne/root_build/interpreter/llvm/src/tools/clang/include" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at /Users/danielmilne/root_build/interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure-Release.cmake:47 (message):
Stopping after outputting logs.
make[2]: *** [interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-stamp/clad-configure] Error 1
make[1]: *** [interpreter/cling/tools/plugins/clad/CMakeFiles/clad.dir/all] Error 2
make: *** [all] Error 2
I did the process again but I ignored clad by adding to the cmake line:
cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src -Dtmva-sofie=ON -Dclad=OFF
This built successfully and I tried the following which didn’t throw an error like in my broken Windows build:
root [0] using namespace **TMVA**::Experimental;
But there is an error when using SOFIE:
root [1] SOFIE::RModelParser_ONNX parser;
**ROOT_prompt_1:1:1:** **error:** **'SOFIE' is not a class, namespace, or enumeration**
SOFIE::RModelParser_ONNX parser;
**^**
**ROOT_prompt_1:1:1: note:** 'SOFIE' declared here
How can I go about fixing this error, presumably it is something to do with ignoring clad?
Many thanks for any help you can provide
Edit:
Some versions which may be useful:
Mac OS - 12.0.1
XCode - 13.2.1
Protocol Buffers - 3.19.4
Root - 6.20/06