# Warning cling

**URL:** <https://root-forum.cern.ch/t/warning-cling/56943>\
**Category:** ROOT\
**Created:** [October 31, 2023, 8:50pm UTC](https://root-forum.cern.ch/t/warning-cling/56943 "2023-10-31T20:50:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrianodelvincio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrianodelvincio/32/25888_2.png) [@Adrianodelvincio](https://root-forum.cern.ch/u/Adrianodelvincio)\
**Post date:** [October 31, 2023, 8:50pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/1 "2023-10-31T20:50:03Z")

</div>

Hi everyone

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

```auto
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

* * *

---

<div class="post-metadata">

**Author:** ![Ako\_b](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Ako\_b](https://root-forum.cern.ch/u/Ako_b)\
**Post date:** [October 31, 2023, 10:45pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/2 "2023-10-31T22:45:41Z")

</div>

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! 😄

> [@Remove cling warning](https://root-forum.cern.ch/t/remove-cling-warning/22090/2):
>
> Try rebuilding cling from scratch (so that the C++ library use at compile time and run-time matches). Cheers, Philippe

---

<div class="post-metadata">

**Author:** ![Adrianodelvincio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrianodelvincio/32/25888_2.png) [@Adrianodelvincio](https://root-forum.cern.ch/u/Adrianodelvincio)\
**Post date:** [November 1, 2023, 8:07am UTC](https://root-forum.cern.ch/t/warning-cling/56943/3 "2023-11-01T08:07:59Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Ako\_b](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Ako\_b](https://root-forum.cern.ch/u/Ako_b)\
**Post date:** [November 1, 2023, 11:11am UTC](https://root-forum.cern.ch/t/warning-cling/56943/4 "2023-11-01T11:11:13Z")

</div>

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](https://github.com/root-project/root/releases)).

Regarding simple upgrade, I’m afraid that in your case you have to build from scratch, according to [Easy way to update ROOT?](https://root-forum.cern.ch/t/easy-way-to-update-root/40348/5):

> [@Easy way to update ROOT?](https://root-forum.cern.ch/t/easy-way-to-update-root/40348/5):
>
> Compiling ROOT from source like you did is the best way to customize ROOT, but then you have the responsibility to manage that ROOT installation. If you have not installed ROOT in system directories such as `/usr/local` after compilation (you can check where your ROOT installation resides with `which root`, for example), then upgrading should be a matter of removing your current installation (e.g. removing the build/install directory) and compiling again. If you did install ROOT in system directories, you have to manually remove it from there.

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:

> [@Remove cling warning](https://root-forum.cern.ch/t/remove-cling-warning/22090/5):
>
> Solution: (Ubuntu) Remove all folders and files in your Ubuntu with llvm, clang, cling and Cmake in the name. Re-install Cmake. sudo apt-get install cmake Go to this site: [https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh](https://raw.githubusercontent.com/karies/cling-all-in-one/master/clone.sh) and execute the script in your Ubuntu. Cling will work fine again. For avoid problems, you can update Cmake before execute the script. Cheers, Usori.

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](https://root.cern/install/#download-a-pre-compiled-binary-distribution).

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

---

<div class="post-metadata">

**Author:** ![Adrianodelvincio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrianodelvincio/32/25888_2.png) [@Adrianodelvincio](https://root-forum.cern.ch/u/Adrianodelvincio)\
**Post date:** [November 1, 2023, 12:53pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/5 "2023-11-01T12:53:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Ako\_b](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@Ako\_b](https://root-forum.cern.ch/u/Ako_b)\
**Post date:** [November 1, 2023, 2:47pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/6 "2023-11-01T14:47:12Z")

</div>

Based on [` __GLIBCXX__ `](https://gcc.gnu.org/develop.html#timeline) 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](https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/ChangeLog;h=19ca5d7af1d61e1581448decea12f004cfa1ccef;hb=ff4bf326d03e750a8d4905ea49425fe7d15a04b8) shows that there are mostly fixes and tests, which shouldn’t break anything.

---

<div class="post-metadata">

**Author:** ![Adrianodelvincio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrianodelvincio/32/25888_2.png) [@Adrianodelvincio](https://root-forum.cern.ch/u/Adrianodelvincio)\
**Post date:** [November 1, 2023, 3:24pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/7 "2023-11-01T15:24:42Z")

</div>

Thank you for your help and dedition Ako\_b !!!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 15, 2023, 3:25pm UTC](https://root-forum.cern.ch/t/warning-cling/56943/8 "2023-11-15T15:25:04Z")

</div>

Closed on November 15, 2023, 3:25pm UTC

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