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

Got an error when build in Android #2647

Open
alen252 opened this issue Dec 20, 2024 · 1 comment
Open

Got an error when build in Android #2647

alen252 opened this issue Dec 20, 2024 · 1 comment

Comments

@alen252
Copy link

alen252 commented Dec 20, 2024

D:\Code\whisper.cpp-master\examples\whisper.android.java\app\src\main\jni\whisper\CMakeLists.txt : C/C++ debug|arm64-v8a : CMake Error at D:\Code\whisper.cpp-master\examples\whisper.android.java\app\src\main\jni\whisper\CMakeLists.txt:21 (add_library):
Cannot find source file:

D:/Code/whisper.cpp-master/ggml/src/ggml-aarch64.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
Call Stack (most recent call first):
CMakeLists.txt:47 (build_library)

@ggerganov
Copy link
Owner

Can you check if this patch fixes it:

diff --git a/examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt b/examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt
index 9100725..03b986f 100644
--- a/examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt
+++ b/examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt
@@ -7,10 +7,17 @@ set(WHISPER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../../../../../../)
 
 set(SOURCE_FILES
     ${WHISPER_LIB_DIR}/ggml/src/ggml.c
-    ${WHISPER_LIB_DIR}/ggml/src/ggml-aarch64.c
     ${WHISPER_LIB_DIR}/ggml/src/ggml-alloc.c
     ${WHISPER_LIB_DIR}/ggml/src/ggml-backend.cpp
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-backend-reg.cpp
     ${WHISPER_LIB_DIR}/ggml/src/ggml-quants.c
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-threading.cpp
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu.c
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu.cpp
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu-hbm.cpp
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu-quants.c
+    ${WHISPER_LIB_DIR}/ggml/src/ggml-cpu/ggml-cpu-traits.cpp
     ${WHISPER_LIB_DIR}/src/whisper.cpp
     ${CMAKE_SOURCE_DIR}/jni.c
     )

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