knowhere icon indicating copy to clipboard operation
knowhere copied to clipboard

How to build knowhere on macOS and arm64?

Open xiaofan-luan opened this issue 2 years ago • 7 comments

conan install failed at error:

clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
Linking CXX executable cmTC_a0230
/usr/local/Cellar/cmake/3.26.4/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a0230.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/c++ -m64 -stdlib=libstdc++  -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -m64  CMakeFiles/cmTC_a0230.dir/testCXXCompiler.cxx.o -o cmTC_a0230
clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_a0230] Error 1
make: *** [cmTC_a0230/fast] Error

xiaofan-luan avatar Jul 02 '23 05:07 xiaofan-luan

/assign @cydrain

liliu-z avatar Jul 03 '23 05:07 liliu-z

Hi @jiaoew1991, can you help check this build error ?

I run your command

conan install .. --build=missing -o with_ut=True -s build_type=Release"
conan build ..

see following error: 截屏2023-07-03 16 03 23

cydrain avatar Jul 03 '23 08:07 cydrain

/assign @Presburger is looking at this

liliu-z avatar Jul 11 '23 09:07 liliu-z

@liliu-z: GitHub didn't allow me to assign the following users: is, looking, at, this.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to this:

/assign @Presburger is looking at this

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

sre-ci-robot avatar Jul 11 '23 09:07 sre-ci-robot

x86 mac can build pass with following commands:

export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libc++ -s build_type=Release
conan build ..

cydrain avatar Jul 12 '23 07:07 cydrain

by the way

brew install libomp

presburger avatar Jul 13 '23 11:07 presburger

https://github.com/milvus-io/knowhere/pull/986

liliu-z avatar Jul 13 '23 13:07 liliu-z