lacava / few

a feature engineering wrapper for sklearn
https://lacava.github.io/few
GNU General Public License v3.0
51 stars 22 forks source link

ImportError: dlopen ... symbol not found #33

Closed jay-reynolds closed 6 years ago

jay-reynolds commented 6 years ago

Hi, I've cloned few, built and installed on OS X 10.12 using:

CC=gcc-7 python setup.py install

But I'm getting a symbol not found error on import of the few module.

I note a few warnings during the build process beginning with: #warning "Using deprecated NumPy API, disable it by ...

and then finally:

g++ -bundle -undefined dynamic_lookup -L/Users/robertreynolds/anaconda3/envs/ml/lib -arch x86_64 -L/Users/robertreynolds/anaconda3/envs/ml/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/few/lib/few_lib.o -o build/lib.macosx-10.7-x86_64-3.6/few_lib.cpython-36m-darwin.so clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

Any advice what to check next? Otherwise, I'm not entirely clear on why I'm seeing a clang message, so that, along with the indicated warning is my first avenue to explore.

lacava commented 6 years ago

hm. I would guess that you might be missing a c++ library. if you run ldd [few_lib.xxx.so] on the few_lib library it should tell you what is missing.

The NumPy warning is typical and shouldn't be a problem. Not sure about the clang warning either, sorry. Please let me know what you find.

jay-reynolds commented 6 years ago

I'm seeing this:

otool -L few_lib.cpython-36m-darwin.so

few_lib.cpython-36m-darwin.so: /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

jay-reynolds commented 6 years ago

g++ is insisting on using clang... Trying to work around now.

jay-reynolds commented 6 years ago

Added to setup.py:

os.environ["CC"] = "gcc-7" os.environ["CXX"] = "g++-7"

Good to go now. Builds without error, imports without complaint.

lacava commented 6 years ago

Great!