Skip to content

Cant compile for an arm  #495

Closed
@ghost

Description

Consolidate compiler generated dependencies of target utils
[ 8%] Building CXX object CMakeFiles/utils.dir/utils.cpp.o
clang++: error: the clang compiler does not support '-mcpu=native'
make[2]: *** [CMakeFiles/utils.dir/build.make:76: CMakeFiles/utils.dir/utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/utils.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

if i will intentionally delete all -mcpu=native flags, then

[ 8%] Built target utils
Consolidate compiler generated dependencies of target ggml
[ 8%] Built target ggml
[ 8%] Building CXX object CMakeFiles/llama.dir/llama.cpp.o
/home/gh228df/llama.cpp/llama.cpp:1447:33: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
finp.read ((char *) word.data(), len);
^
/home/gh228df/llama.cpp/llama.cpp:1448:33: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual]
fout.write((char *) word.data(), len);
^
2 warnings generated.
[ 8%] Linking CXX static library libllama.a
[ 8%] Built target llama
[ 8%] Building CXX object CMakeFiles/main.dir/main.cpp.o
/home/gh228df/llama.cpp/main.cpp:356:20: warning: unused variable 'embeddings' [-Wunused-variable]
const auto embeddings = llama_get_embeddings(ctx);
^
/home/gh228df/llama.cpp/main.cpp:481:28: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
printf(buffer.c_str());
^~~~~~~~~~~~~~
/home/gh228df/llama.cpp/main.cpp:481:28: note: treat the string as an argument to avoid this
printf(buffer.c_str());
^
"%s",
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/main.dir/build.make:76: CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildCompilation issueshardwareHardware related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions