Skip to content

Compile bug: FAILED: examples/llava/CMakeFiles/llava.dir/llava.cpp.obj #12899

Closed
@gercamjr

Description

@gercamjr

Git commit

578754b

Operating systems

Windows

GGML backends

Vulkan

Problem description & steps to reproduce

I'm trying to compile llama.cpp with Vulkan support in Windows 11.

First Bad Commit

578754b (tag:b5117)

I last compiled it successfully at this revision: 6bf28f0 (tag: b5058)

Compile command

cmake -S . -B build -G Ninja -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=ON -DLLAMA_BUILD_SERVER=ON -DGGML_CCACHE=OFF (successful)

cmake --build build --config Release -j 12 (fails)

Relevant log output

[3/61] Building CXX object examples/llava/CMakeFiles/llava.dir/llava.cpp.obj
FAILED: examples/llava/CMakeFiles/llava.dir/llava.cpp.obj
C:\msys64\ucrt64\bin\c++.exe -DGGML_USE_CPU -DGGML_USE_VULKAN -D_CRT_SECURE_NO_WARNINGS -IC:/Users/gera/localLlama/llama.cpp/examples -IC:/Users/gera/localLlama/llama.cpp/examples/llava/. -IC:/Users/gera/localLlama/llama.cpp/examples/llava/../.. -IC:/Users/gera/localLlama/llama.cpp/examples/llava/../../common -IC:/Users/gera/localLlama/llama.cpp/ggml/src/../include -IC:/Users/gera/localLlama/llama.cpp/src/. -IC:/Users/gera/localLlama/llama.cpp/src/../include -O3 -DNDEBUG -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-array-bounds -Wextra-semi -Wno-cast-qual -MD -MT examples/llava/CMakeFiles/llava.dir/llava.cpp.obj -MF examples\llava\CMakeFiles\llava.dir\llava.cpp.obj.d -o examples/llava/CMakeFiles/llava.dir/llava.cpp.obj -c C:/Users/gera/localLlama/llama.cpp/examples/llava/llava.cpp
In file included from C:/Users/gera/localLlama/llama.cpp/include/llama.h:4,
                 from C:/Users/gera/localLlama/llama.cpp/examples/llava/llava.cpp:4:
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:320:10: error: multiple definition of 'enum ggml_status'
  320 |     enum ggml_status {
      |          ^~~~~~~~~~~
In file included from C:/Users/gera/localLlama/llama.cpp/examples/llava/clip.h:4,
                 from C:/Users/gera/localLlama/llama.cpp/examples/llava/llava.cpp:1:
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:320:10: note: previous definition here
  320 |     enum ggml_status {
      |          ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:339:39: error: conflicting declaration 'typedef struct ggml_bf16_t ggml_bf16_t'
  339 |     typedef struct { uint16_t bits; } ggml_bf16_t;
      |                                       ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:339:39: note: previous declaration as 'typedef struct ggml_bf16_t ggml_bf16_t'
  339 |     typedef struct { uint16_t bits; } ggml_bf16_t;
      |                                       ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:351:10: error: multiple definition of 'enum ggml_type'
  351 |     enum ggml_type {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:351:10: note: previous definition here
  351 |     enum ggml_type {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:395:10: error: multiple definition of 'enum ggml_prec'
  395 |     enum ggml_prec {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:395:10: note: previous definition here
  395 |     enum ggml_prec {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:401:10: error: multiple definition of 'enum ggml_ftype'
  401 |     enum ggml_ftype {
      |          ^~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:401:10: note: previous definition here
  401 |     enum ggml_ftype {
      |          ^~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:429:10: error: multiple definition of 'enum ggml_op'
  429 |     enum ggml_op {
      |          ^~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:429:10: note: previous definition here
  429 |     enum ggml_op {
      |          ^~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:528:10: error: multiple definition of 'enum ggml_unary_op'
  528 |     enum ggml_unary_op {
      |          ^~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:523:10: note: previous definition here
  523 |     enum ggml_unary_op {
      |          ^~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:547:10: error: multiple definition of 'enum ggml_object_type'
  547 |     enum ggml_object_type {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:542:10: note: previous definition here
  542 |     enum ggml_object_type {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:553:10: error: multiple definition of 'enum ggml_log_level'
  553 |     enum ggml_log_level {
      |          ^~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:548:10: note: previous definition here
  548 |     enum ggml_log_level {
      |          ^~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:563:10: error: multiple definition of 'enum ggml_tensor_flag'
  563 |     enum ggml_tensor_flag {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:558:10: note: previous definition here
  558 |     enum ggml_tensor_flag {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:570:12: error: redefinition of 'struct ggml_init_params'
  570 |     struct ggml_init_params {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:565:12: note: previous definition of 'struct ggml_init_params'
  565 |     struct ggml_init_params {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:578:12: error: redefinition of 'struct ggml_tensor'
  578 |     struct ggml_tensor {
      |            ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:573:12: note: previous definition of 'struct ggml_tensor'
  573 |     struct ggml_tensor {
      |            ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:612:25: error: redefinition of 'const size_t GGML_TENSOR_SIZE'
  612 |     static const size_t GGML_TENSOR_SIZE = sizeof(struct ggml_tensor);
      |                         ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:607:25: note: 'const size_t GGML_TENSOR_SIZE' previously defined here
  607 |     static const size_t GGML_TENSOR_SIZE = sizeof(struct ggml_tensor);
      |                         ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1686:10: error: multiple definition of 'enum ggml_op_pool'
 1686 |     enum ggml_op_pool {
      |          ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1681:10: note: previous definition here
 1681 |     enum ggml_op_pool {
      |          ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1728:35: error: conflicting declaration of C function 'ggml_tensor* ggml_upscale(ggml_context*, ggml_tensor*, int)'
 1728 |     GGML_API struct ggml_tensor * ggml_upscale(
      |                                   ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1727:35: note: previous declaration 'ggml_tensor* ggml_upscale(ggml_context*, ggml_tensor*, int, ggml_scale_mode)'
 1727 |     GGML_API struct ggml_tensor * ggml_upscale(
      |                                   ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1736:35: error: conflicting declaration of C function 'ggml_tensor* ggml_upscale_ext(ggml_context*, ggml_tensor*, int, int, int, int)'
 1736 |     GGML_API struct ggml_tensor * ggml_upscale_ext(
      |                                   ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1735:35: note: previous declaration 'ggml_tensor* ggml_upscale_ext(ggml_context*, ggml_tensor*, int, int, int, int, ggml_scale_mode)'
 1735 |     GGML_API struct ggml_tensor * ggml_upscale_ext(
      |                                   ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1770:10: error: multiple definition of 'enum ggml_sort_order'
 1770 |     enum ggml_sort_order {
      |          ^~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1770:10: note: previous definition here
 1770 |     enum ggml_sort_order {
      |          ^~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2176:12: error: redefinition of 'struct ggml_type_traits'
 2176 |     struct ggml_type_traits {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2123:12: note: previous definition of 'struct ggml_type_traits'
 2123 |     struct ggml_type_traits {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2193:10: error: multiple definition of 'enum ggml_sched_priority'
 2193 |     enum ggml_sched_priority {
      |          ^~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2140:10: note: previous definition here
 2140 |     enum ggml_sched_priority {
      |          ^~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2202:12: error: redefinition of 'struct ggml_threadpool_params'
 2202 |     struct ggml_threadpool_params {
      |            ^~~~~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2149:12: note: previous definition of 'struct ggml_threadpool_params'
 2149 |     struct ggml_threadpool_params {
      |            ^~~~~~~~~~~~~~~~~~~~~~
[7/61] Building CXX object examples/llava/CMakeFiles/mtmd.dir/mtmd.cpp.obj
FAILED: examples/llava/CMakeFiles/mtmd.dir/mtmd.cpp.obj
C:\msys64\ucrt64\bin\c++.exe -DGGML_USE_CPU -DGGML_USE_VULKAN -D_CRT_SECURE_NO_WARNINGS -IC:/Users/gera/localLlama/llama.cpp/examples -IC:/Users/gera/localLlama/llama.cpp/examples/llava/. -IC:/Users/gera/localLlama/llama.cpp/examples/llava/../.. -IC:/Users/gera/localLlama/llama.cpp/examples/llava/../../common -IC:/Users/gera/localLlama/llama.cpp/ggml/src/../include -IC:/Users/gera/localLlama/llama.cpp/src/. -IC:/Users/gera/localLlama/llama.cpp/src/../include -O3 -DNDEBUG -Wmissing-declarations -Wmissing-noreturn -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-array-bounds -Wextra-semi -Wno-cast-qual -MD -MT examples/llava/CMakeFiles/mtmd.dir/mtmd.cpp.obj -MF examples\llava\CMakeFiles\mtmd.dir\mtmd.cpp.obj.d -o examples/llava/CMakeFiles/mtmd.dir/mtmd.cpp.obj -c C:/Users/gera/localLlama/llama.cpp/examples/llava/mtmd.cpp
In file included from C:/Users/gera/localLlama/llama.cpp/include/llama.h:4,
                 from C:/Users/gera/localLlama/llama.cpp/examples/llava/mtmd.h:5,
                 from C:/Users/gera/localLlama/llama.cpp/examples/llava/mtmd.cpp:3:
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:320:10: error: multiple definition of 'enum ggml_status'
  320 |     enum ggml_status {
      |          ^~~~~~~~~~~
In file included from C:/Users/gera/localLlama/llama.cpp/examples/llava/clip.h:4,
                 from C:/Users/gera/localLlama/llama.cpp/examples/llava/mtmd.cpp:1:
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:320:10: note: previous definition here
  320 |     enum ggml_status {
      |          ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:339:39: error: conflicting declaration 'typedef struct ggml_bf16_t ggml_bf16_t'
  339 |     typedef struct { uint16_t bits; } ggml_bf16_t;
      |                                       ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:339:39: note: previous declaration as 'typedef struct ggml_bf16_t ggml_bf16_t'
  339 |     typedef struct { uint16_t bits; } ggml_bf16_t;
      |                                       ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:351:10: error: multiple definition of 'enum ggml_type'
  351 |     enum ggml_type {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:351:10: note: previous definition here
  351 |     enum ggml_type {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:395:10: error: multiple definition of 'enum ggml_prec'
  395 |     enum ggml_prec {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:395:10: note: previous definition here
  395 |     enum ggml_prec {
      |          ^~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:401:10: error: multiple definition of 'enum ggml_ftype'
  401 |     enum ggml_ftype {
      |          ^~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:401:10: note: previous definition here
  401 |     enum ggml_ftype {
      |          ^~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:429:10: error: multiple definition of 'enum ggml_op'
  429 |     enum ggml_op {
      |          ^~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:429:10: note: previous definition here
  429 |     enum ggml_op {
      |          ^~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:528:10: error: multiple definition of 'enum ggml_unary_op'
  528 |     enum ggml_unary_op {
      |          ^~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:523:10: note: previous definition here
  523 |     enum ggml_unary_op {
      |          ^~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:547:10: error: multiple definition of 'enum ggml_object_type'
  547 |     enum ggml_object_type {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:542:10: note: previous definition here
  542 |     enum ggml_object_type {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:553:10: error: multiple definition of 'enum ggml_log_level'
  553 |     enum ggml_log_level {
      |          ^~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:548:10: note: previous definition here
  548 |     enum ggml_log_level {
      |          ^~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:563:10: error: multiple definition of 'enum ggml_tensor_flag'
  563 |     enum ggml_tensor_flag {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:558:10: note: previous definition here
  558 |     enum ggml_tensor_flag {
      |          ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:570:12: error: redefinition of 'struct ggml_init_params'
  570 |     struct ggml_init_params {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:565:12: note: previous definition of 'struct ggml_init_params'
  565 |     struct ggml_init_params {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:578:12: error: redefinition of 'struct ggml_tensor'
  578 |     struct ggml_tensor {
      |            ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:573:12: note: previous definition of 'struct ggml_tensor'
  573 |     struct ggml_tensor {
      |            ^~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:612:25: error: redefinition of 'const size_t GGML_TENSOR_SIZE'
  612 |     static const size_t GGML_TENSOR_SIZE = sizeof(struct ggml_tensor);
      |                         ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:607:25: note: 'const size_t GGML_TENSOR_SIZE' previously defined here
  607 |     static const size_t GGML_TENSOR_SIZE = sizeof(struct ggml_tensor);
      |                         ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1686:10: error: multiple definition of 'enum ggml_op_pool'
 1686 |     enum ggml_op_pool {
      |          ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1681:10: note: previous definition here
 1681 |     enum ggml_op_pool {
      |          ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1728:35: error: conflicting declaration of C function 'ggml_tensor* ggml_upscale(ggml_context*, ggml_tensor*, int)'
 1728 |     GGML_API struct ggml_tensor * ggml_upscale(
      |                                   ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1727:35: note: previous declaration 'ggml_tensor* ggml_upscale(ggml_context*, ggml_tensor*, int, ggml_scale_mode)'
 1727 |     GGML_API struct ggml_tensor * ggml_upscale(
      |                                   ^~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1736:35: error: conflicting declaration of C function 'ggml_tensor* ggml_upscale_ext(ggml_context*, ggml_tensor*, int, int, int, int)'
 1736 |     GGML_API struct ggml_tensor * ggml_upscale_ext(
      |                                   ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1735:35: note: previous declaration 'ggml_tensor* ggml_upscale_ext(ggml_context*, ggml_tensor*, int, int, int, int, ggml_scale_mode)'
 1735 |     GGML_API struct ggml_tensor * ggml_upscale_ext(
      |                                   ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:1770:10: error: multiple definition of 'enum ggml_sort_order'
 1770 |     enum ggml_sort_order {
      |          ^~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:1770:10: note: previous definition here
 1770 |     enum ggml_sort_order {
      |          ^~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2176:12: error: redefinition of 'struct ggml_type_traits'
 2176 |     struct ggml_type_traits {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2123:12: note: previous definition of 'struct ggml_type_traits'
 2123 |     struct ggml_type_traits {
      |            ^~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2193:10: error: multiple definition of 'enum ggml_sched_priority'
 2193 |     enum ggml_sched_priority {
      |          ^~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2140:10: note: previous definition here
 2140 |     enum ggml_sched_priority {
      |          ^~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/include/ggml.h:2202:12: error: redefinition of 'struct ggml_threadpool_params'
 2202 |     struct ggml_threadpool_params {
      |            ^~~~~~~~~~~~~~~~~~~~~~
C:/Users/gera/localLlama/llama.cpp/ggml/include/ggml.h:2149:12: note: previous definition of 'struct ggml_threadpool_params'
 2149 |     struct ggml_threadpool_params {
      |            ^~~~~~~~~~~~~~~~~~~~~~
[14/61] Building CXX object examples/llava/CMakeFiles/mtmd.dir/clip.cpp.obj
ninja: build stopped: subcommand failed.

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