I am trying to compile root from source using mac M3 with system 14.7.1
After cmake, I cannot find in my build directory include/vdt and ginclude/vdt
Notice that vdt is installed in my system (via MacPorts)
I need these directories because a root based software I am using looks for those include files.
I tried to use -D builtin_vdt=ON and/or -D vdt=ON but none of these two options could solve the issue
Any suggestion?
Hello
There is no error in root compilation, but there is something missing that breaks the compilation of a root-based code. The error is that it does not find in $ROOTSYS/include/ the directory vdt (and in particular vdtMath.h):
/opt/root-6.34.04/builddir/include/ROOT/RVec.hxx:54:10: fatal error: ‘vdt/vdtMath.h’ file not found #include <vdt/vdtMath.h>
To give more details: this is something that specifically occurs on the macOsx platform. If I download root-6.34.04 (or the 6.32 versions, it’s the same thing) on linux (Fedora 40), using the same cmake options, I do find both $ROOTSYS/include/vdt and $ROOTSYS/ginclude/vdt
Instead, on mac (system 14.7.1) with MacPorts, I do not succeed to make those vdt directories appear. Notice that vdt has been already installed in my mac using MacPorts.
My cmake command (on both linux and mac) normally is:
but the result is always the same.
Actually, on linux, there was no need to add something about vdt in the cmake options
On mac I can of course solve the issue manually, by ssh coping the vdt directories from the linux installation, but this is quite unsatisfactory.
Can someone give suggestions?
Thank you
Thank you for detailing your issue. Could you please share the output of your cmake configuration command? It would be useful if you could share how you’re compiling your example requiring vdt.
about the different CMake options you tried: for sure you need -Dbuiltin_vdt=ON so that ROOT is build and shipped with the vdt headers. -Dvdt=ON means it will look for vdt on the system while building and use that in the build, but it will not copy it inside $ROOTSYS/include.
I couldn’t see builtin_vdt=ON in your logs, so maybe it got disabled by the auto-configuration for some reason? Therefore, I also recommend -Dfail-on-missing=ON, so nothing if disabled without you noticing (the build will fail instead).
Then, so we get some more datapoints, what is your $ROOTSYS pointing to? The build directory, or the install directory? Maybe the headers only ended up in the build tree, but not the install tree?
My $ROOTSYS points to the build directory
My way to build root is the following:
after expanding the tar.gz file, inside the root-6.34.04 directory I create a builddir directory. There I execute cmake and make. The environment is then set by running root-6.34.04/builddir/bin/thisroot.sh
After that, the only include directory is root-6.34.04/builddir/include
There is no other include elsewhere.
I confirm that the log I sent refers to a case in which I did not use buildin_vdt=ON, but, as I already explained, nothing changed when I put it explicitely, However, here below the log in which I added -Dbuiltin_vdt=ON :
– Building ROOT version 6.34.04
– The default C++ standard in use by the detected compiler (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.
– Found a macOS system
– Found an AArch64 system
– ROOT default compression algorithm: zlib
– Checking internet connectivity
– Checking internet connectivity - found
– Looking for ZLib
– Looking for nlohmann/json.hpp
– Found nlohmann/json.hpp in /opt/local/include;/opt/local/include (found version 3.11.3)
– Building freetype version 2.12.1 included in ROOT itself
– Looking for PCRE
– Building LZMA version 5.2.4 included in ROOT itself
– Looking for xxHash
– Found xxHash: /opt/local/lib/libxxhash.dylib (found suitable version “0.8.2”, minimum required is “0.8”)
– Looking for ZSTD
– Looking for LZ4
– Looking for Python
– Found Python3: /opt/local/bin/python3.12 (found suitable version “3.12.9”, minimum required is “3.8”) found components: Interpreter Development NumPy Development.Module Development.Embed
– Looking for OpenGL
– Looking for gl2ps
– Looking for LibXml2
– Looking for SQLite
– Downloading and building FFTW version 3.3.8
– Looking for XROOTD
– Checking for module ‘davix>=0.6.4’
– Found davix, version 0.8.7
– Looking for BLAS for optional parts of TMVA
– PyROOT: development package found. Building for version 3.12.9
– Building LLVM in ‘Release’ mode.
– bolt project is disabled
– clang project is enabled
– clang-tools-extra project is disabled
– compiler-rt project is disabled
– cross-project-tests project is disabled
– libc project is disabled
– libclc project is disabled
– lld project is disabled
– lldb project is disabled
– mlir project is disabled
– openmp project is disabled
– polly project is disabled
– pstl project is disabled
– flang project is disabled
– Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
– Found Python3: /opt/local/bin/python3.12 (found suitable version “3.12.9”, minimum required is “3.0”) found components: Interpreter
– LLVM host triple: arm64-apple-darwin23.6.0
– Native target architecture is AArch64
– Threads disabled.
– Doxygen disabled.
– Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic
– Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
– OCaml bindings disabled.
– LLVM default target triple: arm64-apple-darwin23.6.0
– Building with -fPIC
– Targeting AArch64
– Targeting NVPTX
– Clang version: 18.1.6
– Host linker version: 1053.12
– Building Cling as part of ROOT
– Cling version (from VERSION file): ROOT_1.2~dev
– Cling will look for C++ headers in ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1’ at runtime.
– And if not found, will invoke: ‘/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -isysroot;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk’ for them.
– Found xxHash: /opt/local/lib/libxxhash.dylib (found version “0.8.2”)
– Found arc4random_buf in stdlib.h
– Use SSL API VERSION 3.4 for civetweb
– Distributed RDataFrame enabled
– RapidYAML not found, only compiling RooFit with nlohmann-json parser
– Found Chrome browser executable /Applications/Google Chrome.app/Contents/MacOS/Google Chrome major version 133
– Found Firefox browser executable /Applications/firefox.app/Contents/MacOS/firefox
– ROOT Configuration
Sorry, you were completely right and it was my fault! I was not scratching correctly my build. After scratching completely the directory, and inserting -D builtin_vdt=ON in the cmake, during the compilation the include/vdt directory eventually appeared.
Thank you very much for the assistance