Skip to content
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

Unable to compile go-llama.cpp due to type mismatches #136

Open
Lebed-kun opened this issue Jul 16, 2023 · 0 comments
Open

Unable to compile go-llama.cpp due to type mismatches #136

Lebed-kun opened this issue Jul 16, 2023 · 0 comments

Comments

@Lebed-kun
Copy link

Configuration:

  • OS: Ubuntu 18.04
  • CPU: Core i5-4300M CPU

Steps to reproduce:

cd go-llama.cpp
make libbinding.a

Result:

[  4%] Building C object CMakeFiles/ggml.dir/k_quants.c.o
/usr/bin/cc -DGGML_USE_K_QUANTS -I"/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/." -O3 -DNDEBUG -std=gnu11 -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -mf16c -mfma -mavx -mavx2 -pthread -MD -MT CMakeFiles/ggml.dir/k_quants.c.o -MF CMakeFiles/ggml.dir/k_quants.c.o.d -o CMakeFiles/ggml.dir/k_quants.c.o -c "/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c"
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c: In function ‘ggml_vec_dot_q2_K_q8_K’:
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c:1356:36: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’? [-Wimplicit-function-declaration]
         const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
                                    ^~~~~~~~~~~~~~~~
                                    _mm256_set_epi8
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c:1356:35: warning: missing braces around initializer [-Wmissing-braces]
         const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
                                   ^
                                    {                                                                         }
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c: In function ‘ggml_vec_dot_q3_K_q8_K’:
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c:1864:35: warning: missing braces around initializer [-Wmissing-braces]
         const __m256i scales[2] = {_mm256_set_m128i(l_scales, l_scales), _mm256_set_m128i(h_scales, h_scales)};
                                   ^
                                    {                                                                         }
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c: In function ‘ggml_vec_dot_q4_K_q8_K’:
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c:2480:32: error: incompatible types when initializing type ‘__m256i {aka const __vector(4) long long int}’ using type ‘int’
         const __m256i scales = _mm256_set_m128i(sc128, sc128);
                                ^~~~~~~~~~~~~~~~
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c: In function ‘ggml_vec_dot_q5_K_q8_K’:
/path-to-golang-gpt4all-binding/go-llama.cpp/llama.cpp/k_quants.c:2966:32: error: incompatible types when initializing type ‘__m256i {aka const __vector(4) long long int}’ using type ‘int’
         const __m256i scales = _mm256_set_m128i(sc128, sc128);
                                ^~~~~~~~~~~~~~~~
CMakeFiles/ggml.dir/build.make:89: recipe for target 'CMakeFiles/ggml.dir/k_quants.c.o' failed
make[3]: *** [CMakeFiles/ggml.dir/k_quants.c.o] Error 1
make[3]: Leaving directory '/path-to-golang-gpt4all-binding/go-llama.cpp/build'
CMakeFiles/Makefile2:417: recipe for target 'CMakeFiles/ggml.dir/all' failed
make[2]: *** [CMakeFiles/ggml.dir/all] Error 2
make[2]: Leaving directory '/path-to-golang-gpt4all-binding/go-llama.cpp/build'
Makefile:100: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/path-to-golang-gpt4all-binding/go-llama.cpp/build'
Makefile:180: recipe for target 'llama.cpp/ggml.o' failed
make: *** [llama.cpp/ggml.o] Error 2
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

1 participant