How to build knowhere on macOS and arm64?
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
/assign @cydrain
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:
/assign @Presburger is looking at this
@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.
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 ..
by the way
brew install libomp
https://github.com/milvus-io/knowhere/pull/986