Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: ROOT & VTK JSON namespace conflicts #17451

Open
1 task done
2xB opened this issue Jan 17, 2025 · 2 comments
Open
1 task done

CMake: ROOT & VTK JSON namespace conflicts #17451

2xB opened this issue Jan 17, 2025 · 2 comments
Assignees
Labels

Comments

@2xB
Copy link
Contributor

2xB commented Jan 17, 2025

Check duplicate issues.

  • Checked for duplicates

Description

Since ROOT on Fedora 40 was updated from 6.32.08 to 6.34.02 a few days ago, our CIs (e.g. for https://github.com/KATRIN-Experiment/Kassiopeia) fail with the following CMake error:

CMake Error at /usr/lib64/cmake/vtk/VTK-targets.cmake:553 (set_target_properties):
  The link interface of target "VTK::nlohmannjson" contains:
    nlohmann_json::nlohmann_json
  but the target was not found.  Possible reasons include:
    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Therefore there seems to be a namespace conflict between ROOT and VTK.

Reproducer

See https://github.com/KATRIN-Experiment/Kassiopeia for an exemplary project using both VTK and ROOT. It is set up so also in forks the CI can be used in the main branch or in Pull Requests to said fork. I also used said CI to test changes to VTK already, the code for which can be found here: KATRIN-Experiment/Kassiopeia@main...2xB:Kassiopeia:vtktest . Changes to ROOT should be testable in a similar way.

If that is not minimal enough, I can also try to create a minimal working example.

ROOT version

6.34.02

Installation method

Fedora Packages

Operating system

Fedora

Additional context

This was also reported to VTK here: https://discourse.vtk.org/t/cmake-error-vtk-nlohmannjson/15170

@2xB 2xB added the bug label Jan 17, 2025
@2xB 2xB changed the title ROOT & VTK JSON namespace conflicts CMake: ROOT & VTK JSON namespace conflicts Jan 17, 2025
@linev
Copy link
Member

linev commented Jan 20, 2025

Is ROOT build with builtin_nlohmannjson?

@2xB
Copy link
Contributor Author

2xB commented Jan 20, 2025

As far as I understand https://src.fedoraproject.org/rpms/root/blob/f40/f/root.spec , for the Fedora package that I use, builtin_nlohmannjson is set to OFF. (CC @ellert since they are the expert here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants