microsoft / microsoft/BitNet

setup_env.py on MacBook M2 failed

Open
#611 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.