Dear ROOTers,
I’ve come across a puzzling error message when trying to open a file with a non-trivial TTree
inside which contains lots of custom classes and std containers/types.
The file was produced on a CentOS7 machine, and I am opening it on a MacBook.
The puzzling errors are all related to std::pair
Warning in <TClass::Init>: no dictionary for class __pair_base<unsigned int,float> is available
...
I tracked down the error message to the fact that std::pair
has an empty base class in the libstdc++ implementation, while this doesn’t seem the case in libc++.
I also found that this kind of issue already presented itself in 2018 and was fixed by ignoring the base class for std::pair
in the streamer.
From the original JIRA issue I understood that the expected behavior for std::pair
is
root [0] auto c = TClass::GetClass("pair<int,int>");auto pb = c->GetListOfBases();pb->GetEntries()
(int) 0
while if I perform this check on my 6.22/08 install (compiled with gcc 9.3.0 on CentOS7) I get
root [0] auto c = TClass::GetClass("pair<int,int>");auto pb = c->GetListOfBases();pb->GetEntries()
(int) 1
(this particular ROOT install is available on cvmfs: /cvmfs/ams.cern.ch/Offline/amsitaly/public/install/x86_64-centos7-gcc9.3/root-6.22.08
)
So, my question is, is this a regression? Or is this intended behavior?
In the latter case, how can I avoid the truckload of warnings when opening files on my MacBook?
Cheers,
Valerio
ROOT Version: 6.22/08
Platform: CentOS7
Compiler: gcc 9.3.0