Error when building root from source on mac

Hello, I am trying to build root from source on my macbook (after being unsuccessful with basically every other method), and while installing root with
cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
it appears that the vdt cannot be found:

-- Looking for VDT
CMake Error at cmake/modules/FindVdt.cmake:48 (file):
  file STRINGS file "/opt/local/include/vdt/vdtMath.h" cannot be read.
Call Stack (most recent call first):
  cmake/modules/SearchInstalledSoftware.cmake:17 (_find_package)
  cmake/modules/SearchInstalledSoftware.cmake:1589 (find_package)
  CMakeLists.txt:245 (include)


-- Could NOT find Vdt: Found unsuitable version "0.3", but required is at least "0.4" (found /opt/local/include)
-- VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
--                Switching ON 'builtin_vdt' option

After subsequently trying to build root with:
cmake --build . -- install -j4
I obtained the following error:

[ 76%] Built target Zstd
Consolidate compiler generated dependencies of target Unix
/Users/yannickburkard/root_src/core/lz4/src/ZipLZ4.cxx:21:10: fatal error: 'xxhash.h' file not found
#include <xxhash.h>
         ^~~~~~~~~~
1 error generated.
make[2]: *** [core/lz4/CMakeFiles/Lz4.dir/src/ZipLZ4.cxx.o] Error 1
make[1]: *** [core/lz4/CMakeFiles/Lz4.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 76%] Built target Unix
Consolidate compiler generated dependencies of target Base
[ 76%] Built target Base
[ 76%] Built target BaseTROOT
make: *** [all] Error 2

Does anyone know what is happening?

ROOT Version: 6.26.06
Platform: macOS 12.6
Compiler: AppleClang 12.0.0.12000032

[quote=“yburkard, post:1, topic:51823”]

CMake Error at cmake/modules/FindVdt.cmake:48 (file):
  file STRINGS file "/opt/local/include/vdt/vdtMath.h" cannot be read.

Seems to be the main (type of) problem(s). I.e. you local user does not seem to have read access to the installed software.

@pcanal The non-existent “vdtMath.h” should not be a problem at all.
It explicitly said: Found unsuitable version "0.3"
and then immediately: Switching ON 'builtin_vdt' option

The missing "xxhash.h error is something for @Axel (i.e., why the configuration step did not switch the “builtin_xxhash” option “ON”)

@yburkard Remove the old “build” directory and then configure it again using:
cmake -Dbuiltin_vdt=ON -Dbuiltin_xxhash=ON -DCMAKE_INSTALL_PREFIX=../root_install ../root_src

2 Likes

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