-
Got error when build llama.cpp on Macbook m1pro (MacOS15.0 beta2):code in terminal:git clone https://github.com/ggerganov/llama.cpp the output after make:dexter@192 /users/dexter/miniforge3/envs/llama.cpp % make c++ -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -pthread -Wunreachable-code-break -Wunreachable-code-return -Wmissing-prototypes -Wextra-semi -Iggml/include -Iggml/src -Iinclude -Isrc -Icommon -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE -DNDEBUG -DGGML_USE_ACCELERATE -DGGML_USE_BLAS -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64 -DGGML_USE_LLAMAFILE -DGGML_USE_METAL -DGGML_METAL_EMBED_LIBRARY -c ggml/src/ggml-blas.cpp -o ggml/src/ggml-blas.o the 2 solutions I have tried but failedI search my computer and find the file "future" in "/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1"
I'm not familiar with c++ enough, is there anybody can help me fix the error? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
perhaps try the following?
|
Beta Was this translation helpful? Give feedback.
-
Error fixed! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Same error, I fixed it by re-installing CommandLineTools: sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install It might be because I upgraded CommandLineTools from version 15.0 to 16.0, which caused the error. |
Beta Was this translation helpful? Give feedback.
Error fixed!
We should save the path of c++ library in environment variable:
export CXXFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1
Or use another way:
Change a variable in the file "Makefile" of llama.cpp:
add -I/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1 behind
MK_CPPFLAGS = -Iggml/include -Iggml/src -Iinclude -Isrc -Icommon