Install from source on macOS 11 arm64


I’m trying to compile a (minimal) version of root (from git master) on an Apple M1 machine.


and I get :

FAILED: graf2d/cocoa/CMakeFiles/GCocoa.dir/src/
/Users/laurent/  -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -Iginclude -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -IFREETYPE-prefix/src/FREETYPE/include -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -I/Users/laurent/ -std=c++17 -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++ -O2 -DNDEBUG -arch arm64 -isysroot /Applications/ -fPIC -ObjC++ -Wno-deprecated-declarations -std=c++17 -MD -MT graf2d/cocoa/CMakeFiles/GCocoa.dir/src/ -MF graf2d/cocoa/CMakeFiles/GCocoa.dir/src/ -o graf2d/cocoa/CMakeFiles/GCocoa.dir/src/ -c /Users/laurent/
/Users/laurent/ fatal error: 'TGLIncludes.h' file not found
#include "TGLIncludes.h"
1 error generated.
[1072/1255] Building CXX object graf2d/cocoa/CMakeFiles/GCocoa.dir/src/   

Did I misunderstood and Root is not yet “arm64-ready” or am I making a stupid mistake somewhere ?


Hi @laurent.aphecetche,
see e.g. this thread for ROOT on Apple M1: it is supported as of ROOT v6.22/06.

You don’t even have to compile it from source, you can install it e.g. via conda (it takes a few minutes with a good internet connection).

With that said, I am not sure what’s causing the compilation errors you see, it has to do with Mac Graphics, maybe @Axel or @couet have an idea.


I just installed ROOT on a M1 machine using the basic procedure explained in the GitHub page. I had no problem.

Did you run xcode-select --install before starting the build?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

When enabling cocoa, you also need to enable opengl.

The issue is now recorded at MacOS: -Dcocoa=ON -Dopengl=OFF pass cmake but fail compilation · Issue #7160 · root-project/root · GitHub