ROOT cannot find its libraries in CLING

How can it be that I experience this error in CLING:

IncrementalExecutor::executeFunction: symbol '_ZN5TMath3ExpEd' unresolved while linking [cling interface function]!
You are probably missing the definition of TMath::Exp(double)
Maybe you need to load the corresponding shared library?

It happens when I have successfully finished debugging a ROOT script and is resolved by restarting ROOT.

What are the exact steps to reproduce the problem?

Start with a script

void clingproblem()
{
  double a(1);
  int b[12];
  a = b;                                                                                                                                                                                                  
  printf("successful %f\n", TMath::Exp(a));
}

Then

v@v-VirtualBox:~/rootscripts$ root -l
root [0] .x clingproblem.cc
In file included from input_line_10:1:
/home/v/rootscripts/clingproblem.cc:5:7: error: assigning to 'double' from incompatible type 'int [12]'
  a = b;
      ^

Comment out the line
a=b

and save.

Then

root [1] .x clingproblem.cc
IncrementalExecutor::executeFunction: symbol '_ZN5TMath3ExpEd' unresolved while linking [cling interface function]!
You are probably missing the definition of TMath::Exp(double)
Maybe you need to load the corresponding shared library?
root [2] .q
v@v-VirtualBox:~/rootscripts$ root -l
root [0] .x clingproblem.cc
successful 2.718282
root [1]

Is it done on purpose or is it an unresolved problem?

It’s an unresolved problem - we’re working on it, making progress here and there. This one should be solved by https://github.com/root-project/root/pull/4447

1 Like

And indeed - I just got confirmation that this PR will solve it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.