Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: undefined symbol: fast_copy #16

Open
Estebastien opened this issue Mar 9, 2018 · 3 comments
Open

error: undefined symbol: fast_copy #16

Estebastien opened this issue Mar 9, 2018 · 3 comments

Comments

@Estebastien
Copy link

Hi,
I don't know what I am doing, so sorry if the issue is stupid.
When I import ffht, I get an import error
ImportError: [...]/anaconda3/lib/python3.6/site-packages/FFHT-1.1-py3.6-linux-x86_64.egg/_ffht.cpython-36m-x86_64-linux-gnu.so: undefined symbol: fast_copy

For installation, I did
cd FFHT-master/
../anaconda3/bin/python setup.py install

Thank you.

@ilyaraz
Copy link
Member

ilyaraz commented Mar 9, 2018

What if you use the commit 8b7be6a?

@Estebastien
Copy link
Author

Thank you for your reply!
Hum I think there is progress, but I still get an import error:

ImportError: [...]/anaconda3/lib/python3.6/site-packages/FFHT-1.1-py3.6-linux-x86_64.egg/_ffht.cpython-36m-x86_64-linux-gnu.so: undefined symbol: Py_InitModule3

But this time I found maybe someone who talk about this issue.
https://stackoverflow.com/questions/43621948/c-python-module-import-error-undefined-symbol-py-initmodule3-py-initmodu

It is adviced to "create a PyModuleDef structure instead [of Py_InitModule3] and then pass a reference to it to PyModule_Create". Does it makes sense to do this? Is a good direction ?

@dnbaker
Copy link
Contributor

dnbaker commented Mar 11, 2018

It's also a pretty small function. We could just give it static inline storage and save trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants