Import error- undefined symbol: __gmpq_add
- Dominant language
- C++
- Stars
- 29
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
When I'm importing memsurfer, I get the following error:
ImportError: /home/nambinik/miniconda3/lib/python3.11/site-packages/memsurfer-1.1.0-py3.11-linux-x86_64.egg/memsurfer/_memsurfer_cmod.so: undefined symbol: __gmpq_add
I believe this might be due to the GMP library not being linked,
With inspiration from an earlier question #3 I added the libgmp libraries to setup.py and reinstalled memsurfer.
Specifically changed lines 228,234 and 235
include_dirs=[PATH_PM, numpy.get_include(),
PATHS['boost']['include'],
PATHS['eigen']['include'],
PATHS['cgal']['include'],
'/opt/local/include','/usr/include/x86_64-linux-gnu'
],
LIBS_EXT.append('gmp')
libraries=LIBS_EXT,
library_dirs=[PATHS['cgal']['lib'],'/usr/lib/x86_64-linux-gnu/']
Still get the same error though. How would one go about getting around this error?
Best
Nikhil
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in setup.py around lines 228, 234, and 235, then inspect how the _memsurfer_cmod.so extension is linked against GMP and reproduce the import in the reported Python 3.11 environment. The work is done when importing memsurfer no longer reports the undefined __gmpq_add symbol.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100