Home | News | Documentation | Download

gInterpreter not initialized


Dear ROOT developers,

I am trying to build a software package put together by my colleague. I have successfully built the package however it segfaults when I run it. The software is built using ROOT and the stack trace appears to point to some conflict in the way these libraries are being used. I have attached the complete stack trace to this issue.
log.txt (63.7 KB)

ROOT: 6.12.06
Linux version 3.10.0-862.14.4.el7.x86_64 (gcc version 4.8.5 20150623
(Red Hat 4.8.5-28) Centos7

The software that I am using is here: https://github.com/patha325/NewSaRoMaN/tree/master/B4c however it requires several items of third party software in order to run so I have not been able to put together a minimal working example. The offending piece of code is here: path/to/NewSaRoMaN/B4c/src/B4PrimaryGeneratorAction.cc at line 112.

I am unsure how to diagnose the error in this segfault though it appears to come from a conflict during running when passing the tuple format NtpMCEventRecord between ROOT and genie. If you could offer any insight or pointers that I could investigate it would be greatly appreciated.

Please let me know if there is any more information that I can add that would help diagose this issue.

Thank you for all of your help,
John Nugent


Hi John,

You’re linking against libCore twice, https://github.com/patha325/NewSaRoMaN/blob/master/B4c/CMakeLists.txt#L54 :

set(dummy Core RIO ...)

target_link_libraries(exampleB4c ${dummy} ${dummy} GBase)

That’s not a good idea. You’ll instead need to sort out the library dependency and get the order right. We have a CMake snippet that helps here (for the ROOT libraries!); see https://root.cern.ch/how/integrate-root-my-project-cmake

Cheers, Axel.


Hi Axel,

thank you for your reply. I followed the instructions on the page that you provided the link to and have attached my updated CMakeLists.txt file. CMakeLists.txt (3.5 KB)

I have tried placing the ${ROOT_LIBRARIES} in the target_link_libraries before all other libraries, in the middle of the list and at the end and in each case I get the same segfault as I reported above.

Am I missing something else?



Hi John,

Interesting. Could you create a TApplication app("app", &argc, argv); object in your main(int argc, const char** argv)?

Cheers, Axel.


Hi Axel,

I have included the line

TApplicaton app ("app", &argc, argv);

as the first line in the main function and I have attached the error log that is return when I run the script. log.txt (108.6 KB)



Hmm. Would you have a reproducer - the minimal program (its source) that reproduces this issue? Can you reduce your code, stripping away the parts that I likely don’t have and that are not strictly needed to show the error?

Cheers, Axel.