libra-code icon indicating copy to clipboard operation
libra-code copied to clipboard

undefined symbol: _ZTIN5boost6python15instance_holderE

Open K-i-n-gC-r-i-m-s-o-n99 opened this issue 1 year ago • 1 comments

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?

K-i-n-gC-r-i-m-s-o-n99 avatar Aug 16 '24 05:08 K-i-n-gC-r-i-m-s-o-n99

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.

alexvakimov avatar Aug 16 '24 17:08 alexvakimov