NLeSC / root-conda-recipes

Conda recipes for building ROOT 5 and ROOT 6 binaries, root_numpy, rootpy, root_pandas, with both Python 2 and Python 3 support.
29 stars 18 forks source link

libstdc++.so.6: version 'CXXABI_1.3.9' not found #32

Closed fdesse closed 5 years ago

fdesse commented 6 years ago

Hello !

I had some issues trying to install root and root pandas via conda (see https://github.com/scikit-hep/root_pandas/issues/51 for more details). I found a way to fix it (thanks to Chris Burr), so let me post it here so that it can be fixed, or to help someone having the same problem.

Doning this: $ conda create --name=test-plain-pandas $ source activate test-plain-pandas $ conda install root_pandas $ conda activate test

Ended up with:

root: /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/libstdc++.so.6: version 'CXXABI_1.3.8' not found (required by /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/./libicui18n.so.58) root: /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/libstdc++.so.6: version 'CXXABI_1.3.9' not found (required by /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/./libicui18n.so.58) root: /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/libstdc++.so.6: version 'CXXABI_1.3.8' not found (required by /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/./libicuuc.so.58) root: /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/libstdc++.so.6: version 'CXXABI_1.3.9' not found (required by /afs/cern.ch/work/f/fadesse/miniconda3/envs/test-plain-pandas/bin/../lib/./libicuuc.so.58)

Whenever I tried to open ROOT.

One way (kindly proposed by Chris Burr) to fix this was to install root_pandas via pip, like:

conda create --name=test-plain-pandas-2 python=3.6 source activate test-plain-pandas-2 conda install root source activate test-plain-pandas-2 conda install binutils pip install root_pandas --no-binary root_numpy

But this created the following problem when trying to use matplotlib:

from matplotlib import pyplot ImportError: /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/./libstdc++.so.6: version 'CXXABI_1.3.9' not found (required by /afs/cern.ch/work/f/fadesse/miniconda3/envs/angAna/lib/python3.6/site-packages/matplotlib/_path.cpython-36m-x86_64-linux-gnu.so)

Doing

conda update -f libstdcxx-ng

did the trick for me. Chris Burr also proposed to do (worked for him, I did not test it):

cd $CONDA_PREFIX/lib rm libstdc++.so.6 ln -s libstdc++.so.6.0.24 libstdc++.so.6

If the file libstdc++.so.6.0.24 doesn't already exist, try conda install gxx_linux-64.

jonas-eschle commented 6 years ago

In addition, I think it's worth mentioning here https://github.com/tensorflow/tensorflow/issues/5017#issuecomment-254769527, which solved the problem for me. It's replacing the anaconda compiler with the system one.

egpbos commented 6 years ago

@fdesse Thanks for putting this to our attention!

Did your problems occur when installing root_pandas from the nlesc conda channel?

fdesse commented 6 years ago

No I think its from pip. Although I added the nlesc channel before, so I'm not sure which one pip pick sup. This is exactly what I did:

$ conda config --add channels https://conda.binstar.org/NLeSC
$ conda create --name=angAna python=3.6
$ source activate angAna
$ conda install root
$ source activate angAna
$ conda install binutils
$ pip install root_pandas --no-binary root_numpy
egpbos commented 6 years ago

Ok, thanks for that extra info. I'm not 100% sure, but this looks to be caused by ABI mismatch due to different compilers being used for different packages. We're currently redesigning the build process of all packages, mainly to make it easier to rebuild, so that we can keep the packages up to date more easily. After that's done, we will check whether this issue persists.

egpbos commented 5 years ago

The NLeSC ROOT Conda package is no longer maintained and does not work properly with current Conda, modern Python, or modern ROOT. Use conda-forge ROOT instead:

Installing in a new environment:

conda create -n myrootenv python=3.7 root -c conda-forge
conda activate myrootenv
conda config --env --add channels conda-forge

From then on, use conda activate myrootenv to get in and conda deactivate to get out of the env. You should have a recent version of conda.

or

Installing in the current environment:

conda config --env --add channels conda-forge 
conda install root

Unlike the NLeSC package, this can even be the base environment if you really want to do that (it is not ideal, since it will be rather invasive, adding things like conda's compiler packages that are needed to compile with ROOT and Conda).

Conda-forge ROOT provides ROOT 6.16.00+, and supports Python 3.7, 3.6, and 2.7 on macOS and Linux. It is being tested by the ROOT team, and is automatically build by the conda-forge infrastructure. All default features and a huge number of optional features are turned on, and you can use it anywhere you would use ROOT, JupyROOT, or PyROOT.