-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Using make to build llama.cpp:common/common.cpp:1108:55: error: expected primary-expression before ')' token 1108 | fprintf(stream, "build_number: %d\n", BUILD_NUMBER); #3673
Comments
When I use cmake: Checking Build System |
There is probably a bug in generation of build-info.h when not building from Git tree. I have to manually edit it after running CMake. |
How to edit build-info.h? |
It's generated in the root of source tree. Open it with a text editor (like WordPad on Windows). Put some number after BUILD_NUMBER. It can be 0 or the number of commits in the branch you are building from. Current master has 1399 commits. |
I find! #define BUILD_NUMBER 1399 #endif // BUILD_INFO_H |
It looks correct. If you still have an error, it must be something else. |
Possible duplicate of #3670 |
@OuXiao514 Have you managed to build it? What was the problem? |
When I editor build-info.h, It is successful to build the project. But it has some warning. such as: |
Then we can indeed consider it a duplicate of #3670. |
D:/LLM/llama.cpp-master $ make
I llama.cpp build info:
I UNAME_S: Windows_NT
I UNAME_P: unknown
I UNAME_M: x86_64
I CFLAGS: -I. -Icommon -D_XOPEN_SOURCE=600 -DNDEBUG -DGGML_USE_K_QUANTS -std=c11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wdouble-promotion -march=native -mtune=native -Xassembler -muse-unaligned-vector-move
I CXXFLAGS: -I. -Icommon -D_XOPEN_SOURCE=600 -DNDEBUG -DGGML_USE_K_QUANTS -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -Xassembler -muse-unaligned-vector-move -Wno-array-bounds -Wno-format-truncation -Wextra-semi -march=native -mtune=native
I NVCCFLAGS: -I. -Icommon -D_XOPEN_SOURCE=600 -DNDEBUG -DGGML_USE_K_QUANTS -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -Xassembler -muse-unaligned-vector-move -Wno-pedantic -Xcompiler "-Wno-array-bounds -Wno-format-truncation -Wextra-semi -march=native -mtune=native "
I LDFLAGS:
I CC: cc (GCC) 13.2.0
I CXX: g++ (GCC) 13.2.0
g++ -I. -Icommon -D_XOPEN_SOURCE=600 -DNDEBUG -DGGML_USE_K_QUANTS -std=c++11 -fPIC -O3 -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wmissing-declarations -Wmissing-noreturn -Xassembler -muse-unaligned-vector-move -Wno-array-bounds -Wno-format-truncation -Wextra-semi -march=native -mtune=native -c common/common.cpp -o common.o
common/common.cpp: In function 'void dump_non_result_info_yaml(FILE*, const gpt_params&, const llama_context*, const std::string&, const std::vector&, const char*)':
common/common.cpp:1108:55: error: expected primary-expression before ')' token
1108 | fprintf(stream, "build_number: %d\n", BUILD_NUMBER);
| ^
make: *** [Makefile:551: common.o] Error 1
The text was updated successfully, but these errors were encountered: