I’ve been trying to install ROOT 6.14/04 compiling from source using cmake on macOS 10.14. I followed the guidelines for building root.
While compiling I get the following error:
CMake Error at /Applications/root-6.14.04/FREETYPE-prefix/src/FREETYPE-stamp/FREETYPE-configure-RelWithDebInfo.cmake:16 (message):
Command failed: 2
'./configure' '--prefix' '/Applications/root-6.14.04/FREETYPE-prefix' '--with-pic' '--disable-shared' '--with-png=no' '--with-bzip2=no' '--with-harfbuzz=no' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc' 'CFLAGS=-O'
See also
/Applications/root-6.14.04/FREETYPE-prefix/src/FREETYPE-stamp/FREETYPE-configure-*.log
make[2]: *** [FREETYPE-prefix/src/FREETYPE-stamp/FREETYPE-configure] Error 1
make[1]: *** [CMakeFiles/FREETYPE.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I have reinstalled Xcode (last version) after updating my laptop, and I installed the command line tools running xcode-select --install. I attach the files /Applications/root-6.14.04/FREETYPE-prefix/src/FREETYPE-stamp/FREETYPE-configure-*.log.
I was absolutely able to build even 6.12/06 on Mojave myself. But I did have to do a few things…
Calling xcode-select --install was a good move, you of course have to do that after the whole Mojave update;
I found while I was trying to build Python-2.7.13, that I also had to install system header files under /usr/include to make the Python build successful. This is sort of a long story, you can read a bit more about it under for instance:
Bottom line is, you should execute the following to get the headers installed:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Finally, I had to call
export MACOSX_DEPLOYMENT_TARGET=10.14
before starting my build. More of this is explained on for instance:
So… With the headers installed, and MACOSX_DEPLOYMENT_TARGET set, I was able to build ROOT without problems.
thank you both for your comments. Last night I successfully tried to install ROOT master. The installation went smooth except for the warning: warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]. I have tested the installation on some macros and it seems to work just fine.
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg is what we’d like to avoid. We prefer to change ROOT, rather than forcing users to change their (default) configuration. And by default, MacOS will not have /usr/include anymore, and ROOT’s master can cope with this just fine
Depending on what other software one wants to build, unfortunately this seems unavoidable to install… As I started, ROOT was not the first thing that started failing for me. It was Python. And by the time I made the Python build work, ROOT built itself without any further issues.
Note at the same time that once I produced my binaries, I’m pretty sure that I would not need the headers from /usr/include to use these binaries. At least I’ve been advising the ATLAS users to try using the centrally provided analysis release binaries without installing the /usr/include headers, and so far nobody complained. So if you’re worried about people having to install those files, maybe Mojave binaries should be put on https://root.cern.ch/downloading-root for the last few production versions.
Yes but let’s get this straight: ROOT doesn’t require any system modifications, like installing stuff in /usr/include. ROOT master and soon 6.14 build out-of-the-box on MacOS 10.14 - as they should.
Hi there,
I have successfully installed root via git with the standard instructions. root works fine. But PyRoot doesn’t see to be able to load a lib??
% python
Python 2.7.10 (default, Aug 17 2018, 17:41:52)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/Users/schaffer/work/root/lib/ROOT.py”, line 24, in
import cppyy
File “/Users/schaffer/work/root/lib/cppyy.py”, line 61, in
import libPyROOT as _backend
ImportError: dlopen(/Users/schaffer/work/root/lib/libPyROOT.so, 2): Library not loaded: @rpath/libTree.so
Referenced from: /Users/schaffer/work/root/lib/libPyROOT.so
Reason: image not found
Just for info, the current ROOT 6.14.04 builds just fine as part of the MacPorts distribution. However, a user has reported to me an issue with compiling things via ACLiC. See
Solution as discussed there was to install /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg.
Of course, as I pointed out, compiling scripts is really not needed that much any longer, with ROOT6 cling. But nevertheless it is another consequence of the /usr changes in mac OS 10.14.
It seems 6.14.06 is out but it still has the build issue with freetype, when /usr/include headers are missing. Did the fixes for this in master not get ported to this branch after all ?