The error you are describing does not look like a Python import error, but rather, /directory/.cpython-38-x86_64-linux-gnu.so just doesn't export the symbol 'gsl_multiroot_fsolver_dnewton'. This can be verified with, e.g.:

nm -gC /.cpython-38-x86_64-linux-gnu.so

I'm only following this mailing list from a distance, but I think it'd be useful to know what version of GSL you built and what exact procedure you followed when doing so.

Marc

On 7/27/23 10:54, Somin Lee wrote:
Hi I've been encountering this error continuously and couldn't not find a
way to resolve this issue.

I've been trying to use gsl multiroot fsolver. The program I'm using uses
both C++ and python code. gsl is only used in single .cpp file, and the
python file uses functions written in c++ with pybind modules.
both gsl and gslcblas libraries were built properly, and there was no issue
in including multiple header files.
However, it returned error of undefined symbol for
gsl_multiroot_fsolver_type. I've checked multiple times the syntax is
correct but it seems so random to encounter the error because it's not
returning any other import error for gsl functions or gsl vectors.
Following is the error code:
ImportError: /directory/.cpython-38-x86_64-linux-gnu.so: undefined symbol:
gsl_multiroot_fsolver_dnewton

Also, it is also hard to understand why it would be python import error
when none of the python code is using the gsl. Just single cpp file.

Any help or advice would be greatly appreciated!
Thank you!

Best regards,
Somin

Reply via email to