Skip to content

Doesn't compile due to missing headers for memcpy and assert #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rabidcopy opened this issue Mar 22, 2023 · 1 comment
Closed

Doesn't compile due to missing headers for memcpy and assert #381

rabidcopy opened this issue Mar 22, 2023 · 1 comment

Comments

@rabidcopy
Copy link
Contributor

As of the refactor f5a77a6 the program does not compile.

g++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread -c llama.cpp -o llama.o
llama.cpp: In function ‘bool llama_eval_internal(llama_context&, const llama_token*, int, int, int)’:
llama.cpp:657:5: error: ‘memcpy’ was not declared in this scope
  657 |     memcpy(embd->data, tokens, N*ggml_element_size(embd));
      |     ^~~~~~
llama.cpp:12:1: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   11 | #include <cassert>
  +++ |+#include <cstring>
   12 | 
make: *** [Makefile:224: llama.o] Error 1

Adding these to llama.cpp allows it to compile.

#include <cassert>
#include <cstring>
@sw
Copy link
Contributor

sw commented Mar 22, 2023

Fixed by #386

@sw sw closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants