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

Add Rint as a dependency of rootcling #11687

Merged
merged 1 commit into from
Nov 11, 2022
Merged

Conversation

pcanal
Copy link
Member

@pcanal pcanal commented Nov 11, 2022

TCling.cxx’s RegisterCxxModules loads explicitly several modules including Core, Rint and RIO.

When executing rootcling (for example for G__Net.cxx) before G__Rint.cxx was created and thus before lib/Rint.pcm was properly created, a default lib/Rint.pcm is auto-generated and registered as one of the dependencies. Later the real lib/Rint.pcm is created is creation date is later than other pcm than depends-on/uses it’s creation time. For example:

$ ls -lart lib/Net.pcm lib/MultiProc.pcm  lib/Imt.pcm lib/MathCore.pcm lib/Rint.pcm
-rw-r--r-- 1 pcanal pcanal  1158548 Nov 10 20:26 lib/Net.pcm
-rw-r--r-- 1 pcanal pcanal  1278392 Nov 10 20:27 lib/MultiProc.pcm
-rw-r--r-- 1 pcanal pcanal  2032752 Nov 10 20:27 lib/Imt.pcm
-rw-r--r-- 1 pcanal pcanal 12911448 Nov 10 20:27 lib/MathCore.pcm
-rw-r--r-- 1 pcanal pcanal   444724 Nov 10 20:35 lib/Rint.pcm

then later uses of those pcm leads to the (mis-worded) error message:

<<< cling interactive line includer >>>: fatal error: module file '/home/neel/Desktop/Root/build/lib/Rint.pcm' is out of date and needs to be rebuilt: could not read module signature
<<< cling interactive line includer >>>: note: imported by module 'MathCore' in '/home/neel/Desktop/Root/build/lib/MathCore.pcm'
Error: Module 'MathCore.pcm' failed to load.
Error: Error loading the default rootcling header files.
make[2]: *** [math/mathmore/CMakeFiles/G__MathMore.dir/build.make:130: math/mathmore/G__MathMore.cxx] Error 1

See the related circumstances in https://root-forum.cern.ch/t/wsl-build-from-source-error-rint-pcm-is-out-of-date-cannot-read-module-signature/47564/39

The stack trace that was triggers the auto-generation of Rint.pcm

at /home/pcanal/root_working/code/master/interpreter/llvm/src/tools/clang/lib/Sema/SemaModule.cpp:325
at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:908
at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:872
at /home/pcanal/root_working/code/master/core/metacling/src/TCling.cxx:1590

This PR fixes #11686

`TCling.cxx`’s `RegisterCxxModules` loads explicitly several modules including `Core`, `Rint` and `RIO`.

When executing rootcling (for example for G__Net.cxx) *before* `G__Rint.cxx` was created and thus before `lib/Rint.pcm` was properly created, a default `lib/Rint.pcm` is auto-generated and registered as one of the dependencies.  Later the real `lib/Rint.pcm` is created is creation date is later than other `pcm` than depends-on/uses it’s creation time.  For example:

```
$ ls -lart lib/Net.pcm lib/MultiProc.pcm  lib/Imt.pcm lib/MathCore.pcm lib/Rint.pcm
-rw-r--r-- 1 pcanal pcanal  1158548 Nov 10 20:26 lib/Net.pcm
-rw-r--r-- 1 pcanal pcanal  1278392 Nov 10 20:27 lib/MultiProc.pcm
-rw-r--r-- 1 pcanal pcanal  2032752 Nov 10 20:27 lib/Imt.pcm
-rw-r--r-- 1 pcanal pcanal 12911448 Nov 10 20:27 lib/MathCore.pcm
-rw-r--r-- 1 pcanal pcanal   444724 Nov 10 20:35 lib/Rint.pcm
```

then later uses of those `pcm` leads to the (mis-worded) error message:

```
<<< cling interactive line includer >>>: fatal error: module file '/home/neel/Desktop/Root/build/lib/Rint.pcm' is out of date and needs to be rebuilt: could not read module signature
<<< cling interactive line includer >>>: note: imported by module 'MathCore' in '/home/neel/Desktop/Root/build/lib/MathCore.pcm'
Error: Module 'MathCore.pcm' failed to load.
Error: Error loading the default rootcling header files.
make[2]: *** [math/mathmore/CMakeFiles/G__MathMore.dir/build.make:130: math/mathmore/G__MathMore.cxx] Error 1
```

See the related circumstances in https://root-forum.cern.ch/t/wsl-build-from-source-error-rint-pcm-is-out-of-date-cannot-read-module-signature/47564/39

The stack trace that was triggers the auto-generation of `Rint.pcm`

    at /home/pcanal/root_working/code/master/interpreter/llvm/src/tools/clang/lib/Sema/SemaModule.cpp:325
    at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:908
    at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:872
    at /home/pcanal/root_working/code/master/core/metacling/src/TCling.cxx:1590
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2022-11-11T05:15:18.912Z] ghprbPullLongDescription=TCling.cxx's RegisterCxxModules loads explicitly several modules including Core, Rint and RIO.\r\n\r\nWhen executing rootcling (for example for G__Net.cxx) before G__Rint.cxx was created and thus before lib/Rint.pcm was properly created, a default lib/Rint.pcm is auto-generated and registered as one of the dependencies. Later the real lib/Rint.pcm is created is creation date is later than other pcm than depends-on/uses it's creation time. For example:\r\n\r\n\r\n$ ls -lart lib/Net.pcm lib/MultiProc.pcm lib/Imt.pcm lib/MathCore.pcm lib/Rint.pcm\r\n-rw-r--r-- 1 pcanal pcanal 1158548 Nov 10 20:26 lib/Net.pcm\r\n-rw-r--r-- 1 pcanal pcanal 1278392 Nov 10 20:27 lib/MultiProc.pcm\r\n-rw-r--r-- 1 pcanal pcanal 2032752 Nov 10 20:27 lib/Imt.pcm\r\n-rw-r--r-- 1 pcanal pcanal 12911448 Nov 10 20:27 lib/MathCore.pcm\r\n-rw-r--r-- 1 pcanal pcanal 444724 Nov 10 20:35 lib/Rint.pcm\r\n\r\n\r\nthen later uses of those pcm leads to the (mis-worded) error message:\r\n\r\n\r\n&lt;&lt;&lt; cling interactive line includer &gt;&gt;&gt;: fatal error: module file '/home/neel/Desktop/Root/build/lib/Rint.pcm' is out of date and needs to be rebuilt: could not read module signature\r\n&lt;&lt;&lt; cling interactive line includer &gt;&gt;&gt;: note: imported by module 'MathCore' in '/home/neel/Desktop/Root/build/lib/MathCore.pcm'\r\nError: Module 'MathCore.pcm' failed to load.\r\nError: Error loading the default rootcling header files.\r\nmake[2]: *** [math/mathmore/CMakeFiles/G__MathMore.dir/build.make:130: math/mathmore/G__MathMore.cxx] Error 1\r\n\r\n\r\nSee the related circumstances in https://root-forum.cern.ch/t/wsl-build-from-source-error-rint-pcm-is-out-of-date-cannot-read-module-signature/47564/39\r\n\r\nThe stack trace that was triggers the auto-generation of Rint.pcm\r\n\r\n at /home/pcanal/root_working/code/master/interpreter/llvm/src/tools/clang/lib/Sema/SemaModule.cpp:325\r\n at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:908\r\n at /home/pcanal/root_working/code/master/interpreter/cling/lib/Interpreter/Interpreter.cpp:872\r\n at /home/pcanal/root_working/code/master/core/metacling/src/TCling.cxx:1590\r\n\r\nThis PR fixes Missing Rint dependency for rootcling  #11686\r\n\r\n

Copy link
Member

@Axel-Naumann Axel-Naumann left a comment

Choose a reason for hiding this comment

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

Just out of curiosity: did you consider the alternative of not loading Rint.pcm, at least not for rootcling?

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@pcanal
Copy link
Member Author

pcanal commented Nov 11, 2022

Just out of curiosity: did you consider the alternative of not loading Rint.pcm, at least not for rootcling?

I did not .. but I suspect there would be a risk that its content may then inadvertently be included in another pcm, isn't ?

@pcanal
Copy link
Member Author

pcanal commented Nov 11, 2022

The test_webgui_ping failure is unrelated.

@pcanal pcanal merged commit b3d624f into root-project:master Nov 11, 2022
@pcanal pcanal deleted the master-11686 branch November 11, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Rint dependency for rootcling
4 participants