Issue when compiling ROOT


I just got a new computer and am having trouble setting up ROOT but have no idea how to fix it. This is the error I am getting:

(optenv) Trevors-MacBook-Pro-2:root-6.22.00_builddir Trevor$ cmake --build .
[ 0%] Built target move_header_roofit_histfactory
[ 0%] Performing configure step for ‘VDT’
CMake Error at /Users/Trevor 1/Desktop/Research/root-6.22.00_builddir/VDT-prefix/src/VDT-stamp/VDT-configure-Release.cmake:49 (message):
Command failed: 1

‘/usr/local/Cellar/cmake/3.17.3/bin/cmake’ ‘-DSSE=OFF’ ‘-DCMAKE_BUILD_TYPE=Release’ ‘-DCMAKE_C_COMPILER=/Library/Developer/CommandLineTools/usr/bin/cc’ ‘-DCMAKE_CXX_COMPILER=/Library/Developer/CommandLineTools/usr/bin/c++’ ‘-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread’ ‘-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++’ ‘-DCMAKE_INSTALL_PREFIX=/Users/Trevor 1/Desktop/Research/root-6.22.00_builddir’ ‘-GUnix Makefiles’ ‘/Users/Trevor 1/Desktop/Research/root-6.22.00_builddir/VDT-prefix/src/VDT’

See also

/Users/Trevor 1/Desktop/Research/root-6.22.00_builddir/VDT-prefix/src/VDT-stamp/VDT-configure-*.log

make[2]: *** [VDT-prefix/src/VDT-stamp/VDT-configure] Error 1
make[1]: *** [CMakeFiles/VDT.dir/all] Error 2
make: *** [all] Error 2


Have you tried with the macOS binary packages:


If I’m not mistaken the binary packages are compiled with python 2, but I need to be using python 3? Let me know if that is incorrect

The latest binaries should be compiled with both python 2 and 3 support. But I’ll let @etejedor confirm.

I tried installing using homebrew but got this error upon trying to import ROOT in python:

Traceback (most recent call last):
File “/usr/local/Cellar/root/6.22.00_1/lib/root/cppyy/”, line 60, in
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘libcppyy3_7’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/Cellar/root/6.22.00_1/lib/root/ROOT/”, line 28, in
import cppyy
File “/usr/local/Cellar/root/6.22.00_1/lib/root/cppyy/”, line 64, in
libcppyy_mod_name, major, minor))
ImportError: Failed to import libcppyy3_7. Please check that ROOT has been built for Python 3.7

You can try with the pre-built binaries from the download page. If this does not work, perhaps @etejedor can help?

The binary releases for MacOS are only distributed with Python2 compatibility, so you can’t use them if you want Python3, indeed.

The homebrew error is saying that ROOT was not built for Python3.7, which is the version you are trying to use. It might have been built for Python3.8, so you could try with that version.

Another alternative is to build from sources. For the VDT error, I would need @oshadura to comment.

for VDT, I will need the content of /Users/Trevor 1/Desktop/Research/root-6.22.00_builddir/VDT-prefix/src/VDT-stamp/VDT-configure-*.log

Thank you!

Here is the content you asked for

DIAG option is now off, building library only
CMake Error at lib/CMakeLists.txt:19 (ADD_LIBRARY):
Cannot find source file:

/Users/Trevor 1/Desktop/Research/root-6.22.00_builddir/VDT-prefix/src/VDT/src/

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx

CMake Error at lib/CMakeLists.txt:19 (ADD_LIBRARY):
No SOURCES given to target: vdt

CMake Generate step failed. Build files cannot be regenerated correctly.

Also, thanks so much to everyone trying to help!

hi @trevajrussell can you try to turn off vdt using -Dvdt=OFF?

@oshadura I still get the same error, but this time it occurs at 13% rather than 0. Also the log has the same content as before

I think you need to have clean build, can you try to turn to remove everything, again turn off vdt using -Dvdt=OFF -Dbuiltin_vdt=OFF ?

1 Like