Unable to generate makefile on ROOT 6.30

Dear ROOTers,

I have a ROOT based program, that I was able to successfully compile on ROOT 6.28. However, now, after upgrading to ROOT 6.30 I am unable to generate a makefile with cmake:

-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /opt/root-6.30.04_src/cmake/modules/FindVdt.cmake:63 (find_package_handle_standard_args)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /opt/root-6.30.04/ROOTConfig.cmake:150 (find_dependency)
  CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!

I was never dealing with VDT in any way and I am not even sure if ROOT compiled it or not… I could not find a relevant information in the documentation. What should I do? I attach my CMakeLists.txt
CMakeLists.txt (1.1 KB)

I’ve noticed on this forum that there was an error which I though was the same error and was supposedly fixed in master after 6.30.02, but, apparently, must have been something else.


ROOT Version: 6.30.04
Platform: Fedora 38
Compiler: Not Provided


May be @bellenot can help you.

If you search the forum you will see it’s a known issue that has been solved recently (see Search results for 'Could NOT find Vdt order:latest' - ROOT Forum)
You can modify the ROOTConfig.cmake file to make sure it includes this:

if(ROOT_vdt_FOUND AND NOT TARGET VDT::VDT)
  if(ROOT_builtin_vdt_FOUND)
    function(find_builtin_vdt)
      # the function is to create a scope (could use block() but requires CMake>=3.25)
      set(CMAKE_PREFIX_PATH ${ROOT_INCLUDE_DIRS} ${ROOT_LIBRARY_DIR})
      find_dependency(Vdt)
    endfunction()
    find_builtin_vdt()
  else()
    find_dependency(Vdt)
  endif()
endif()

Thanks, the problem was claimed to be solved in the master before the 6.30.04 release, so I assumed… it was indeed solved.

Is there a workaround that I can implement in my cmake file? I can’t force the users to modify their root installation. Otherwise, the solution is waiting a few months for the next ROOT release, hoping that this time the problem will be solved…

Try to add these line in your cmake file:

set(CMAKE_PREFIX_PATH ${ROOT_INCLUDE_DIRS} ${ROOT_LIBRARY_DIR})
find_dependency(Vdt)

or try to set the VDT_INCLUDE_DIR and VDT_LIBRARY values to point to ${ROOT_INCLUDE_DIRS} and ${ROOT_LIBRARY_DIR}/Vdt (or whatever the Vdt library name is, I can’t try, there is no Vdt on Windows…)

Thanks. Unfortunately, my knowledge of cmake is very rudimentary, and I am not sure if the following problems come from my bad environment setting or something else. However, it seems ROOT_INCLUDE_DIRS etc. are set only after calling find_package(ROOT CONFIG REQUIRED). And this fails in Vdt…

Then I’m afraid you’ll have to wait for the next ROOT release, or take a nightly build

I would ask for a patch release, but I know that’s not how it works. Well, a few months more wait for a much faster import of ROOT in Python. We’ll have to be patient :slight_smile:

As you prefer

That’s not about preference, but about most users not compiling ROOT themselves, but using binary releases. I am not coding for myself.

However, just out of curiosity: why didn’t the Vdt fix make it to 6.30.04? It looked like it was discovered and allegedly fixed in master a long time before release. Was the fix not enough?

The first fix was not good enough, and we didn’t want to break the experiments code just before the release

1 Like

Not sure if this is universal for all ROOT installations, but it seems I’ve managed to work around it with adding the following to CMakeLists.txt

set(VDT_INCLUDE_DIR $ENV{ROOTSYS}/include)
set(VDT_LIBRARY $ENV{ROOTSYS}/lib)

It’s what I meant here

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