Skip to content

using cmake .. -DBUILD_SHARED_LIBS=ON failed #1321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LUXUS1 opened this issue Apr 3, 2024 · 0 comments
Open

using cmake .. -DBUILD_SHARED_LIBS=ON failed #1321

LUXUS1 opened this issue Apr 3, 2024 · 0 comments
Labels
question Further information is requested

Comments

@LUXUS1
Copy link

LUXUS1 commented Apr 3, 2024

# 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 #1070 (comment)

When I want to use an local existed PR from llama.cpp to install llama-cpp-python, it faid at build stage. When I use cmake .. -DBUILD_SHARED_LIBS=ONto compile, the following error occurs. What is the reason?In addition, what path should the Export path point to? Thank you~~

/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```
            
@LUXUS1 LUXUS1 changed the title Yup this is possible! using cmake .. -DBUILD_SHARED_LIBS=ON failed Apr 3, 2024
@abetlen abetlen added the question Further information is requested label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants