Skip to content

Compile bug: llama-server-cuda docker image build failure #13166

Closed
@mmjaz

Description

@mmjaz

Git commit

5f5e39e

Operating systems

Linux

GGML backends

CUDA

Problem description & steps to reproduce

I have problem build docker image for cuda
also it seems this problem exists in ci:
https://github.com/ggml-org/llama.cpp/actions/runs/14700154234/job/41248132714

First Bad Commit

No response

Compile command

RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \
    export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \
    fi && \
    cmake -B build -DGGML_NATIVE=OFF -DGGML_CCACHE=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \
    cmake --build build --config Release -j$(nproc)

Relevant log output

649.3 [ 81%] Linking CXX executable ../bin/test-quantize-stats
649.4 /usr/bin/ld: CMakeFiles/test-quantize-stats.dir/test-quantize-stats.cpp.o: in function `test_roundtrip_on_chunk(ggml_tensor const*, long, long, ggml_type_traits const&, ggml_type_traits_cpu const&, bool, float*, char*, float*, error_stats&)':
649.4 test-quantize-stats.cpp:(.text+0x5b): undefined reference to `ggml_get_f32_1d'
649.4 /usr/bin/ld: CMakeFiles/test-quantize-stats.dir/test-quantize-stats.cpp.o: in function `main':
649.4 test-quantize-stats.cpp:(.text.startup+0x5ca): undefined reference to `ggml_get_type_traits_cpu'
649.4 collect2: error: ld returned 1 exit status
649.4 gmake[2]: *** [tests/CMakeFiles/test-quantize-stats.dir/build.make:102: bin/test-quantize-stats] Error 1
649.4 gmake[1]: *** [CMakeFiles/Makefile2:2404: tests/CMakeFiles/test-quantize-stats.dir/all] Error 2
649.4 gmake[1]: *** Waiting for unfinished jobs....
649.4 [ 82%] Building CXX object tests/CMakeFiles/test-backend-ops.dir/get-model.cpp.o
649.5 [ 82%] Building CXX object tests/CMakeFiles/test-gguf.dir/get-model.cpp.o
649.5 [ 82%] Linking CXX executable ../bin/test-arg-parser
649.7 [ 82%] Built target test-arg-parser
649.8 [ 82%] Linking CXX executable ../bin/test-chat-template
650.0 [ 82%] Built target test-chat-template
650.2 [ 82%] Linking CXX executable ../bin/test-gguf
650.3 [ 82%] Built target test-gguf
650.4 [ 82%] Linking CXX executable ../bin/test-grammar-integration
650.5 [ 82%] Built target test-grammar-integration
651.9 [ 82%] Linking CXX executable ../bin/test-json-schema-to-grammar
652.0 [ 82%] Built target test-json-schema-to-grammar
654.5 [ 82%] Linking CXX executable ../bin/test-chat
654.6 [ 82%] Built target test-chat
657.4 [ 82%] Linking CXX executable ../bin/test-backend-ops
657.5 [ 82%] Built target test-backend-ops
657.5 gmake: *** [Makefile:146: all] Error 2
------
cuda.Dockerfile:21
--------------------
  20 |     
  21 | >>> RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \
  22 | >>>     export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \
  23 | >>>     fi && \
  24 | >>>     cmake -B build -DGGML_NATIVE=OFF -DGGML_CCACHE=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \
  25 | >>>     cmake --build build --config Release -j$(nproc)
  26 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c if [ \"${CUDA_DOCKER_ARCH}\" != \"default\" ]; then     export CMAKE_ARGS=\"-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}\";     fi &&     cmake -B build -DGGML_NATIVE=OFF -DGGML_CCACHE=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . &&     cmake --build build --config Release -j$(nproc)" did not complete successfully: exit code: 2

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