abetlen / abetlen/llama-cpp-python

using `cmake .. -DBUILD_SHARED_LIBS=ON` failed

オープン
#1,321 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
question
主要言語
Python
スター
10.6k
フォーク
1.4k
PR マージ指標
PR 指標を取得中

説明

```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```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。