I downloaded the latest version of ROOT, then:
Opened the Xcode project and built from inside. Everything was built smoothly that way.
Using cmake produced lot of failures.
I reinstalled Xcode using the command line:
cmake --build . --target intall
And ROOT compiled and runs on macOS Sierra 10.12
This thread was extremely helpful to me, I was having a similar issue to the OP.
I am only posting because there was a slight erratum in the instructions given upthread, the cmake invocation should be:
which is a directory that does not actually exist.
No, cmake …/root is correct, assuming that this is the path of the source code and your build directory is /opt/root_build.
git clone http://root.cern.ch/git/root.git
--> Clones the source code to /opt/root
--> You enter the build directory /opt/root_build
--> You point at where the source code is. Alternatively:
Note that it is recommended that source code and build directory are separated. Thus, you do not call mkdir root_build inside /opt/root/ but in /opt/
Ah, I misunderstood, I thought root_build was intended to be created as a subdirectory of root.
Hi everybody, I apologize for my late reply.
I absolutely needed Root from the beginning of this week, so I used MacPorts and everything went fine.
The instructions given by ferhue are correct, my problem was that I previously installed an old Root version (it was March 2016) and I probably deleted something important for the compiler while erasing this old version.
Thanks a lot for your help and I hope this discussion will be helpful.
Nice to hear!
Please remember to “mark as solved” (green tick).
I think this thread has been marked as solved but I would really appreciate if some can help me in fixing some problems with installing ROOT6 on Max OS Sierra 10.12. I have the following steps:
-- git clone http://root.cern.ch/git/root.git root6_src
-- mkdir root_build
-- cd build_root
-- cmake ../root6_src/ -DCMAKE_INSTALL_PREFIX=/usr/local/root -DPYTHON_EXECUTABLE=/opt/local/bin/python -DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/3.4/Headers -DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib -Droofit=ON -Dtmva=ON -Dminuit2=ON -Dpython=ON -Dcocoa=ON
-- cmake --build . --target install
[ 72%] Generating etc/allDict.cxx.pch
Traceback (most recent call last):
File "/Users/macbook/SW/root6_src/etc/dictpch/makepch.py", line 21, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 405, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_posixsubprocess.so, 2): Symbol not found: _PyString_AsString
Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_posixsubprocess.so
Expected in: flat namespace
gmake: *** [CMakeFiles/onepcm.dir/build.make:65: etc/allDict.cxx.pch] Error 1
gmake: *** [CMakeFiles/Makefile2:394: CMakeFiles/onepcm.dir/all] Error 2
gmake: *** [Makefile:152: all] Error 2
By default I am using python3.4, However if one looks at the error it complains or looks for something in python2.7. I would really appreciate if anyone can help me in this regard.
Sorry for the noise: I just realized that I was not changing the python path from python-2 to python-3. Fixing the
PYTHONPATH fixes every thing.
I haven’t tried Brew yet, but I can confirm you that the ROOT installation with MacPorts works fine.