Skip to content

Bug: Build error on Clang #8677

Closed
Closed
@kaetemi

Description

@kaetemi

What happened?

[54/104] Building CXX object src/CMakeFiles/llama.dir/llama.cpp.o
FAILED: src/CMakeFiles/llama.dir/llama.cpp.o
/usr/bin/clang++ -DGGML_USE_CUDA -DLLAMA_BUILD -DLLAMA_SHARED -Dllama_EXPORTS -I/root/llama.cpp/src/. -I/root/llama.cpp/src/../include -I/root/llama.cpp/ggml/src/../include -O2 -O3 -DNDEBUG -fPIC -MD -MT src/CMakeFiles/llama.dir/llama.cpp.o -MF src/CMakeFiles/llama.dir/llama.cpp.o.d -o src/CMakeFiles/llama.dir/llama.cpp.o -c /root/llama.cpp/src/llama.cpp
/root/llama.cpp/src/llama.cpp:2660:11: error: call to implicitly-deleted default constructor of 'struct llama_grammar'
        , grammar()
          ^
/root/llama.cpp/src/./llama-grammar.h:9:32: note: default constructor of 'llama_grammar' is implicitly deleted because field 'rules' of const-qualified type 'const llama_grammar_rules' (aka 'const vector<vector<llama_grammar_element>>') would not be initialized
    const llama_grammar_rules  rules;
                               ^
/root/llama.cpp/src/llama.cpp:14045:38: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
                                f = -fabs(lctx.kv_self.cells[i].pos - pos);
                                     ^
/root/llama.cpp/src/llama.cpp:14045:38: note: use function 'std::abs' instead
                                f = -fabs(lctx.kv_self.cells[i].pos - pos);
                                     ^~~~
                                     std::abs
/root/llama.cpp/src/llama.cpp:14086:42: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value]
                                    f = -fabs(batch.pos[i] - batch.pos[j]);
                                         ^
/root/llama.cpp/src/llama.cpp:14086:42: note: use function 'std::abs' instead
                                    f = -fabs(batch.pos[i] - batch.pos[j]);
                                         ^~~~
                                         std::abs
2 warnings and 1 error generated.

Seems related to #8508

Name and Version

68504f0

What operating system are you seeing the problem on?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-unconfirmedhigh severityUsed to report high severity bugs in llama.cpp (Malfunctioning hinder important workflow)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions