Error: LLVM symbols exposed to Cling

I get this error when running my application, during the creation of an output file with TFile::Open:

with Root 6.08.02. I found some old threads about this topic, spotting the explicit linkage of libCling as the source of the problem. But I don’t link libCling to my application, as I double-checked with ldd. So what can be the reason? I run Root on a 64 bit Archlinux system, the compiler is GCC 6.3; my application is built using cmake. These are the Root libraries I explicitly link to my executable:

Thanks.

I did some tests and I found a possible explanation. My system has a Radeon graphic card; I use the open source Linux driver stack which at some point leverages LLVM. My application is a simple Geant4 simulation, and I usually start it in interactive mode with a Qt GUI and OpenGL for geometry visualization. When my application initializes the OpenGL canvas then the system LLVM library is loaded (in my case, /usr/lib/libLLVM-3.9.1.so). After that, I try to open the file by calling TFile::Open: at this point, the cling interpreter is created, but LLVM symbols have already been loaded so the error message is printed. This explanation is confirmed by the fact that when I start my application in batch mode without OpenGL then the error does not occur.

My dirty workaround consists in calling gROOT->GetInterpreter() before the initialization of the OpenGL view, forcing the creation of the cling interpreter before loading the LLVM symbols. But is it possible to fix this issue in a proper way?

2 Likes

Hi,

Could it be the same than reported on LLVM collision with OpenGL in CentOS7?

Cheers, Bertrand.

Could be… As I said I’m not a mesa expert so I can’t tell exactly…

Thanks. Your suggestion saved my bacon.