conda-forge / graph-tool-feedstock

A conda-smithy repository for graph-tool.
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

graph-tool import error: Incompatible libstdc++.so.6 version on HPC system #121

Closed CooperStansbury closed 3 months ago

CooperStansbury commented 4 months ago

Comment:

Summary:

I'm attempting to use graph-tool (version 2.58) installed via conda-forge on my University's HPC system, but I'm encountering an import error due to an incompatible libstdc++.so.6 version.

Error Message:

ImportError: /sw/pkgs/arc/python3.9-anaconda/2021.11/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/cstansbu/miniconda3/lib/python3.9/site-packages/graph_tool/libgraph_tool_core.so) 

Troubleshooting Steps:

Request:

I'd appreciate guidance on diagnosing the root cause: Why is the incompatible system libstdc++.so.6 being used despite the correct linkage?

System Specifications:

uname -a
>>> Linux gl0006.arc-ts.umich.edu 4.18.0-372.75.1.el8_6.x86_64 #1 SMP Thu Sep 21 18:03:22 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
>>>  LSB Version:    :core-4.1-amd64:core-4.1-noarch
>>>  Distributor ID: RedHatEnterprise
>>>  Description:    Red Hat Enterprise Linux release 8.6 (Ootpa)
>>>  Release:        8.6
>>>  Codename:       Ootpa

Additional Notes:

stuarteberg commented 3 months ago

Verified LD_LIBRARY_PATH: I've set LD_LIBRARY_PATH to include a compatible libstdc++.so.6 prior to installing graph-tool via conda.

There should be no need to set LD_LIBRARY_PATH, and it is probably a bad idea. Your own conda environment will include a compatible libstdc++.so in its own lib/ directory. Judging from your error message above, it should be here:

/home/cstansbu/miniconda3/lib/libstdc++.so

BTW, it appears that you have installed graph-tool into your miniconda base environment. You should probably try installing it to a dedicated environment, at least for testing purposes.

First, make sure your version of conda is up-to-date. Since you appear to have multiple conda installations on your machine, be careful to work with your own base environment:

source /home/cstansbu/miniconda3/bin/activate base
conda install -n base 'conda>=24.5.0'

And then try installing graph-tool-base with the following command:

conda create -n gt --override-channels -c conda-forge 'graph-tool-base>=2.68'

And check to see if it was installed properly:

conda activate gt
python -c 'import graph_tool.all as gt'

If that works, you can try installing the full graph-tool package (which includes drawing dependencies).

conda install -n gt --override-channels -c conda-forge `graph-tool>=2.68`

If you're still having trouble, please reply with the output of conda info, along with a transcript of the commands you tried.

CooperStansbury commented 3 months ago

A fresh conda install worked. I will close.

Best,