Skip to content

Issue building the connector on Amazon EC2 instance running Amazon Linux 2 #3034

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

Open
tbolis-at-mulesoft opened this issue Apr 11, 2025 · 1 comment

Comments

@tbolis-at-mulesoft
Copy link

Hi,
I'm trying to build the project on my Amazon EC2 instance running Amazon Linux 2, but I'm getting the following error.

Thank you.

[root@ip-172-31-38-20 whisper.cpp]# cmake -B build

-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /bin/git (found version "2.47.1")
-- 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: x86_64
-- 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")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Configuring done (1.2s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ec2-user/whisper.cpp/build

[root@ip-172-31-38-20 whisper.cpp]# cmake --build build --config Release

[  2%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
[  4%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
[  7%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
[  9%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.o
[ 11%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.o
[ 14%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.o
[ 16%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.o
[ 19%] Linking CXX shared library libggml-base.so
[ 19%] Built target ggml-base
[ 21%] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o
[ 23%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.o
[ 26%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp: In function ‘void ggml_gemm_q4_0_8x8_q8_0(int, float*, size_t, const void*, const void*, int, int)’:
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:105:54: error: ‘_mm256_set_m128i’ was not declared in this scope
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:3183:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:105:54: note: suggested alternative: ‘_mm256_set_epi8’
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:3183:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:105:54: error: ‘_mm256_set_m128i’ was not declared in this scope
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:3377:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:105:54: note: suggested alternative: ‘_mm256_set_epi8’
 #define GGML_F32Cx8x2_LOAD(x, y)     _mm512_cvtph_ps(_mm256_set_m128i(_mm_loadu_si128((const __m128i *)(y)), _mm_loadu_si128((const __m128i *)(x))))
                                                      ^
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:3377:50: note: in expansion of macro ‘GGML_F32Cx8x2_LOAD’
                     const __m512 col_scale_f32 = GGML_F32Cx8x2_LOAD(b_ptr_0[b].d, b_ptr_1[b].d);
                                                  ^~~~~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp: In function ‘void ggml_gemm_q4_K_8x8_q8_K(int, float*, size_t, const void*, const void*, int, int)’:
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:4405:54: error: ‘_mm256_set_m128’ was not declared in this scope
                         const __m256 row_scale_f32 = _mm256_set_m128(row_scale_f32_sse, row_scale_f32_sse);//GGML_F32Cx8_REPEAT_LOAD(a_ptrs[rp][b].d, loadMask);
                                                      ^~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:4405:54: note: suggested alternative: ‘_mm256_set_epi8’
                         const __m256 row_scale_f32 = _mm256_set_m128(row_scale_f32_sse, row_scale_f32_sse);//GGML_F32Cx8_REPEAT_LOAD(a_ptrs[rp][b].d, loadMask);
                                                      ^~~~~~~~~~~~~~~
                                                      _mm256_set_epi8
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:4735:50: error: ‘_mm256_set_m128’ was not declared in this scope
                     const __m256 row_scale_f32 = _mm256_set_m128(row_scale_f32_sse, row_scale_f32_sse); //GGML_F32Cx8_REPEAT_LOAD(a_ptrs[rp][b].d, loadMask);
                                                  ^~~~~~~~~~~~~~~
/home/ec2-user/whisper.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp:4735:50: note: suggested alternative: ‘_mm256_set_epi8’
                     const __m256 row_scale_f32 = _mm256_set_m128(row_scale_f32_sse, row_scale_f32_sse); //GGML_F32Cx8_REPEAT_LOAD(a_ptrs[rp][b].d, loadMask);
                                                  ^~~~~~~~~~~~~~~
                                                  _mm256_set_epi8
gmake[2]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o] Error 1
gmake[1]: *** [ggml/src/CMakeFiles/ggml-cpu.dir/all] Error 2
gmake: *** [all] Error 2
@fujimotos
Copy link
Contributor

fujimotos commented Apr 14, 2025

@tbolis-at-mulesoft The probability is that your gcc/g++ version is too old.

error: ‘_mm256_set_m128i’ was not declared in this scope

This particular instruction _mm256_set_m128 was supported in GCC 8.
See the following ticket for more details:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80582

-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1

As shown in the build log, you are using GCC v7.3.1. I estimate that
you will need to upgrade your base OS to Amazon Linux 2023.

FWIW I could successfully build whisper.cpp on aarch64 AWS in #89 (comment).

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