[Android] KKSpeechRecognizer plugin fail during 64bits Unity build

Welcome! Forums Unity Plugins Mobile Speech Recognizer [Android] KKSpeechRecognizer plugin fail during 64bits Unity build

This topic contains 4 replies, has 2 voices, and was last updated by  MickyMike 4 hours, 48 minutes ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1570

    MickyMike
    Participant

    Hello,

    I trying build a 64bits apk for the google play store. But I suspect the Unity KKSpeechRecognizer plugin to fail during the Unity build…

    Here is what my build settings looks like :
    Build settings

    It looks like Unity try to compile iOS plugins instead of the android one.
    And here is the stack trace during Unity build :

    Lmk how we can resolve this together.

    Best,

    Mike

    
    
    Failed running /Applications/Unity/Hub/Editor/2019.1.2f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="/Users/pop/App/my_awesome_app/Temp/StagingArea/assets/bin/Data/Native/arm64-v8a/libil2cpp.so" --cachedirectory="/Users/pop/App/my_awesome_app/Assets/../Library/il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.1.2f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.1.2f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Users/pop/Library/Android/android-ndk-r16b" --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.1.2f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/pop/App/my_awesome_app/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput" 
    
    stdout:
    Building libil2cpp.so with AndroidToolChain
    	Output directory: /Users/pop/App/my_awesome_app/Temp/StagingArea/assets/bin/Data/Native/arm64-v8a
    	Cache directory: /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache
    ObjectFiles: 406 of which compiled: 406
    	Time Compile: 195344 milliseconds Il2CppTypeDefinitions.c
    	Time Compile: 76662 milliseconds Il2CppMetadataUsage.c
    	Time Compile: 60189 milliseconds Il2CppAttributes.cpp
    	Time Compile: 31641 milliseconds Il2CppInvokerTable.cpp
    	Time Compile: 20247 milliseconds Assembly-CSharp_CodeGen.c
    	Time Compile: 13651 milliseconds Unity.TextMeshPro3.cpp
    	Time Compile: 13304 milliseconds Il2CppGenericMethodPointerTable.cpp
    	Time Compile: 11677 milliseconds Assembly-CSharp15.cpp
    	Time Compile: 11654 milliseconds Unity.TextMeshPro2.cpp
    	Time Compile: 10887 milliseconds System3.cpp
    Total compilation time: 198256 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /Users/pop/Library/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/bc/pnsc8z5s59g6hws5w6rx3lg00000gn/T/tmpLnIjPx.tmp" -o "/Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/linkresult_2D19BB99845F7F382E4E01F3424F63BE/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Users/pop/Library/Android/android-ndk-r16b/platforms/android-21/arch-arm64" -gcc-toolchain "/Users/pop/Library/Android/android-ndk-r16b/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64" -target aarch64-none-linux-android -Wl,--wrap,sigaction -L "/Users/pop/Library/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a" -lgnustl_static -llog -rdynamic -fuse-ld=bfd
    
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__SetDetectionLanguage_mDAB86392AEB27231D1363C22BE106B3561993566':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19595: undefined reference to '_SetDetectionLanguage'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__SupportedLanguages_m8B5E6D95BA045FEA59C67E9D8CDCE44EBEC49623':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19611: undefined reference to '_SupportedLanguages'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__RequestAccess_m031721BED50C963A2555DD079EC091881CAC5852':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19632: undefined reference to '_RequestAccess'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__IsRecording_m4857DF144B13F80A24363C51CD64A0FEE0A6C1D2':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19644: undefined reference to '_IsRecording'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__EngineExists_m1EBA9EBA4AEDE083DE91AD2CB208F8F3F534112D':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19657: undefined reference to '_EngineExists'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__AuthorizationStatus_m710170A5623D3535D3B1589454E7923EC243B47E':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19670: undefined reference to '_AuthorizationStatus'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__StopIfRecording_m0DAB665C6DEBC6919BAEEBB5B0004A1A95AC0C33':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19683: undefined reference to '_StopIfRecording'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__StartRecording_m5566C17ACFFE6E45BFD64B2598B9732B941059C4':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19695: undefined reference to '_StartRecording'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/CAC4F5DE06786540134FDE4EE438B6F9.o: In function 'iOSSpeechRecognizer__SupportedLanguages_m8B5E6D95BA045FEA59C67E9D8CDCE44EBEC49623':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp80.cpp:19611: undefined reference to '_SupportedLanguages'
    /Users/pop/App/my_awesome_app/Library/il2cpp_android_arm64-v8a/il2cpp_cache/BE201383E8316F297F0F17BD081D930F.o: In function 'UnityARVideoFormat_EnumerateVideoFormats_mA35382A4D798A5D86D66252230E9D344870125BE':
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp97.cpp:28597: undefined reference to 'EnumerateVideoFormats'
    /Users/pop/App/my_awesome_app/Temp/StagingArea/Il2Cpp/il2cppOutput/Assembly-CSharp97.cpp:28597: undefined reference to 'EnumerateVideoFormats'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    
    • This topic was modified 6 days, 4 hours ago by  MickyMike.
    #1573
    Piotr
    Piotr
    Keymaster

    Hi,
    Are you on latest version?
    All of those functions which it tries to compile are wrapped with #if UNITY_IOS && !UNITY_EDITOR checks so I have no idea why it would not recognize it.

    #1574

    MickyMike
    Participant

    Issue is fixed !
    Some code snippet were missing the #if UNITY_IOS && !UNITY_EDITOR instruction.
    Issue resolved. Thanks for your support 💪

    Mike

    • This reply was modified 9 hours, 30 minutes ago by  MickyMike.
    #1580
    Piotr
    Piotr
    Keymaster

    Do you mean you fixed it by yourself? If so – could you point what was exactly missing?

    #1581

    MickyMike
    Participant

    Yes I fixed it myself. (I’m not sure if it was my mistake or not) Not a big deal problem resolve !

    • This reply was modified 4 hours, 48 minutes ago by  MickyMike.
    • This reply was modified 4 hours, 48 minutes ago by  MickyMike.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.