abetlen / abetlen/llama-cpp-python

using `cmake .. -DBUILD_SHARED_LIBS=ON` failed

Aperta
#1,321 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
question
Lingua principale
Python
Stelle
10.6k
Fork
1.4k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.