Skip to content

[cmake] Allow excluding additional include paths from being stored in dictionaries - #23705

Merged
bellenot merged 1 commit into
root-project:masterfrom
jmcarcell:dict-exclude-extra-paths
Oct 20, 2026
Merged

bellenot merged 1 commit into
root-project:masterfrom
jmcarcell:dict-exclude-extra-paths

Conversation

@jmcarcell

@jmcarcell jmcarcell commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This Pull request:

Changes or fixes:

The include directories of external dependencies used by a library are stored in the includePaths[] of its dictionary, and they are added to the interpreter when the library is loaded. When ROOT and its dependencies are built in one place and then relocated, these paths no longer exist but still show up in gSystem->GetIncludePath(). For example, in the LCG nightlies, ROOT and its dependencies are built under /build/jenkins/... and then deployed to CVMFS:

-I"/build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/pcre2/10.49/x86_64-el9-gcc15-opt/include"
-I"/build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/xxHash/0.8.3/x86_64-el9-gcc15-opt/include"
-I"/build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/tbb/2023.1.0/x86_64-el9-gcc15-opt/include"
-I"/build/jenkins/workspace/lcg_nightly_pipeline/install/dev3/jsonmcpp/3.12.0/x86_64-el9-gcc15-opt/include"

This adds ROOT_DICTIONARY_EXCLUDE_PATHS, a list of path prefixes that are passed to rootcling as -excludePath, so that include paths under them are not stored in the dictionaries (let me know if there is a better way of doing this). They are still used for parsing when generating the dictionaries. This is only useful for builds that are relocated, where the dependencies are found at runtime through the environment of the final installation (e.g. ROOT_INCLUDE_PATH). Nothing changes when the variable is not set. For the case above, it would be -DROOT_DICTIONARY_EXCLUDE_PATHS=/build/jenkins/workspace/lcg_nightly_pipeline/install/dev3.

Together with #23704, which does the same for the ROOT build directory, no build paths are left in gSystem->GetIncludePath().

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@jmcarcell
jmcarcell requested a review from bellenot as a code owner October 13, 2026 20:19
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 0h 30m 56s ⏱️
 3 888 tests  3 887 ✅ 0 💤 1 ❌
83 245 runs  83 244 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit f3bf7c7.

♻️ This comment has been updated with latest results.

@dpiparo dpiparo self-assigned this Oct 16, 2026
@dpiparo dpiparo closed this Oct 16, 2026
@dpiparo dpiparo reopened this Oct 16, 2026
@dpiparo dpiparo assigned bellenot and unassigned dpiparo Oct 16, 2026
@bellenot bellenot closed this Oct 20, 2026
@bellenot bellenot reopened this Oct 20, 2026

@bellenot bellenot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bellenot
bellenot merged commit 9460676 into root-project:master Oct 20, 2026
79 of 102 checks passed
@jmcarcell

Copy link
Copy Markdown
Contributor Author

ROOT in dev3 now doesn't show any paths to build directories after setting the installation prefix with this new variable:

-I/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/include -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/jsonmcpp/3.12.0/x86_64-el9-gcc13-opt/include" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc/" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc//cling" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc//cling/plugins/include" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/include"

@bellenot

Copy link
Copy Markdown
Member

ROOT in dev3 now doesn't show any paths to build directories after setting the installation prefix with this new variable:

-I/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/include -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/jsonmcpp/3.12.0/x86_64-el9-gcc13-opt/include" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc/" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc//cling" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/etc//cling/plugins/include" -I"/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Wed/ROOT/e18d7f98/x86_64-el9-gcc13-opt/include"

Should we revert the commit then?

@jmcarcell

Copy link
Copy Markdown
Contributor Author

No, that was the point of this change, not to have includes to build paths that don't exist anymore (for us, the /build/jenkins...). I'm just confirming that I checked it seems to work as intended.

@bellenot

Copy link
Copy Markdown
Member

No, that was the point of this change, not to have includes to build paths that don't exist anymore (for us, the /build/jenkins...). I'm just confirming that I checked it seems to work as intended.

Oh! OK, sorry... And thanks for the feedback then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants