[Feature Request]: Make Infinity work under Mac
Is there an existing issue for the same feature request?
- [X] I have checked the existing issues.
Is your feature request related to a problem?
No response
Describe the feature you'd like
Both Intel and ARM would be supported under Mac OS
Describe implementation you've considered
No response
Documentation, adoption, use case
No response
Additional information
No response
Build source from Mac
# Make sure clang-18 is installed
brew install llvm
# .bash_profile
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export CPPFLAGS = "-I/usr/local/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/include"
export LDFLAGS = "-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib -L/usr//local/Cellar/llvm/18.1.8/lib -lunwind -L/usr/local/lib"
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/llvm/lib/c++:/usr/local/opt/llvm/lib:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:/usr/local/lib:/usr//local/Cellar/gcc/14.1.0_2/lib/gcc/14"
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include:/usr/local//Cellar/boost/1.86.0/include"
export DYLD_LIBRARY_PATH="/usr/local/opt/llvm/lib:$DYLD_LIBRARY_PATH"
Help wanted. We need Mac apple sillicon to verify infinity
Can the code on the main branch be compiled on the Mac Apple Silicon platform?
Can the code on the main branch be compiled on the Mac Apple Silicon platform?
We do not have such a mackbook, so we could not tell the answer right now ...
The code won't compile on my mac with m1 pro since the cpu does not support FMA and AVX instructions even with Rosetta on.
To support AArch CPU, we have to implement vector distance computation functions with neon instructions of AArch64 in the directory of src/common/simd .
Help wanted. We need Mac apple sillicon to verify infinity
By fixing the CMakeLists.txt and some header files, I was able to successfully compile the project on my M1 Mac (Apple OS). The unit tests passed, and ran a partial pytest.
After running all the tests, I can create a PR if needed.
Help wanted. We need Mac apple sillicon to verify infinity
By fixing the CMakeLists.txt and some header files, I was able to successfully compile the project on my M1 Mac (Apple OS). The unit tests passed, and ran a partial pytest.
After running all the tests, I can create a PR if needed.
@ballontt
I've made infinity worked under Linux/aarch64, could you please verify it could work under Mac M1 ?
export LDFLAGS = "-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib -L/usr//local/Cellar/llvm/18.1.8/lib -lunwind -L/usr/local/lib"
export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/opt/homebrew/include"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -L/opt/homebrew/opt/llvm/lib/unwind -lunwind"
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/opt/llvm/lib/c++:/opt/homebrew/opt/llvm/lib:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:/opt/homebrew/lib:/opt/homebrew/Cellar/gcc/14.2.0_1/lib/gcc/14"
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/homebrew/include:/opt/homebrew/Cellar/boost/1.87.0/include"
export DYLD_LIBRARY_PATH="/opt/homebrew/opt/llvm/lib:$DYLD_LIBRARY_PATH"
git clone https://github.com/infiniflow/infinity.git
git config --global --add safe.directory infinity
mkdir cmake-build-debug && cd cmake-build-debug
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON ..
cmake --build . -t infinity
but occur error final line: ninja: build stopped: subcommand failed.
Hi, Infinity can not be compiled after v0.3,which is caused by Jemalloc dependencies. We do not have time to work on this issue right now, any contributions are welcome 😆