12

I've seen Where can I find GLIBCXX_3.4.29? which doesn't answer my specific question.

I've got GLIBCXX_3.4.29 according to strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX. I'm specifically asking how I get it in my anaconda environment. I've got the most recent version of conda, 7.2.0 as per the install instructions conda libgcc but the GLIBCXX_3.4.29 doesn't meet the version required by some code I'm running

Addressing comment below

Would be better to know what you are trying to run

I'm trying to run some code that uses an in-house .so file. I've managed to run it before but I'm guessing that something changed when I updated a library used in generating the .so file.

Note: I've tried git checkout the library to an older version and rebuilding all of it but I'm still facing the issue.

How I created the env

conda create -n crannog python=3.6
conda activate crannog
pip install -r requirements.txt

Pastebin of Requirements.txt

Pastebin of conda list

IanQ
  • 1,831
  • 5
  • 20
  • 29
  • Issues like this usually have more to do with channel mixing or environment leakage than having to manipulate libraries. I.e., you may be trying to solve a symptom, not the underlying problem. Would be better to know what you are trying to run, how you created the environment, and maybe even the full `conda list` for your environment. – merv Jul 01 '21 at 17:22
  • Thanks! I've added the `requirements.txt` and the `conda list` results and pasted them in links above. What other information would be useful? – IanQ Jul 01 '21 at 21:16
  • Looking into this, [the ABI section of GCC manual](https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) indicates only GCC 11 builds with this requirement. No Conda channels build GCC beyond 9.3.0 (GLIBCXX_3.4.28). I think your options are 1) build it yourself 2) [nag Conda Forge maintainers](https://github.com/conda-forge/ctng-compilers-feedstock/issues) to build GCC 11 (and `libstdcxx-ng`) 3) convince whoever is building your .so in your org to build in a more backwards compatible fashion (e.g., do they actually need C++20 features?). – merv Jul 01 '21 at 23:06
  • Ahh, crap. Okay, thanks. Do you know if it's possible for me to make conda look for my system-level package as opposed to the conda one? I'll have to look into it... I don't think we need C++20 since last I checked it all worked on C++ 11. – IanQ Jul 02 '21 at 00:29
  • 3
    The GCC 11 compiler now exists on conda-forge, and can be installed as "conda install -c conda-forge gxx_linux-64==11.1.0". It fixes this problem. – Oleg Sep 08 '21 at 18:38
  • I have no "sudo" rights so I uninstall and installed anaconda with the version that can support Python 3.8.5 (not sure about other versions of Python) and it worked. – Dammio Mar 06 '23 at 15:08

2 Answers2

7

Using answer from the comments, this worked perfectly:

conda install -c conda-forge gxx_linux-64==11.1.0

It installs the latest version of GlibC compatible with your Conda environment.


To install a specific version of GlibC (as pointed out by @Milad in the comments)

conda install -c conda-forge gxx_linux-64==XX.YY.Z
Rafay Khan
  • 1,070
  • 13
  • 25
1

I tried to update the gxx_linux-64 as mentioned but it didn't find the package. Then I updated my conda by conda update -n base -c defaults conda and then deactivated my environment and activate the environment again. It worked. I am not sure which step worked.

Qi Dang
  • 11
  • 2
  • I ran both steps, but conda reported everything up to date, so I suspect it is the second step which helps. In any case, thank you. – John Madden Feb 05 '23 at 20:13