Quantum-Dynamics-Hub / libra-code

https://quantum-dynamics-hub.github.io/libra/index.html
GNU General Public License v3.0
48 stars 44 forks source link

undefined symbol: _ZTIN5boost6python15instance_holderE #217

Open K-i-n-gC-r-i-m-s-o-n99 opened 4 weeks ago

K-i-n-gC-r-i-m-s-o-n99 commented 4 weeks ago

I am getting the error message "undefined symbol: _ZTIN5boost6python15instance_holderE" when I try to import the libraries of libra:

from liblibra_core import from libra_py import import os import sys import time import numpy as np import matplotlib.pyplot as plt

The issue appears to be related to Boost.Python and is most probably an incompatibility between the Boost.Python library used to compile the C. How can this be resolved?

alexvakimov commented 4 weeks ago

The general recommendation is to stick to the instructions as much as possible (e.g. sequence of installations and the versions of the packages). If things do not work, one can try re-installing the Miniconda or re-creating the Conda environment needed to build Libra. However, before radical changes, consider re-running cmake ../ from the _build directory before recompiling the code - this is needed when new files (both .cpp and especially .h) are added to the code. Simply running the make -j4 would be using the older Makefile which may not have the relevant source files listed. Then the compilation may go normally, but the linking will not be complete - this is where the "undefined symbol: X" errors come from.