prisms-center / CASMcode_clexulator

CASM `clexulator` library
Other
0 stars 4 forks source link

Encountering `dlopen failed: /path/to/miniconda3/envs/casm2.X_env/bin/../lib/libstdc++.so.6: version 'GLIBCXX_3.4.32' not found` #26

Open seshasaibehara opened 1 month ago

seshasaibehara commented 1 month ago

If you are trying to compile a clexulator using make_clexulator function in libcasm-clexulator installed via conda, and the latest version of c++ shipped with ubuntu 24.04, you might encounter the following issue:

dlopen failed: /path/to/miniconda3/envs/casm2.X_env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by input_files/SiGe_Clexulator_default.so)
Error compiling clexulator. To fix: 
  - Check compiler error messages.
  - Check compiler options with 'casm settings -l'
    - Update compiler options with 'casm settings --set-compile-options '...options...'
    - Make sure the casm headers can be found by including '-I/path/to/casm'
Clexulator construction failed: could not construct runtime library.

To fix this issue, you might have to link libstdc++.so.6 that you might find in your system at /usr/lib/x86_64-linux-gnu/libstdc++.so.6 to the one in /path/to/miniconda3/envs/casm2.X_env/lib/. An example way to fix this would be:

rm /path/to/miniconda3/envs/casm2.X_env/lib/libstdc++.so.6.0.29
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /path/to/miniconda3/envs/casm2.X_env/lib/libstdc++.so.6.0.29
bpuchala commented 1 month ago

Linking this.