Skip to content

Compile bug: libllama-*-impl.so not copied when using cmake --install build --config Release #23494

Closed

Description

@m18coppola

Git commit

bb28c1f (#23462)

Operating systems

Linux

GGML backends

CPU

Problem description & steps to reproduce

$ llama-server
llama-server: error while loading shared libraries: libllama-server-impl.so: cannot open shared object file: No such file or directory
$ llama-cli   
llama-cli: error while loading shared libraries: libllama-cli-impl.so: cannot open shared object file: No such file or directory
$ llama    
llama: error while loading shared libraries: libllama-server-impl.so: cannot open shared object file: No such file or directory

$ find /lib /usr | grep 'libllama'
/usr/local/lib64/libllama.so.0.0.9281
/usr/local/lib64/libllama-common.so
/usr/local/lib64/libllama.so
/usr/local/lib64/libllama-common.so.0.0.9281
/usr/local/lib64/libllama-common.so.0
/usr/local/lib64/libllama.so.0

First Bad Commit

bb28c1f (#23462)

Compile command

cmake -B build -DGGML_LLAMAFILE=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_CURL=ON -DLLAMA_BUILD_EXAMPLES=OFF
cmake --build build --config Release -j 12
sudo cmake --install build --strip --config Release

Relevant log output

$ cmake -B build -DGGML_LLAMAFILE=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_CURL=ON -DLLAMA_BUILD_EXAMPLES=OFF
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.54.0")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- GGML_SYSTEM_ARCH: x86
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native 
-- ggml version: 0.12.0
-- ggml commit:  bb28c1fe2
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.6.2")
-- Performing Test OPENSSL_VERSION_SUPPORTED
-- Performing Test OPENSSL_VERSION_SUPPORTED - Success
-- OpenSSL found: 3.6.2
-- UI: derived HF_UI_VERSION=b9281
-- UI: embedded with source: provisioned
-- Generating embedded license file for target: llama-common
-- Configuring done (2.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/m18coppola/Sources/llama.cpp/build
# compile here...
$ sudo cmake --install build --strip --config Release
-- Installing: /usr/local/lib64/libggml-cpu.so.0.12.0
-- Up-to-date: /usr/local/lib64/libggml-cpu.so.0
-- Set non-toolchain portion of runtime path of "/usr/local/lib64/libggml-cpu.so.0.12.0" to ""
-- Up-to-date: /usr/local/lib64/libggml-cpu.so
-- Installing: /usr/local/lib64/libggml.so.0.12.0
-- Up-to-date: /usr/local/lib64/libggml.so.0
-- Set non-toolchain portion of runtime path of "/usr/local/lib64/libggml.so.0.12.0" to ""
-- Up-to-date: /usr/local/lib64/libggml.so
-- Up-to-date: /usr/local/include/ggml.h
-- Up-to-date: /usr/local/include/ggml-cpu.h
-- Up-to-date: /usr/local/include/ggml-alloc.h
-- Up-to-date: /usr/local/include/ggml-backend.h
-- Up-to-date: /usr/local/include/ggml-blas.h
-- Up-to-date: /usr/local/include/ggml-cann.h
-- Up-to-date: /usr/local/include/ggml-cpp.h
-- Up-to-date: /usr/local/include/ggml-cuda.h
-- Up-to-date: /usr/local/include/ggml-opt.h
-- Up-to-date: /usr/local/include/ggml-metal.h
-- Up-to-date: /usr/local/include/ggml-rpc.h
-- Up-to-date: /usr/local/include/ggml-virtgpu.h
-- Up-to-date: /usr/local/include/ggml-sycl.h
-- Up-to-date: /usr/local/include/ggml-vulkan.h
-- Up-to-date: /usr/local/include/ggml-webgpu.h
-- Up-to-date: /usr/local/include/ggml-zendnn.h
-- Up-to-date: /usr/local/include/ggml-openvino.h
-- Up-to-date: /usr/local/include/gguf.h
-- Installing: /usr/local/lib64/libggml-base.so.0.12.0
-- Up-to-date: /usr/local/lib64/libggml-base.so.0
-- Up-to-date: /usr/local/lib64/libggml-base.so
-- Up-to-date: /usr/local/lib64/cmake/ggml/ggml-config.cmake
-- Up-to-date: /usr/local/lib64/cmake/ggml/ggml-version.cmake
-- Installing: /usr/local/bin/llama-batched-bench
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-batched-bench" to ""
-- Installing: /usr/local/bin/llama-gguf-split
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-gguf-split" to ""
-- Installing: /usr/local/bin/llama-imatrix
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-imatrix" to ""
-- Installing: /usr/local/bin/llama-bench
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-bench" to ""
-- Installing: /usr/local/bin/llama-completion
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-completion" to ""
-- Installing: /usr/local/bin/llama-perplexity
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-perplexity" to ""
-- Installing: /usr/local/bin/llama-quantize
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-quantize" to ""
-- Installing: /usr/local/bin/llama-cli
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-cli" to ""
-- Installing: /usr/local/bin/llama-server
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-server" to ""
-- Installing: /usr/local/bin/llama-tokenize
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-tokenize" to ""
-- Installing: /usr/local/bin/llama-debug-template-parser
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-debug-template-parser" to ""
-- Installing: /usr/local/bin/llama-template-analysis
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-template-analysis" to ""
-- Installing: /usr/local/bin/llama-tts
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-tts" to ""
-- Installing: /usr/local/lib64/libmtmd.so.0.0.9281
-- Up-to-date: /usr/local/lib64/libmtmd.so.0
-- Set non-toolchain portion of runtime path of "/usr/local/lib64/libmtmd.so.0.0.9281" to ""
-- Up-to-date: /usr/local/lib64/libmtmd.so
-- Up-to-date: /usr/local/include/mtmd-debug.h
-- Up-to-date: /usr/local/include/mtmd.h
-- Up-to-date: /usr/local/include/mtmd-helper.h
-- Installing: /usr/local/bin/llama-mtmd-cli
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-mtmd-cli" to ""
-- Installing: /usr/local/bin/llama-cvector-generator
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-cvector-generator" to ""
-- Installing: /usr/local/bin/llama-export-lora
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-export-lora" to ""
-- Installing: /usr/local/bin/llama-fit-params
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-fit-params" to ""
-- Installing: /usr/local/bin/llama-results
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama-results" to ""
-- Installing: /usr/local/bin/llama
-- Set non-toolchain portion of runtime path of "/usr/local/bin/llama" to ""
-- Installing: /usr/local/lib64/libllama.so.0.0.9281
-- Up-to-date: /usr/local/lib64/libllama.so.0
-- Set non-toolchain portion of runtime path of "/usr/local/lib64/libllama.so.0.0.9281" to ""
-- Up-to-date: /usr/local/lib64/libllama.so
-- Up-to-date: /usr/local/include/llama.h
-- Up-to-date: /usr/local/include/llama-cpp.h
-- Installing: /usr/local/lib64/libllama-common.so.0.0.9281
-- Up-to-date: /usr/local/lib64/libllama-common.so.0
-- Set non-toolchain portion of runtime path of "/usr/local/lib64/libllama-common.so.0.0.9281" to ""
-- Up-to-date: /usr/local/lib64/libllama-common.so
-- Up-to-date: /usr/local/lib64/cmake/llama/llama-config.cmake
-- Up-to-date: /usr/local/lib64/cmake/llama/llama-version.cmake
-- Up-to-date: /usr/local/lib64/pkgconfig/llama.pc

Activity

  1. changed the title [-]Compile bug: `libllama-*-impl.so` not copied when using `cmake --install build --config Release` (from #23462)[/-] [+]Compile bug: `libllama-*-impl.so` not copied when using `cmake --install build --config Release`[/+] on May 21, 2026
  2. amezin commented on May 21, 2026

    @amezin

    install() is missing in CMakeLists for all libraries that were STATIC before

  3. SPREEKDOS commented on Aug 1, 2026

    @SPREEKDOS

    This issue is not fixed at least for me.
    I have the same error output as above, but using the CUDA backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions