Weird error "std::basic_string...." with ROOT 6.08.04

Hi.

I recently updated ROOT from 6.06.00 to 6.08.04 because TClonesArray in the older version gave an error with no reason.
Probably that should be a bug in the version because it doesn’t occur with the newer version.

Anyway, after the update, I got a new error whenever I start a new interactive session.

IncrementalExecutor::executeFunction: symbol '_ZNSsC1EOSs' unresolved while linking [cling interface function]!
You are probably missing the definition of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)
Maybe you need to load the corresponding shared library?

There’s a rootlogon.C macro file that I attached.

This doesn’t happen with the older version. So, I suspect it’s related to the new version of ROOT or in between the library I’m using with the new version.

So, as a temporary solution, I wrote a new macro file and it worked.

void rootlogon2() {
  gROOT -> ProcessLine("gInterpreter -> AddIncludePath(\"/home/anaroot/include\");");
  gROOT -> ProcessLine("gSystem -> Load(\"libanaroot.so\");");
  gROOT -> ProcessLine(".x rootlogon.C");
}

Any idea would be helpful.

Thanks in advance.
rootlogon.C (3.61 KB)

Hi,

What OS are you running? How did you build ROOT?

This symbol should be coming from the (compiler’s) standard library. This usually indicates a mismatch between the build environment and the run-time environment (i.e. a different version of the compiler and/or standard libraries).

Cheers,
Philippe.

Thanks for the reply.

I’m using Scientific Linux 6.1 with devtoolset-2, which has gcc 4.8.2.
I made sure both ROOT and anaroot be compiled with the same environment.

Hi,

Cling does not (yet?) support devtoolset (due to limitation in clang).

To get ROOT to work, you will need to install a full fledged version of the compiler.

Cheers,
Philippe.

Oh… I didn’t know that.
We used devtoolset for about 3 years and it worked fine until 6.08.04.

Then, up to now, our system was okay thanks to some kind of bug.
It works with 6.06.02 but later version than 6.06.02 never work.

I’ve used devtoolset-2 from the beginning of ROOT6.
One time I compiled compiler and used ROOT6 with that.
All the time it worked just fine.
I hope I can find the solution.

Anyway, thank you for the information.
I’ll try not to use devtoolset-2 later on.

What I really don’t understand is that if I use below macro, everything just works fine.

void rootlogon2() {
  gROOT -> ProcessLine("gInterpreter -> AddIncludePath(\"/home/anaroot/include\");");
  gROOT -> ProcessLine("gSystem -> Load(\"libanaroot.so\");");
  gROOT -> ProcessLine(".x rootlogon.C");
}

Hi,

My bet is that you / we switched the ABI for ROOT 6.08, and to satisfy symbol requests for that new ABI GCC needs to resolve symbols from the static library of the devtoolset - which is exactly what we don’t support.

And indeed - in the past you needed some specific code (code involving std::error_code was one example) to see a failure due to the way devtoolset is set up. Now, with the new ABI, it’s everywhere.

I’m afraid that you will have to grab a compiler from EPEL until we implement support for devtoolset… which we haven’t gotten to for the last three years :frowning:

Cheers, Axel.

I tried to compile the compiler myself and use it.

It solved the problem. All worked just fine.