[INFO] Monte Carlo Engine Initialisation with: TGeant4
In file included from libVMC dictionary payload:17:
In file included from /root/ship/sw/slc7_x86-64/ROOT/v6-18-00-3/include/TMCManager.h:26:
/root/ship/sw/slc7_x86-64/ROOT/v6-18-00-3/include/TMCParticleStatus.h:51:7: error: reference to 'Info' is ambiguous
Info("Print", "Status of track");
^
/root/ship/sw/slc7_x86-64/ROOT/v6-18-00-3/include/TError.h:58:13: note: candidate found by name lookup is 'Info'
extern void Info(const char *location, const char *msgfmt, ...)
^
/root/ship/sw/slc7_x86-64/pythia/v8230-ship-1/include/Pythia8/Info.h:30:7: note: candidate found by name lookup is 'Pythia8::Info'
class Info {
^
Error in <TInterpreter::AutoParse>: Error parsing payload code for class TVirtualMC with content:
#line 1 "libVMC dictionary payload"
#define _BACKWARD_BACKWARD_WARNING_H
// Inline headers
#include "TGeoMCGeometry.h"
#include "TMCAutoLock.h"
#include "TMCOptical.h"
#include "TMCParticleType.h"
#include "TMCProcess.h"
#include "TMCtls.h"
#include "TMCVerbose.h"
#include "TVirtualMCApplication.h"
#include "TVirtualMCGeometry.h"
#include "TVirtualMC.h"
#include "TVirtualMCSensitiveDetector.h"
#include "TVirtualMCStack.h"
#include "TMCManager.h"
#include "TMCManagerStack.h"
#include "TGeoMCBranchArrayContainer.h"
#include "TMCParticleStatus.h"
#undef _BACKWARD_BACKWARD_WARNING_H
I have close to zero idea of what is happening, but my guess is that ROOT is looking for the Info symbol, and it find it twice. One from ROOT itself and another from Pythia.
If it were my code, I guess I could using namespaces to specify exactly what I want, but it is ROOT code and I am not quite sure what I should do.
Maybe import pythia in a different way? How?
This error happens at runtime and we are using the python interface.
I have no experience with Pythia, so I am not sure of why this symbol conflict appears. Is Pythia compiled against ROOT? You are using some installation of both ROOT and Pythia on CVMFS?
The problem seems to be two incompatible definitions of Info, as a function in ROOT, and as a class in Pythia. It doesn’t seem to be something specific to Pythia, but just a name clash of incompatible types with the same name, and TInterpreter::AutoParse not knowing what to do about it.
I don’t think there is an easy way to fix this. The Info() function in ROOT is quite old and used in several places. It’s also added in the global space, so there’s no way to better qualify it. You may be able to make things work by compiling your code rather than relying on the interpreter, though.
Hi @amadio , @siscia,
The call to Info() happens in the function TMCParticleStatus::Print(); could you try out to move the implementation of the function below the class definition? This would prevent from its processing with the Root interpreter.
The changes to be tried out:
/// Print all info at once
void Print() const;
ClassDef(TMCParticleStatus, 1)
};
// inline functions
inline void TMCParticleStatus::Print() const {
...
}
Or, we can also try to add the implementation code in .cxx file.
Sorry, you can make a PR against ROOT on GitHub. As for the review of your changes, it’s better to wait until next week, when @axel will be back to review. Best regards,