setup_env.py on MacBook M2 failed
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 40.3k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
When I run setup_env.py, it failed on compiling with CMake and this is the content in logs/compile.log
[ 0%] Linking CXX shared library ../../../../bin/libggml-base.dylib
Undefined symbols for architecture arm64:
"_dequantize_row_i2_s", referenced from:
_type_traits in ggml.c.o
"_quantize_i2_s", referenced from:
_ggml_quantize_chunk in ggml.c.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/libggml-base.0.15.3.dylib] Error 1
make[1]: *** [3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml-base.dir/all] Error 2
make: *** [all] Error 2
my environment:
soc: apple m2
ram: 16gb
cmake --version: 4.4.2
clang -v: 21.0.0 (clang-2100.1.1.101
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with setup_env.py and logs/compile.log, then inspect the CMake target under 3rdparty/llama.cpp/ggml/src that builds libggml-base.dylib. Trace where the missing arm64 symbols are declared and linked, using the reported Apple M2 failure as the reproduction case. Done means setup_env.py completes the CMake build without the undefined-symbol linker error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100