Problem with Root Library

Hi, I’m new to the forum and I’m (of course) newbie.
I’m trying to run some program but I get this kind of error:

IncrementalExecutor::executeFunction: symbol ‘ZSt3powIiiEN9__gnu_cxx11__promote_2IT_T0_NS0_9__promoteIS2_Xsr3std12__is_integerIS2_EE7__valueEE6__typeENS4_IS3_Xsr3std12__is_integerIS3_EE7__valueEE6__typeEE6__typeES2_S3’ unresolved while linking [cling interface function]!
IncrementalExecutor::executeFunction: symbol ‘_ZSt12setprecisioni’ unresolved while linking [cling interface function]!
You are probably missing the definition of std::setprecision(int)
Maybe you need to load the corresponding shared library?

I don’t actually know how to deal with it plus I’m not really sure if the root installation went well and everything is fine, I’m also new to C++ programming and library system.

This are my root specifics:

| Welcome to ROOT 6.22/02 https://root.cern |
| © 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Aug 17 2020, 12:46:52 |
| From tags/v6-22-02@v6-22-02 |

I also tried to use in very simple program Tmath.h but the root compiler doesn’t find the file!

If you can help me I would be really happy and glad to you. I’m sorry for any grammar mistake.

Hi @NinoFrassica (lol?),
how did you install ROOT?

Can you start the ROOT prompt (running root in the terminal) and run, e.g. 2+2 and (new TF1("f", "sin(x)", 0, 6))->Draw()?

Cheers,
Enrico

Hi, (non so se si possa parlare italiano comunque ciao, molto piacere e grazie mille della risposta) Enrico,

I installed root using this instruction https://root.cern/install/.

Yes the command run. Actually I “fixed” my problem removing “setprecision(4)” that I was using.

But the problem with Tmath.h is still there, I dont know if I miss some library or something like this.
For the moment I replaced Tmath.h witch cmath.

Thank you for the help! :slight_smile:

About setprecision: it looks like a mismatch between the compiler version ROOT was compiled with the your compiler version.

Which of the installation methods did you use? If you downloaded a pre-compiled binary, which one did you download and on what operating system are you? (e.g. it could be you downloaded a version for Ubuntu 18 but you have Ubuntu 19 or vice-versa). What does gcc --version print?

The spelling is TMath.h (capital M) could that be the problem? Otherwise, how are you compiling the code that includes that header?

Cheers,
Enrico

I used the last method in the guide.

That’s the print of gcc -version:

gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright © 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For TMath.h the error was the capital M.

Thank you again!

I.e. you built ROOT from source? If you don’t have specific needs any other method is probably simpler, e.g. installing ROOT as a conda package is just one command: conda env create -n cern-root -c conda-forge root.

Ok so the TMath problem is resolved. For the other, hard to say, probably the build/installation did not complete correctly or picked up a different compiler than the one you are using now or similar.

@vvassilev or @Axel might have an idea of what might cause:

IncrementalExecutor::executeFunction: symbol ‘ZSt3powIiiEN9__gnu_cxx11__promote_2IT_T0_NS0_9__promoteIS2_Xsr3std12__is_integerIS2_EE7__valueEE6__typeENS4_IS3_Xsr3std12__is_integerIS3_EE7__valueEE6__typeEE6__typeES2_S3’ unresolved while linking [cling interface function]!
IncrementalExecutor::executeFunction: symbol ‘_ZSt12setprecisioni’ unresolved while linking [cling interface function]!

What steps do you need to do to get that error exactly?