I got some error, while using “make apk” instruction.
How can I fix it?
thanks a lot.
(deepspeech-venv) wmlab@wmlab-317server:~/deepvoice/DeepSpeech/native_client/java$ make apk
./gradlew clean
Configure project :libdeepspeech
arm64-v8a armeabi-v7a x86_64
Task :libdeepspeech:externalNativeBuildCleanDebug
Clean deepspeech-jni armeabi-v7a,deepspeech-lib armeabi-v7a
Cleaning… 0 files.
Clean deepspeech-lib arm64-v8a,deepspeech-jni arm64-v8a
Cleaning… 0 files.
Clean deepspeech-jni x86_64,deepspeech-lib x86_64
Cleaning… 0 files.
BUILD SUCCESSFUL in 0s
5 actionable tasks: 2 executed, 3 up-to-date
rm -rf *.java jni/deepspeech_wrap.cpp
swig -c++ -java -package org.mozilla.deepspeech.libdeepspeech -outdir libdeepspeech/src/main/java/org/mozilla/deepspeech/libdeepspeech/ -o jni/deepspeech_wrap.cpp jni/deepspeech.i
./gradlew build
Configure project :libdeepspeech
arm64-v8a armeabi-v7a x86_64
Task :libdeepspeech:externalNativeBuildDebug FAILED
Build deepspeech-jni x86_64
[1/2] Building CXX object CMakeFiles/deepspeech-jni.dir/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp.o
[2/2] Linking CXX shared library …/…/…/…/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech-jni.so
FAILED: : && /home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android21 --gcc-toolchain=/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,–noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,–exclude-libs,libgcc.a -Wl,–exclude-libs,libatomic.a -static-libstdc++ -Wl,–build-id -Wl,–warn-shared-textrel -Wl,–fatal-warnings -Wl,–no-undefined -Qunused-arguments -Wl,-z,noexecstack -shared -Wl,-soname,libdeepspeech-jni.so -o …/…/…/…/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech-jni.so CMakeFiles/deepspeech-jni.dir/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp.o …/…/…/…/libs/x86_64/libdeepspeech.so /home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/liblog.so -latomic -lm && cd /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/.externalNativeBuild/cmake/debug/x86_64 && /home/wmlab/Android/Sdk/cmake/3.6.4111459/bin/cmake -E copy /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/libs/x86_64/libdeepspeech.so /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech.so
/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/…/…/…/…/x86_64-linux-android/bin/ld: error: …/…/…/…/libs/x86_64/libdeepspeech.so: incompatible target
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:919: error: undefined reference to ‘DS_FreeMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1517: error: undefined reference to ‘DS_CreateModel’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1531: error: undefined reference to ‘DS_DestroyModel’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1565: error: undefined reference to ‘DS_EnableDecoderWithLM’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1589: error: undefined reference to ‘DS_SpeechToText’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1593: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1613: error: undefined reference to ‘DS_SpeechToTextWithMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1633: error: undefined reference to ‘DS_SetupStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1650: error: undefined reference to ‘DS_FeedAudioContent’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1664: error: undefined reference to ‘DS_IntermediateDecode’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1666: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1679: error: undefined reference to ‘DS_FinishStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1681: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1694: error: undefined reference to ‘DS_FinishStreamWithMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1706: error: undefined reference to ‘DS_DiscardStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1717: error: undefined reference to ‘DS_FreeMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1731: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1739: error: undefined reference to ‘DS_PrintVersions’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:libdeepspeech:externalNativeBuildDebug’.
Build command failed.
Error while executing process /home/wmlab/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {–build /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/.externalNativeBuild/cmake/debug/x86_64 --target deepspeech-jni}
[1/2] Building CXX object CMakeFiles/deepspeech-jni.dir/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp.o
[2/2] Linking CXX shared library …/…/…/…/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech-jni.so
FAILED: : && /home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android21 --gcc-toolchain=/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,–noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -Wl,–exclude-libs,libgcc.a -Wl,–exclude-libs,libatomic.a -static-libstdc++ -Wl,–build-id -Wl,–warn-shared-textrel -Wl,–fatal-warnings -Wl,–no-undefined -Qunused-arguments -Wl,-z,noexecstack -shared -Wl,-soname,libdeepspeech-jni.so -o …/…/…/…/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech-jni.so CMakeFiles/deepspeech-jni.dir/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp.o …/…/…/…/libs/x86_64/libdeepspeech.so /home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/liblog.so -latomic -lm && cd /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/.externalNativeBuild/cmake/debug/x86_64 && /home/wmlab/Android/Sdk/cmake/3.6.4111459/bin/cmake -E copy /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/libs/x86_64/libdeepspeech.so /home/wmlab/deepvoice/DeepSpeech/native_client/java/libdeepspeech/build/intermediates/cmake/debug/obj/x86_64/libdeepspeech.so
/home/wmlab/Android/Sdk/ndk/20.0.5594570/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/…/…/…/…/x86_64-linux-android/bin/ld: error: …/…/…/…/libs/x86_64/libdeepspeech.so: incompatible target
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:919: error: undefined reference to ‘DS_FreeMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1517: error: undefined reference to ‘DS_CreateModel’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1531: error: undefined reference to ‘DS_DestroyModel’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1565: error: undefined reference to ‘DS_EnableDecoderWithLM’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1589: error: undefined reference to ‘DS_SpeechToText’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1593: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1613: error: undefined reference to ‘DS_SpeechToTextWithMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1633: error: undefined reference to ‘DS_SetupStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1650: error: undefined reference to ‘DS_FeedAudioContent’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1664: error: undefined reference to ‘DS_IntermediateDecode’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1666: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1679: error: undefined reference to ‘DS_FinishStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1681: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1694: error: undefined reference to ‘DS_FinishStreamWithMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1706: error: undefined reference to ‘DS_DiscardStream’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1717: error: undefined reference to ‘DS_FreeMetadata’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1731: error: undefined reference to ‘DS_FreeString’
/home/wmlab/deepvoice/DeepSpeech/native_client/java/jni/deepspeech_wrap.cpp:1739: error: undefined reference to ‘DS_PrintVersions’
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 2s
38 actionable tasks: 35 executed, 3 up-to-date
Makefile:23: recipe for target ‘apk’ failed
make: *** [apk] Error 1