Warning cling

Hi everyone

This evening I tried to run a macro that generates some libraries. I ended with this error

Warning in cling::IncrementalParser::CheckABICompatibility():
  Possible C++ standard library mismatch, compiled with __GLIBCXX__ '20220421'
  Extraction of runtime standard library version was: '20230528'

I have the sensation that this is due to a recent passage to a new version of gcc, maybe. I have build root from source.

Thank you for your precious help!

ROOT Version: 6.26/10
Platform: ubuntu
Compiler: gcc 11.4

Hello, @Adrianodelvincio!
I think you should rebuild ROOT to link with the new version of glibc, following a similar topic. This might also be a good time to upgrade to a newer version of ROOT! :smile:

1 Like

Wait, so I have to rebuilt ROOT from scratch, or can I simply upgrade ROOT?
Is there a way to rebuild only cling without recompiling and rebuilding entirely ROOT? (it requires time)

First of all, do you still have folder where you built ROOT and, less importantly, source folder? If not, then the only way would be to build from scratch again like you mentioned you did earlier. In such a case I assume it would be reasonable to use latest version (Releases · root-project/root · GitHub).

Regarding simple upgrade, I’m afraid that in your case you have to build from scratch, according to Easy way to update ROOT?:

As for rebuilding only cling, the simplest hack might be this:

  1. Backup install and build directories of ROOT.
  2. Remove contents of install directory.
  3. cd to your build directory and remove interpreter/cling directory here.
  4. Run cmake command with your appropriate flags.
  5. Run build and install commands.

This is not guaranteed to work. There were more elaborated instruction:

To sum up, I suggest that instead of investing time into exploring how to rebuild only cling, you could, with more reliable results, just rebuild from scratch (may be with a newer version of ROOT to justify time investment) or install from a pre-compiled binaries available for Ubuntu.

Alternatively, you can simply downgrade gcc, delaying the upgrade of both ROOT and gcc.

1 Like

I have read your answer, thank you for all the details. Considering that I need a version of ROOT able to compile and link libraries, and that I will have soon a new laptop, I think that th best approach is to downgrade gcc. Building root from scrach or investigating why cling is broken would require me a lot of time.

Do you know how can I downgrade cling?

Based on __GLIBCXX__ values you provided it seems that you have upgraded from gcc-11.3 to 11.4.

While it is indeed possible to switch to a different gcc version via update-alternatives, it seems that Ubuntu maintainers keep only the latest version of gcc-11 in repositories, probably because of security policy. So, for example, you can switch to gcc-10 or gcc-12 from gcc-11, but not from gcc-11.4 to gcc-11.3 unless you are building gcc-11.3 from source. I am sorry for any possible confusion, as I didn’t acknowledge this nuance.

Ultimately, I think you can just ignore cling warning and see if it is an actual problem. Newer versions of libstdc++ should be backwards compatible, and maintainers won’t include breaking changes into an incremental update. Brief look into 11.4 changelog shows that there are mostly fixes and tests, which shouldn’t break anything.

1 Like

Thank you for your help and dedition Ako_b !!!

1 Like

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