abetlen / abetlen/llama-cpp-python

using `cmake .. -DBUILD_SHARED_LIBS=ON` failed

Đang mở
#1,321 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
Python
Star
10.6k
Fork
1.4k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

```bash
# Build llama.cpp standalone
git clone https://github.com/ggerganov/llama.cpp
mkdir llama.cpp
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON
cmake --build . --config Release

# Export path
export LLAMA_CPP_LIB=/path/to/shared/library

# Install llama-cpp-python with LLAMA_BUILD_OFF
CMAKE_ARGS="LLAMA_BUILD=OFF" pip install llama-cpp-python
```
_Originally posted by @abetlen in https://github.com/abetlen/llama-cpp-python/issues/1070#issuecomment-1881737418_

When I want to use an local existed [PR](https://github.com/jart/llama.cpp/tree/sgemm) from llama.cpp to install llama-cpp-python, it faid at build stage. When I use `cmake .. -DBUILD_SHARED_LIBS=ON`to compile, the following error occurs. What is the reason?In addition, what path should the Export path point to? Thank you~~
```/usr/bin/ld: CMakeFiles/test-tokenizer-1-llama.dir/test-tokenizer-1-llama.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.17'
/usr/bin/ld: /lib/aarch64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [tests/CMakeFiles/test-tokenizer-1-llama.dir/build.make:117: bin/test-tokenizer-1-llama] Error 1
make[1]: *** [CMakeFiles/Makefile2:1912: tests/CMakeFiles/test-tokenizer-1-llama.dir/all] Error 2```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.