Libstdc++.so: version `GLIBCXX_3.4.30' not found after building from source on Ubuntu

Hello,

I followed the instructions to build root from source on an ubuntu machine:

git clone --branch latest-stable --depth=1 GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically root_src
mkdir root_build root_install && cd root_build
cmake -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src
cmake --build . – install -j4
source …/root_install/bin/thisroot.sh

and then when I try to use ROOT in python I hit this error:

python3
Python 3.10.14 (main, Mar 21 2024, 16:24:04) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Fatal in TROOT::InitInterpreter: cannot load library /home/ubuntu/miniconda3/lib/python3.10/lib-dynload/…/…/libstdc++.so: version `GLIBCXX_3.4.30’ not found (required by /home/ubuntu/root_install/lib/libRIO.so)

Is it obvious to someone how to resolve this issue?

Thanks,

Mark

ok, it seems the issue is I am in a conda base shell. If I deactivate that, then importing ROOT works.

So presumably I need to update the libstdc++ version inside my conda shell such that I can use ROOT inside that.

Cheers,

Mark

Thanks Mark for reporting back.

Just to close the loop on this so others can see what the solution I found, which worked, is:

I recompiled the ROOT source outside any conda environment to ensure no explicit dependence on anything inside the conda environment. This didn’t solve the problem on its own, so perhaps was not needed. But then subsequently inside conda executing:

conda update -c conda-forge libstdcxx-ng

was enough to solve the problem (note that “conda update -c libstdcxx-ng” did not solve the problem, you need to specify conda-forge).

Cheers,

Mark

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