FALCONN-LIB / FFHT

Fast Fast Hadamard Transform
http://falconn-lib.org
Other
77 stars 19 forks source link

error: undefined symbol: fast_copy #16

Open Estebastien opened 6 years ago

Estebastien commented 6 years ago

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 commented 6 years ago

What if you use the commit 8b7be6a33bb2e8fb6bc983050085b42525f310e8?

Estebastien commented 6 years ago

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 commented 6 years ago

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