Fix wrong path to libllama.so

This commit is contained in:
Oracle 2026-06-02 17:17:49 +02:00
parent 815c9aadec
commit fde48d10db
Signed by: Oracle
SSH key fingerprint: SHA256:x4/RtnjUyuHkdvmwNDsWSfcfF1V5PNr3OpriZqOvCX8

View file

@ -76,7 +76,7 @@ if [ "$BUILD_CHOICE" = "1" ]; then
LLAMA_CPP_PATH=$(pwd)
cd ..
else
read -p "Enter absolute path to existing llama.cpp build: " LLAMA_CPP_PATH
read -p "Enter path to existing llama.cpp build: " LLAMA_CPP_PATH
# Validate path
if [ ! -d "$LLAMA_CPP_PATH" ]; then
@ -88,8 +88,8 @@ else
LLAMA_CPP_PATH=$(realpath "$LLAMA_CPP_PATH")
# Check for shared library
if [ ! -f "$LLAMA_CPP_PATH/build/libllama.so" ] && [ ! -f "$LLAMA_CPP_PATH/libllama.so" ]; then
echo "Error: Could not find libllama.so in $LLAMA_CPP_PATH"
if [ ! -f "$LLAMA_CPP_PATH/build/bin/libllama.so" ]; then
echo "Error: Could not find libllama.so at $LLAMA_CPP_PATH/build/bin/libllama.so"
echo "Make sure llama.cpp was built with -DBUILD_SHARED_LIBS=ON"
exit 1
fi
@ -100,10 +100,8 @@ else
fi
# Find the shared library
if [ -f "$LLAMA_CPP_PATH/build/libllama.so" ]; then
LLAMA_CPP_LIB="$LLAMA_CPP_PATH/build/libllama.so"
elif [ -f "$LLAMA_CPP_PATH/libllama.so" ]; then
LLAMA_CPP_LIB="$LLAMA_CPP_PATH/libllama.so"
if [ -f "$LLAMA_CPP_PATH/build/bin/libllama.so" ]; then
LLAMA_CPP_LIB="$LLAMA_CPP_PATH/build/bin/libllama.so"
else
echo "Error: Could not locate libllama.so"
exit 1