-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fail to use this library #7
Comments
Did you install the header files? If you did but they aren't being found, you can set the environment variable |
Do I need to install the header files? I thought just copy How should I install this |
Yes, CGO needs the header files. They should be installed if you use |
When I run the
Maybe this is why it didn't install the header files....By any chance you know the reason?... |
Try `make -C install` without the build. It looks like it's trying to build
the python bindings.
…On Thu, Jun 17, 2021, 7:57 PM xiaomai ***@***.***> wrote:
When I run the make -C build install command after make -C build -j faiss,
it shows:
(base) ***@***.*** faiss % make -C build install
[ 61%] Built target faiss
[ 62%] Built target swigfaiss_swig_compilation
[ 64%] Linking CXX shared library libfaiss_python_callbacks.dylib
Undefined symbols for architecture x86_64:
"_PyGILState_Ensure", referenced from:
(anonymous namespace)::PyThreadLock::PyThreadLock() in python_callbacks.cpp.o
"_PyGILState_Release", referenced from:
(anonymous namespace)::PyThreadLock::~PyThreadLock() in python_callbacks.cpp.o
"_PyObject_CallFunction", referenced from:
PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
"_PyString_AsString", referenced from:
PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
"_PyString_FromStringAndSize", referenced from:
PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
"_PyString_Size", referenced from:
PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
"faiss::FaissException::FaissException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, int)", referenced from:
PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
"faiss::IOReader::fileno()", referenced from:
vtable for PyCallbackIOReader in python_callbacks.cpp.o
"faiss::IOWriter::fileno()", referenced from:
vtable for PyCallbackIOWriter in python_callbacks.cpp.o
"typeinfo for faiss::FaissException", referenced from:
PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
"typeinfo for faiss::IOReader", referenced from:
typeinfo for PyCallbackIOReader in python_callbacks.cpp.o
"typeinfo for faiss::IOWriter", referenced from:
typeinfo for PyCallbackIOWriter in python_callbacks.cpp.o
"vtable for faiss::FaissException", referenced from:
faiss::FaissException::~FaissException() in python_callbacks.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for faiss::IOReader", referenced from:
faiss::IOReader::IOReader() in python_callbacks.cpp.o
faiss::IOReader::~IOReader() in python_callbacks.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for faiss::IOWriter", referenced from:
faiss::IOWriter::IOWriter() in python_callbacks.cpp.o
faiss::IOWriter::~IOWriter() in python_callbacks.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [faiss/python/libfaiss_python_callbacks.dylib] Error 1
make[1]: *** [faiss/python/CMakeFiles/faiss_python_callbacks.dir/all] Error 2
make: *** [all] Error 2
Maybe this is why it didn't install the header files....By any chance you
know the reason?...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFB5PWNXY7VKUHVKNB62LUDTTKDXFANCNFSM464RNCOQ>
.
|
|
Sorry, that command is wrong. You may need to pass the cmake option to
disable building the python bindings.
…On Thu, Jun 17, 2021, 9:11 PM Paul Ouellette ***@***.***> wrote:
Try `make -C install` without the build. It looks like it's trying to
build the python bindings.
On Thu, Jun 17, 2021, 7:57 PM xiaomai ***@***.***> wrote:
> When I run the make -C build install command after make -C build -j faiss,
> it shows:
>
> (base) ***@***.*** faiss % make -C build install
> [ 61%] Built target faiss
> [ 62%] Built target swigfaiss_swig_compilation
> [ 64%] Linking CXX shared library libfaiss_python_callbacks.dylib
> Undefined symbols for architecture x86_64:
> "_PyGILState_Ensure", referenced from:
> (anonymous namespace)::PyThreadLock::PyThreadLock() in python_callbacks.cpp.o
> "_PyGILState_Release", referenced from:
> (anonymous namespace)::PyThreadLock::~PyThreadLock() in python_callbacks.cpp.o
> "_PyObject_CallFunction", referenced from:
> PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
> PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "_PyString_AsString", referenced from:
> PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "_PyString_FromStringAndSize", referenced from:
> PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "_PyString_Size", referenced from:
> PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "faiss::FaissException::FaissException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, int)", referenced from:
> PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
> PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "faiss::IOReader::fileno()", referenced from:
> vtable for PyCallbackIOReader in python_callbacks.cpp.o
> "faiss::IOWriter::fileno()", referenced from:
> vtable for PyCallbackIOWriter in python_callbacks.cpp.o
> "typeinfo for faiss::FaissException", referenced from:
> PyCallbackIOWriter::operator()(void const*, unsigned long, unsigned long) in python_callbacks.cpp.o
> PyCallbackIOReader::operator()(void*, unsigned long, unsigned long) in python_callbacks.cpp.o
> "typeinfo for faiss::IOReader", referenced from:
> typeinfo for PyCallbackIOReader in python_callbacks.cpp.o
> "typeinfo for faiss::IOWriter", referenced from:
> typeinfo for PyCallbackIOWriter in python_callbacks.cpp.o
> "vtable for faiss::FaissException", referenced from:
> faiss::FaissException::~FaissException() in python_callbacks.cpp.o
> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
> "vtable for faiss::IOReader", referenced from:
> faiss::IOReader::IOReader() in python_callbacks.cpp.o
> faiss::IOReader::~IOReader() in python_callbacks.cpp.o
> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
> "vtable for faiss::IOWriter", referenced from:
> faiss::IOWriter::IOWriter() in python_callbacks.cpp.o
> faiss::IOWriter::~IOWriter() in python_callbacks.cpp.o
> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[2]: *** [faiss/python/libfaiss_python_callbacks.dylib] Error 1
> make[1]: *** [faiss/python/CMakeFiles/faiss_python_callbacks.dir/all] Error 2
> make: *** [all] Error 2
>
> Maybe this is why it didn't install the header files....By any chance you
> know the reason?...
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#7 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFB5PWNXY7VKUHVKNB62LUDTTKDXFANCNFSM464RNCOQ>
> .
>
|
Oh, it works! But I can not find the Currently
|
Is it in |
No, I can only find |
Do you have |
Yes, I tried again, my commands are:
But still no |
Oh I think MacOS uses .dylib instead of .so. It should work with the dylib. |
Yes, but when I run
And |
The error indicates that it can't find libfaiss_c, not libfaiss. Also |
I had same issue you need just copy libfaiss_c.dylib to /usr/local/lib. After that everything worked fine. In total on MacOs I made this steps: |
ive tried to install go-faiss using instructions above , despite I've got the same error. Adding PS After i have another one error, solved by PSS in the begging I have to switch 1.7.2 -> 1.7.3 |
You are a lifesaver lol |
Hi,
I am trying to run the example, but when I run
go get github.com/DataIntelligenceCrew/go-faiss
it shows:I use local Mac env, and I have copy libfaiss_c.so to
/usr/local/lib/
By any chance you know the reason? Thanks!
Just tried again, the error becomes:
The text was updated successfully, but these errors were encountered: