1

i was trying to complie whisper.cpp on a aarch64 machine, after runinng "cmake -B build",i got the following info, how to fix these errors? Looking for pthread.h
Looking for pthread.h - found
Performing Test CMAKE_HAVE_LIBC_PTHREAD
Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
Check if compiler accepts -pthread
Check if compiler accepts -pthread - yes
Found Threads: TRUE
ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
CMAKE_SYSTEM_PROCESSOR: aarch64
Including CPU backend
Found OpenMP_C: -fopenmp (found version "4.5")
Found OpenMP_CXX: -fopenmp (found version "4.5")
Found OpenMP: TRUE (found version "4.5")
ARM detected
Performing Test GGML_COMPILER_SUPPORTS_FP16_FORMAT_I3E
Performing Test GGML_COMPILER_SUPPORTS_FP16_FORMAT_I3E - Failed
ARM -mcpu not found, -mcpu=native will be used
Performing Test GGML_MACHINE_SUPPORTS_dotprod
Performing Test GGML_MACHINE_SUPPORTS_dotprod - Failed
Performing Test GGML_MACHINE_SUPPORTS_nodotprod
Performing Test GGML_MACHINE_SUPPORTS_nodotprod - Failed
Performing Test GGML_MACHINE_SUPPORTS_i8mm
Performing Test GGML_MACHINE_SUPPORTS_i8mm - Failed
Performing Test GGML_MACHINE_SUPPORTS_noi8mm
Performing Test GGML_MACHINE_SUPPORTS_noi8mm - Failed
Performing Test GGML_MACHINE_SUPPORTS_sve
Performing Test GGML_MACHINE_SUPPORTS_sve - Failed
Performing Test GGML_MACHINE_SUPPORTS_nosve
Performing Test GGML_MACHINE_SUPPORTS_nosve - Failed
Performing Test GGML_MACHINE_SUPPORTS_sme
Performing Test GGML_MACHINE_SUPPORTS_sme - Failed
Performing Test GGML_MACHINE_SUPPORTS_nosme
Performing Test GGML_MACHINE_SUPPORTS_nosme - Failed
ARM feature FMA enabled
Adding CPU backend variant ggml-cpu: -mcpu=native
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Configuring done

the following is the compiling error:

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In >function‘ggml_vec_dot_q3_K_q8_K’: /root/whisper.cpp->master/ggml/src/ggml-cpu/ggml-cpu-quants.c:5763:43: warning: implicit >declaration of function ‘vld1q_s8_x4’; did you mean ‘vld1q_s8_x2’? [->Wimplicit-function-declaration]

const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:5763:43:error: invalid initializer
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:5764:43:error: invalid initializer

const ggml_int8x16x4_t q8bytes_2 = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In >function‘ggml_vec_dot_q5_K_q8_K’: /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:7658:41:error: invalid initializer

const ggml_int8x16x4_t q8bytes = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In >function‘ggml_vec_dot_q6_K_q8_K’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:8614:35:warning: implicit declaration of function >‘vld1q_u8_x4’; did you mean ‘vld1q_u8_x2’? [-Wimplicit-function->declaration]

ggml_uint8x16x4_t q6bits = ggml_vld1q_u8_x4(q6);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:8614:35:error: invalid initializer /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:8615:35:error: invalid initializer

ggml_int8x16x4_t q8bytes = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:8640:21:error: incompatible types when assigning to type >‘int8x16x4_t’ {aka‘struct int8x16x4_t’} from type ‘int’

q8bytes = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In >function‘ggml_vec_dot_iq2_xxs_q8_K’: /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:9536:17: >error: incompatible types when assigning to type ‘int8x16x4_t’ {aka >‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In >function ‘ggml_vec_dot_iq2_xs_q8_K’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:9907:17:error: incompatible types when assigning to type‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq2_s_q8_K’: /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:10493:17:error: incompatible types when assigning to type‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq3_xxs_q8_K’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:10959:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq3_s_q8_K’: /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:11309:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq1_s_q8_K’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu->quants.c:11832:17:error: incompatible types when assigning to type‘int8x16x4_t’ {aka ‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq1_m_q8_K’: /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:12189:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c: In function ‘ggml_vec_dot_iq4_xs_q8_K’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu-quants.c:12698:17: error: incompatible types when assigning to type ‘int8x16x4_t’ {aka‘struct int8x16x4_t’} from type ‘int’

q8b = ggml_vld1q_s8_x4(q8);

ggml/src/CMakeFiles/ggml-cpu.dir/build.make:131: recipe for target 'ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-quants.c.o' failed make[2]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-
quants.c.o] Error 1 make[2]: *** Waiting for unfinished jobs ....
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu.c: In function‘ggml_init_arm_arch_features’:
/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu.c:695:50: error:‘HWCAP_ASIMD’ undeclared (first use in this function)

ggml_arm_arch_features.has_neon  = !!(hwcap & HWCAP_ASIMD);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu.c:695:50: note: each undeclared identifier is reported only once for each function it appears in /root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu.c:696:53: error:‘HWCAP_ASIMDDP’ undeclared (first use in this function)

ggml_arm_arch_features.has_dotprod = !!(hwcap & HWCAP_ASIMDDP);

/root/whisper.cpp-master/ggml/src/ggml-cpu/ggml-cpu.c:698:49: error:

‘HWCAP_SVE’ undeclared (first use in this function)

ggml_arm_arch_features.has_sve = !!(hwcap & HWCAP_SVE);

ggml/src/CMakeFiles/ggml-cpu.dir/build.make:75: recipe for target
'ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o' failed
make[2]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o] Error 1 CMakeFiles/Makefile2:1087: recipe for target 'ggml/src/CMakeFiles/ggml-cpu.dir/all' failed make[1]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/all] Error 2 Makefile:145: recipe for target 'all' failed make: *** [all] Error 2

9
  • I don't see any major errors. The git errors seem non-critical since it says "Configuring done". Is that all of the output? Commented Apr 15 at 3:38
  • Ah, did you try cd build; make? You only ran cmake, which creates the build scripts but doesn't do the actual build. Commented Apr 15 at 3:39
  • @nneonneo while compiling, i got the following errors: ggml-cpu-quants.c: In function ‘ggml_vec_dot_q3_K_q8_K’: ggml-cpu-quants.c:5763:43: warning: implicit declaration of function ‘vld1q_s8_x4’; did you mean ‘vld1q_s8_x2’? [-Wimplicit-function-declaration] const ggml_int8x16x4_t q8bytes_1 = ggml_vld1q_s8_x4(q8); q8 += 64; ^~~~~~~~~~~ vld1q_s8_x2 ggml-cpu/ggml-cpu-quants.c:5763:43: error: invalid initializer Commented Apr 15 at 3:57
  • Please add that to the question - it's unreadable in a comment. It may be the case that it's a bug in the code under certain compilers, in which case it would probably warrant a bug report to the developer. Commented Apr 15 at 4:03
  • i have added the compiling error@ nneonneo Commented Apr 15 at 5:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.