Skip to content

Revert "[Build System] Use DEPFILE instead of IMPLICIT_DEPENDS for dictionaries" - #23009

Merged
hahnjo merged 1 commit into
root-project:masterfrom
hahnjo:revert-depfile
Aug 4, 2026
Merged

Revert "[Build System] Use DEPFILE instead of IMPLICIT_DEPENDS for dictionaries"#23009
hahnjo merged 1 commit into
root-project:masterfrom
hahnjo:revert-depfile

Conversation

@hahnjo

@hahnjo hahnjo commented Aug 4, 2026

Copy link
Copy Markdown
Member

This reverts commit ae4d830 as it doesn't work: Now, on my machine, dictionaries are always rebuilt. I didn't investigate further, but this is harming productivity.

@hahnjo
hahnjo requested a review from guitargeek August 4, 2026 11:55
@hahnjo hahnjo self-assigned this Aug 4, 2026
@hahnjo hahnjo added in:Build System pr:emergency🚨 This PR is fixing breakage, it's urgent and may overtake others labels Aug 4, 2026

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! That's unfortunate it didn't work. Would you mind sharing your CMake configuration so this can be investigated? This platform are you using?

@hahnjo

hahnjo commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Thanks! That's unfortunate it didn't work.

Did you test it locally on your system?

Would you mind sharing your CMake configuration so this can be investigated? This platform are you using?

I'm encountering this on all my CMake configurations (on Alma 8). I tested a clean build with -Dminimal=ON.

@guitargeek

Copy link
Copy Markdown
Contributor

Did you test it locally on your system?

Yes, a second invocation of ninja rebuilds nothing for me...

@hahnjo

hahnjo commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Indeed, it seems to work on Arch Linux. Maybe related to the versions of cmake and ninja 🤔

ninja -n -d explain says

ninja explain: expected depfile '/path/to/build-asserts-clang/io/io/G__RIO.depfile' to mention 'io/io/G__RIO.cxx', got 'G__RIO.cxx'
ninja explain: expected depfile '/path/to/build-asserts-clang/core/G__Core.depfile' to mention 'core/G__Core.cxx', got 'G__Core.cxx'
ninja explain: lib/Core.pcm is dirty

@guitargeek

Copy link
Copy Markdown
Contributor

Possibly! I could also reproduce the problem you describe in a docker file now:

$ docker run --security-opt label=disable -it registry.cern.ch/root-ci/alma8:buildready
[root@f0557bed0697 /]# cd home/
[root@f0557bed0697 home]# git clone https://github.com/root-project/root.git
Cloning into 'root'...
remote: Enumerating objects: 1107935, done.
remote: Counting objects: 100% (305/305), done.
remote: Compressing objects: 100% (208/208), done.
remote: Total 1107935 (delta 147), reused 113 (delta 96), pack-reused 1107630 (from 4)
Receiving objects: 100% (1107935/1107935), 1.46 GiB | 32.61 MiB/s, done.
Resolving deltas: 100% (807967/807967), done.
Updating files: 100% (31081/31081), done.
[root@f0557bed0697 home]# mkdir root_build
[root@f0557bed0697 home]# cmake -G Ninja -Dminimal=ON ../root
[root@f0557bed0697 home]# cd root_build/
[root@f0557bed0697 root_build]# cmake -G Ninja -Dminimal=ON ../root

...

-- Build files have been written to: /home/root_build
[root@f0557bed0697 root_build]# ninja -j 12
[4369/4369] Generating tutorials/hsimple.root
[root@f0557bed0697 root_build]# ninja -j 12
[185/185] Generating tutorials/hsimple.root
[root@f0557bed0697 root_build]# ninja -j 12
[185/185] Generating tutorials/hsimple.root
[root@f0557bed0697 root_build]# cmake --version
cmake version 3.26.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
[root@f0557bed0697 root_build]# ninja --version
1.8.2

These are good datapoints for whoever will try to fix again #21203 after the revert is merged.

…ctionaries"

This reverts commit ae4d830 as it
doesn't work at least on my machine (AlmaLinux 8) with CMake 3.26.5
and ninja 1.8.2: Now dictionaries are always rebuilt.

 $ ninja -n -d explain says
ninja explain: expected depfile '/path/to/build-asserts-clang/io/io/G__RIO.depfile' to mention 'io/io/G__RIO.cxx', got 'G__RIO.cxx'
ninja explain: expected depfile '/path/to/build-asserts-clang/core/G__Core.depfile' to mention 'core/G__Core.cxx', got 'G__Core.cxx'
ninja explain: lib/Core.pcm is dirty
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Test Results

    13 files      13 suites   1d 9h 1m 1s ⏱️
 3 833 tests  3 832 ✅ 0 💤 1 ❌
42 522 runs  42 520 ✅ 1 💤 1 ❌

For more details on these failures, see this check.

Results for commit 1fef878.

@hahnjo
hahnjo merged commit 94caecf into root-project:master Aug 4, 2026
7 of 31 checks passed
@hahnjo
hahnjo deleted the revert-depfile branch August 4, 2026 13:20
@ferdymercury

ferdymercury commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

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

Labels

in:Build System pr:emergency🚨 This PR is fixing breakage, it's urgent and may overtake others

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants