Skip to content

Compile bug: ngram-mod.h:17:34: error: ‘size_t’ has not been declared #19215

@ali0une

Description

@ali0une

Git commit

git rev-parse HEAD
971facc

i guess it's related to #19164

Adding #include <cstddef> to llama.cpp/common/ngram-mod.h solve issue.

Operating systems

Linux

GGML backends

CUDA

Problem description & steps to reproduce

Hi there.

Latest build fails on my Debian 12 box with CUDA :

log.txt

First Bad Commit

971facc

Compile command

cmake -B . --fresh -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="86" # -DGGML_CUDA_FA_ALL_QUANTS=ON
cmake --build . --config Release -j$(nproc) --clean-first

Relevant log output

/whatever/llama.cpp/common/ngram-mod.h:17:34: error: ‘size_t’ has not been declared
...
/whatever/llama.cpp/common/ngram-mod.h:5:1: note: ‘size_t’ is defined in header ‘<cstddef>; did you forget to ‘#include <cstddef>’?
    4 | #include <vector>
  +++ |+#include <cstddef>

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