Skip to content

[cmake] On a fresh configure, remove possibly outdated pcms.#22751

Draft
hageboeck wants to merge 3 commits into
root-project:masterfrom
hageboeck:cmake_clean_pcms
Draft

[cmake] On a fresh configure, remove possibly outdated pcms.#22751
hageboeck wants to merge 3 commits into
root-project:masterfrom
hageboeck:cmake_clean_pcms

Conversation

@hageboeck

@hageboeck hageboeck commented Jul 3, 2026

Copy link
Copy Markdown
Member

When CMake is run without an existing cache, or with cmake --fresh, remove leftover pcms in lib/. This can fix a build with broken pcms that don't get regenerated without needing to clean the entire build.

Furthermore, ensure that we always run the cmake configure step in the CI. Previously, that step would be skipped when there was an existing CMake cache. This can prevent ROOT from picking up new build overrides, or from reacting to changes in the build containers (changes may only arrive once the precompiled artifacts are updated on S3).
Now, a configure with cmake --fresh is run unconditionally. If headers and build dependencies don't change, only the modules and dictionaries get rebuilt. The tests start to run at about 7 minutes into the CI job.

More details

The underlying problem is the fact that rootcling_stage1 builds some pcms as side effects (e.g. std.pcm), and CMake doesn't know about these. It therefore can't know if they are out of date, and it can't instruct the build-system generator to clean them when the clean target is invoked, or update them if they are out of date.
Moreover, changes in the toolchain or in the installed packages might not be detected, since the build folder might have been generated in a different container than the one it's running on.

Although wiping the pcms only cures the symptoms (we should at some point build a full dependency tree with all pcms), it could make the life of the developers a bit better until all pcms are correctly tracked by CMake.

@hageboeck hageboeck self-assigned this Jul 3, 2026
@hageboeck hageboeck added the clean build Ask CI to do non-incremental build on PR label Jul 3, 2026
@hageboeck hageboeck requested a review from silverweed July 3, 2026 13:38
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 14h 28m 34s ⏱️
 3 875 tests  2 937 ✅   0 💤 938 ❌
79 734 runs  78 197 ✅ 599 💤 938 ❌

For more details on these failures, see this check.

Results for commit 17202cc.

♻️ This comment has been updated with latest results.

@hageboeck hageboeck removed the clean build Ask CI to do non-incremental build on PR label Jul 6, 2026
hageboeck added 3 commits July 7, 2026 16:12
When CMake is run without an existing cache, or with cmake --fresh,
remove leftover pcms the build directory. This can fix a build with
broken pcms that don't get regenerated without needing to clean the
entire build.
Previously, the cmake configure step was skipped when a build cached
existed. This increases the risk that a change in the underlying
container or in ROOT's config options goes undetected, and might e.g.
lead to broken pcms. (The external build options are hashed for the time
being, so they are expected to wipe the build directory, but this can
break any time the hashing is touched)
Here, the logic is changed such that cmake configure always runs, and
that pcms are wiped. This should fix the occasional problem with broken
pcms, and ensures that the ROOT build reacts correctly to changes in the
underlying container.
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.

1 participant