CMAKE fail with a "missing vdt" message

Dear Experts,

I updated my root version from 6.24 to 6.30 (also MacOS from 11.2 to 14.4 to accommodate the root version update) using “brew install root.”
When I change a code, I run sh make.sh which compiles the program (please see the attached screenshots of the make.sh and CMakeLists.txt currently I use.)
After the update, I get the following message although I see “vdt” in my root directory.

Could you tell me if there is a quick solution for this error so I can run the existing macros with minimal change? I thought adding “-DVDT_INCLUDE_DIR=” might work, but I wasn’t sure where to add it…

Thank you in advance,
Satoko

sh make.sh 
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found nlohmann_json: /opt/homebrew/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.11.3", minimum required is "3.11.3") 
CMake Error at /opt/homebrew/Cellar/cmake/3.21.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY)
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.21.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /opt/homebrew/Cellar/root/6.30.04/share/root/cmake/modules/FindVdt.cmake:63 (find_package_handle_standard_args)
  /opt/homebrew/Cellar/cmake/3.21.1/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /opt/homebrew/share/root/cmake/ROOTConfig.cmake:156 (find_dependency)
  CMakeLists.txt:14 (find_package)


TBox.h                                TGLWSIncludes.h                       TPacketizer.h                         v5
TBranch.h                             TGLWidget.h                           TPacketizerAdaptive.h                 vdt
mge:root kamei$ pwd
/opt/homebrew/Cellar/root/6.30.04/include/root

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.30.04 (with Xcode 15.3)
Platform: MacOS 14.4
Compiler: AppleClang 15.0.0


I guess you can get vdt from here:

https://ports.macports.org/port/vdt/

Or install it as explained here:

1 Like

Maybe related with: VDT Finding Fix, master branch (2023.12.05.) by krasznaa · Pull Request #14178 · root-project/root · GitHub
cmake find_package `VDT not found` in root docker container · Issue #14195 · root-project/root · GitHub
@krasznaa might help in this regard.

1 Like

Hi,

Unfortunately I’m not familiar with how HomeBrew builds ROOT these days. But there are certainly a few things that I can point out:

  • If ROOT requires VDT in its ROOTConfig.cmake file, then VDT was found/used in one way or another in the ROOT build. So you should not install VDT anew. It has to be available on your system somewhere already. :thinking:
  • The preferred way to point CMake at the VDT version that it should use is through CMAKE_PREFIX_PATH. When you source the thisroot.sh script coming with ROOT, it adds itself to the $CMAKE_PREFIX_PATH environment variable. If VDT came from -Dbuiltin_vdt=TRUE, then this should be enough to find the VDT version that should’ve been installed together with ROOT.

I have an educated guess that VDT is probably installed by HomeBrew under:

/opt/homebrew/Cellar/vdt/<version>/

(Or something very similar…)

Have a look, see if you can find it. :thinking: Then, try to add the directory that you found, to $CMAKE_PREFIX_PATH. Like:

export CMAKE_PREFIX_PATH=<VDT install directory>:$CMAKE_PREFIX_PATH

With that modification to your build environment, CMake should find VDT during the find_package(ROOT...) call.

Of course ideally all this should happen automatically. :thinking: Could you describe in a bit more detail what you do to set up the HomeBrew packages for your runtime environment? I’d just like to understand whether ROOT, or HomeBrew should improve something to avoid users having to worry about this issue that you ran into.

Cheers,
Attila

2 Likes

Hi,

Thank you for your quick response.

Thank you for your quick responses. After I installed VDTfrom the link couet suggested, it worked like a charm!

Thank you,
Satoko

1 Like

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