Menu

Creating Pocketsphinx aar in Android Studio on Windows

Help
2018-11-28
2018-11-29
  • Fabian Krippner

    Fabian Krippner - 2018-11-28

    Hi can someone please point me to a proper explanation on how to create the file in pocketsphinx-android under Windows?
    So far my attempts to find proper help here were not entirely successful. If there were at least pointers to what exactly I can read up on in order to understand the problem, of course some kind of proper walk-through would be divine...
    And no, using linux is sadly not an option since this is not my computer.

    Nor were the output logs helpful enough to identify the source of the problem.
    So far I created environment variables "SPINXBASE_HOME" ( no this is not a typo )and "POCKETSPHINX_HOME" as those are the used path-vars for pocketsphinx and sphinxbase in the CMake file and build gradle.
    Though one problem already associated therewith are the slashes. In this output example I already changed the slashes to forward slashes.
    If I instead change those to 2 backward slashes and rename spinx to sphinx in both files the CMake build error is:
    -- Configuring incomplete, errors occurred!

    I changed it back so the problem persists that the linker can't be determined and the file build/generated-src/cpp/pocketsphinx_wrap.c
    doesn't get generated.

    My only idea so far is that I'm either grandly missing something completely else or it's something about the paths....

    Proper Help would be very much appreciated!

    Build command failed.
    Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\debug\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
    -- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
    -- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    -- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
    -- Configuring done
    CMake Error at CMakeLists.txt:106 (add_library):
    build/generated-src/cpp/pocketsphinx_wrap.c
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
    CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
    -- Generating done
    -- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/debug/armeabi-v7a
    Build command failed.
    Error while executing process E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Fabian\github\pocketsphinx-android -BE:\Fabian\github\pocketsphinx-android.externalNativeBuild\cmake\release\armeabi-v7a -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi-v7a -DANDROID_NDK=E:\Fabian\Android\SDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Fabian\github\pocketsphinx-android\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=E:\Fabian\Android\SDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=E:\Fabian\Android\SDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-14}
    -- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
    -- Check for working C compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    -- Check for working CXX compiler: E:/Fabian/Android/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found SWIG: E:/Fabian/swigwin-3.0.12/swig.exe (found version "3.0.12")
    -- Configuring done
    CMake Error at CMakeLists.txt:106 (add_library):
    build/generated-src/cpp/pocketsphinx_wrap.c
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
    CMake Error: CMake can not determine linker language for target: pocketsphinx_jni
    -- Generating done
    -- Build files have been written to: E:/Fabian/github/pocketsphinx-android/.externalNativeBuild/cmake/release/armeabi-v7a

     

    Last edit: Fabian Krippner 2018-11-28
  • Fabian Krippner

    Fabian Krippner - 2018-11-29

    Update:
    I tried the whole shebam under ubuntu linux at a friend's computer, exactly the same errors.
    We even tried hardcoding the paths to sphinxbase/pocketsphinx in gradle/cmake instead of using system vars, no chance.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.