root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.63k stars 1.25k forks source link

Is the error message about out of date pcm inverted ? #7704

Open pcanal opened 3 years ago

pcanal commented 3 years ago

Hi,

After touch a header file in io/io/inc and running only ninja RIO then running root.exe -b -l -q I get:

<<< cling interactive line includer >>>: fatal error: module file '/home/pcanal/root_working/build/master-debug/lib/RIO.pcm' is out of date and needs to be rebuilt: module file out of date
<<< cling interactive line includer >>>: note: imported by module 'Hist' in '/home/pcanal/root_working/build/master-debug/lib/Hist.pcm'
....

This seems "reversed and indeed:

ls -lrt lib/RIO.pcm lib/Hist.pcm
-rw-r--r-- 1 pcanal pcanal 5537736 Mar 25 21:11 lib/Hist.pcm
-rw-r--r-- 1 pcanal pcanal 3220264 Mar 25 21:13 lib/RIO.pcm

Maybe either:

<<< cling interactive line includer >>>: fatal error: module file '/home/pcanal/root_working/build/master-debug/lib/Hist.pcm' is out of date and needs to be rebuilt: module file out of date
<<< cling interactive line includer >>>: note: imported module 'RIO' in '/home/pcanal/root_working/build/master-debug/lib/RIO.pcm' is newer.
....
<<< cling interactive line includer >>>: fatal error: module file '/home/pcanal/root_working/build/master-debug/lib/RIO.pcm' is newer and all dependent module needs to be rebuilt
<<< cling interactive line includer >>>: note: imported by module 'Hist' in '/home/pcanal/root_working/build/master-debug/lib/Hist.pcm'
....

Cheers, Philippe.

PS Full error message:

<<< cling interactive line includer >>>: fatal error: module file '/home/pcanal/root_working/build/master-debug/lib/RIO.pcm' is out of date and needs to be rebuilt: module file out of date
<<< cling interactive line includer >>>: note: imported by module 'Hist' in '/home/pcanal/root_working/build/master-debug/lib/Hist.pcm'
Failed to load module Hist
Failed to load module RDAVIX
Failed to load module RooFitMore
Failed to load module RooFitRDataFrameHelpers
Failed to load module FITSIO
Failed to load module FFTW
Failed to load module MathMore
root.exe: /home/pcanal/root_working/code/root/interpreter/llvm/src/tools/clang/lib/Lex/Lexer.cpp:3940: bool clang::Lexer::LexTokenInternal(clang::Token&, bool): Assertion `Result.is(tok::eof) && "Preprocessor did not set tok:eof"' failed.      
Aborted
vgvassilev commented 2 years ago

Does that still reproduce for you, I seem to be unable to reproduce...

pcanal commented 2 years ago

The error messages seems harder to produce (however it is legitimate to issue a message, it bug is that the message is reversed). [Now] you need to make an effective modification to the io header:

pcanal@Viroflay:~/root_working/build/pristine-opt/src$ git diff
diff --git a/io/io/inc/TFile.h b/io/io/inc/TFile.h
index d5d6722e70..02d310f1cd 100644
--- a/io/io/inc/TFile.h
+++ b/io/io/inc/TFile.h
@@ -71,7 +71,8 @@ public:
    enum ECacheAction { kDisconnect = 0, kDoNotDisconnect = 1 };

 protected:
-   Double_t         fSumBuffer{0};            ///<Sum of buffer sizes of objects written so far
+int fnewmember;
+Double_t         fSumBuffer{0};            ///<Sum of buffer sizes of objects written so far
    Double_t         fSum2Buffer{0};           ///<Sum of squares of buffer sizes of objects written so far
    Long64_t         fBytesWrite{0};           ///<Number of bytes written to this file
    Long64_t         fBytesRead{0};            ///<Number of bytes read from this file

and then (of course :) ) provoke an "intentionally" inconsistent built by doing a partial build:

ninja RIO

(otherwise ninja/make will correctly rebuild the pcm) and then:

pcanal@Viroflay:~/root_working/build/pristine-opt$ rb RIO && root.exe -b -l -q
[26/26] Linking CXX shared library lib/libRIO.so
<<< cling interactive line includer >>>: fatal error: module file '/home/pcanal/root_working/build/pristine-opt/lib/RIO.pcm' is out of date and needs to be rebuilt: module file out of date
<<< cling interactive line includer >>>: note: imported by module 'MathCore' in '/home/pcanal/root_working/build/pristine-opt/lib/MathCore.pcm'
Failed to load module MathCore
Failed to load module Hist
Failed to load module ROOTTMVASofie
input_line_4:2:2: error: unknown type name 'include'
#include "TError.h"
 ^
etc ....

Note that RIO.pcm is already the "newest" of the pcm so it can not be the one out of date :)

pcanal commented 1 year ago

For the record, this issue is stil there as of 2022-11-10 acc8412782 as seen on https://root-forum.cern.ch/t/wsl-build-from-source-error-rint-pcm-is-out-of-date-cannot-read-module-signature/47564/23 where the message is:

<<< 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.

where as Rint.pcm is actually the newer of the 2 files:

(base) neel@neel-ASUS-TUF-Gaming-A15-FA506QM-FA506QM:~/Desktop/Root/build$ ls -lart lib/Rint.pcm lib/MathCore.pcm
-rw-rw-r-- 1 neel neel 11538356 Nov  9 23:43 lib/MathCore.pcm
-rw-rw-r-- 1 neel neel   428436 Nov  9 23:58 lib/Rint.pcm