Skip to content

Commit

Permalink
Merge pull request #11 from makosten/revise_dylib_references
Browse files Browse the repository at this point in the history
Revise libfaiss reference in libfaiss_c to not use rpath
  • Loading branch information
andyalm authored Nov 8, 2024
2 parents eb8598c + eecf459 commit 3c9a572
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
Binary file modified FaissMask/runtimes/osx-arm64/native/libfaiss.dylib
Binary file not shown.
Binary file modified FaissMask/runtimes/osx-arm64/native/libfaiss_c.dylib
Binary file not shown.
3 changes: 2 additions & 1 deletion build-faiss-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ cd libfaiss-src
cmake -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DOpenMP_libomp_LIBRARY="/opt/homebrew/opt/libomp/lib/libomp.dylib" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /opt/homebrew/opt/libomp/lib/libomp.dylib -I /opt/homebrew/opt/libomp/include" -DOpenMP_CXX_LIB_NAMES="libomp" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON -B build .
make -C build -j faiss
sudo make -C build install
install_name_tool -rpath "${PWD}"/build/faiss @loader_path ./build/c_api/libfaiss_c.dylib
install_name_tool -delete_rpath "${PWD}"/build/faiss ./build/c_api/libfaiss_c.dylib
install_name_tool -change @rpath/libfaiss.dylib @loader_path/libfaiss.dylib ./build/c_api/libfaiss_c.dylib

arch=arm64
if [[ $(uname -m) == 'x86_64' ]]; then
Expand Down

0 comments on commit 3c9a572

Please sign in to comment.