[CEA 45230] roottest v6-36-00: IoBigEventGenerator -> MathCore Dependency Issue?


ROOT Version: 6.36.000
Platform: linuxx8664gcc
Compiler: Ubuntu 14.2.0-19ubuntu2


Dear ROOT Developers & Maintainers,

CMake configuration of roottest with ROOT 6.36 seems to trigger a dependency issue of IoBigEventGenerator → MathCore.

MWE

roottest

Here is the version of your test suite: GitHub - root-project/roottest at v6-36-00

$ git show --quiet 
commit d59bb58d69c57471aa8633bab81be37dc9945954 (HEAD, tag: v6-36-00, origin/v6-36-00-patches)
Author: Danilo Piparo <danilo.piparo@cern.ch>
Date:   Fri May 23 11:33:42 2025 +0200

    Revert "[test] Dictionary data member type contains a std::function"
    
    This reverts commit 134488dbb224e4cb2fb35447cfce299d297ccdcd.

Docker

Using the corresponding Docker image: root-docker/ubuntu2504/Dockerfile at 6.36.00-ubuntu25.04 · root-project/root-docker · GitHub
I ran a CMake configuration:

$ docker run --mount type=bind,src=$(pwd),dst=/opt/roottest -it rootproject/root:6.36.00-ubuntu25.04 bash
root@9a2121514de7:/opt# mkdir build
root@9a2121514de7:/opt# cd build/
root@9a2121514de7:/opt/build# cmake ../roottest/
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
[...]
-- Configuring done (1.4s)
CMake Error at cmake/modules/RoottestMacros.cmake:533 (add_dependencies):
  The dependency target "MathCore" of target "IoBigEventGenerator" does not
  exist.
Call Stack (most recent call first):
  root/io/bigevent/CMakeLists.txt:18 (ROOTTEST_GENERATE_EXECUTABLE)


-- Generating done (1.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
root@9a2121514de7:/opt/build# 

Source

The issue seems to come from roottest/root/io/bigevent/CMakeLists.txt at v6-36-00 · root-project/roottest · GitHub

DEPENDS IoBigEventGeneration MathCore

Can removing MathCore dependency be a solution?

Best Regards,

Maybe changing on line8 LIBRARIES to DEPENDENCIES also helps.

Thank you for your answer.

Test 1

Here is the suggested modification if I understood correctly:

$ git diff
diff --git a/root/io/bigevent/CMakeLists.txt b/root/io/bigevent/CMakeLists.txt
index 574aaf242..89ed1428a 100644
--- a/root/io/bigevent/CMakeLists.txt
+++ b/root/io/bigevent/CMakeLists.txt
@@ -5,7 +5,7 @@ ROOT_GENERATE_DICTIONARY(G__IoBigEventGeneration
 ROOT_LINKER_LIBRARY(IoBigEventGeneration
   ${CMAKE_CURRENT_SOURCE_DIR}/IoBigEventGeneration.cxx
   G__IoBigEventGeneration.cxx
-  LIBRARIES Core Tree Hist MathCore Physics Graf Matrix)
+  DEPENDENCIES Core Tree Hist MathCore Physics Graf Matrix)
 
 if(MSVC)
   add_custom_command(TARGET IoBigEventGeneration POST_BUILD
@@ -18,7 +18,7 @@ endif()
 ROOTTEST_GENERATE_EXECUTABLE(IoBigEventGenerator
   ${CMAKE_CURRENT_SOURCE_DIR}/IoBigEventGenerator.cxx
   LIBRARIES Core RIO Net Tree Hist MathCore IoBigEventGeneration
-  DEPENDS IoBigEventGeneration MathCore
+  DEPENDS IoBigEventGeneration
   FIXTURES_SETUP io-bigevent-generator)
 
 ROOTTEST_ADD_TEST(write

The configuration succeeded:

root@07faa2fb7c5b:/opt/build# cmake ../roottest/
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
[...]
-- Configuring done (1.3s)
-- Generating done (0.9s)
-- Build files have been written to: /opt/build
root@07faa2fb7c5b:/opt/build#

Test 2

Here is maybe a smaller change:

$ git diff
diff --git a/root/io/bigevent/CMakeLists.txt b/root/io/bigevent/CMakeLists.txt
index 574aaf242..889c4ebae 100644
--- a/root/io/bigevent/CMakeLists.txt
+++ b/root/io/bigevent/CMakeLists.txt
@@ -18,7 +18,7 @@ endif()
 ROOTTEST_GENERATE_EXECUTABLE(IoBigEventGenerator
   ${CMAKE_CURRENT_SOURCE_DIR}/IoBigEventGenerator.cxx
   LIBRARIES Core RIO Net Tree Hist MathCore IoBigEventGeneration
-  DEPENDS IoBigEventGeneration MathCore
+  DEPENDS IoBigEventGeneration ROOT::MathCore
   FIXTURES_SETUP io-bigevent-generator)
 
 ROOTTEST_ADD_TEST(write
root@07faa2fb7c5b:/opt/build# cmake ../roottest/
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
[...]
-- Configuring done (1.4s)
-- Generating done (0.9s)
-- Build files have been written to: /opt/build
root@07faa2fb7c5b:/opt/build# 

maybe this also works:

DEPENDS IoBigEventGeneration

since IoBigEventGeneration depends itself already on MathCore

This is fixed in the tip of the 6.36 branch:

1 Like

Thank you very much for your comment:

$ git show --quiet 
commit dca7f4f4c947eb3b80747338ef51b407eb432801 (HEAD -> v6-36-00-patches, origin/v6-36-00-patches)
Author: silverweed <giacomo.parolini@cern.ch>
Date:   Mon Apr 14 11:41:08 2025 +0200

    [io] remove MathCore dependency from IoBigEventGeneration
    
    It's not needed and it makes CMake fail to configure
root@2b1974543c30:/opt/build# cmake ../roottest/
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
[...]
-- Configuring done (1.4s)
-- Generating done (0.9s)
-- Build files have been written to: /opt/build
root@2b1974543c30:/opt/build#