Unable to run setup_env.py
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 40.3k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
I have followed the instruction from https://github.com/microsoft/BitNet?tab=readme-ov-file#build-from-source
but stuck at step to build the project
shell log:
(bitnet-cpp) user@bitnet1:~/BitNet$ python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
INFO:root:Compiling the code using CMake.
ERROR:root:Error occurred while running command: Command '['cmake', '--build', 'build', '--config', 'Release']' returned non-zero exit status 2., check details in logs/compile.log
(bitnet-cpp) user@bitnet1:~/BitNet$ cat logs/compile.log
[ 1%] Building C object 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o
cc: error: unrecognized command-line option ‘-Wunreachable-code-break’; did you mean ‘-Wunreachable-code’?
cc: error: unrecognized command-line option ‘-Wunreachable-code-return’; did you mean ‘-Wunreachable-code’?
gmake[2]: *** [3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/build.make:76: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:759: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
(bitnet-cpp) user@bitnet1:~/BitNet$ cmake --version
cmake version 3.25.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
(bitnet-cpp) user@bitnet1:~/BitNet$ python --version
Python 3.9.22
(bitnet-cpp) user@bitnet1:~/BitNet$ clang --version
Debian clang version 18.1.8 (++20240731024826+3b5b5c1ec4a3-1~exp1~20240731144843.145)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
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 reproduce the build command, then read logs/compile.log alongside the CMake configuration used for the build. Check how the compiler flags are selected for the ggml C object compilation. Done means the documented setup command completes successfully on the reported environment.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100