Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Build Failing for Oculus Quest

Discussion in 'VR' started by JD_FVTC, Dec 20, 2019.

  1. JD_FVTC

    JD_FVTC

    Joined:
    Oct 20, 2017
    Posts:
    54
    I'm getting 4 errors that i don't understand. Any ideas what this means below?

    1:
    Failed running D:\ProgramFiles\2019.2.14f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\UnityProjects\FirewallNewer\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\UnityProjects\FirewallNewer\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="D:/ProgramFiles/2019.2.14f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="D:/ProgramFiles/2019.2.14f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/AndroidSDK/android-ndk-r16b" --profiler-report --map-file-parser=D:/ProgramFiles/2019.2.14f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe --directory=D:/UnityProjects/FirewallNewer/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=D:/UnityProjects/FirewallNewer/Temp/StagingArea/Il2Cpp/il2cppOutput
    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: D:\UnityProjects\FirewallNewer\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: D:\UnityProjects\FirewallNewer\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    ObjectFiles: 216 of which compiled: 0
    Total compilation time: 182 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\AndroidSDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\janik\AppData\Local\Temp\tmpE97F.tmp" -o "D:\UnityProjects\FirewallNewer\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_0E1BEB45211F8B25AEB4031F88514C08\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\AndroidSDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\AndroidSDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\AndroidSDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:25513: error: undefined reference to 'PostRender'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:25513: error: undefined reference to 'PostRender'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27708: error: undefined reference to 'ConfigureToggleVRKeyName'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27729: error: undefined reference to 'InitSharedArray'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27739: error: undefined reference to 'ListenWebVRData'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:29172: error: undefined reference to 'displayElementId'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:
    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\AndroidSDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\janik\AppData\Local\Temp\tmpE97F.tmp" -o "D:\UnityProjects\FirewallNewer\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_0E1BEB45211F8B25AEB4031F88514C08\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\AndroidSDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\AndroidSDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\AndroidSDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:25513: error: undefined reference to 'PostRender'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:25513: error: undefined reference to 'PostRender'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27708: error: undefined reference to 'ConfigureToggleVRKeyName'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27729: error: undefined reference to 'InitSharedArray'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:27739: error: undefined reference to 'ListenWebVRData'
    D:\UnityProjects\FirewallNewer\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp8.cpp:29172: error: undefined reference to 'displayElementId'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    2:
    Exception: D:\ProgramFiles\2019.2.14f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <21da158cd428404389e0b5a08ba9ea0a>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <21da158cd428404389e0b5a08ba9ea0a>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <21da158cd428404389e0b5a08ba9ea0a>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <21da158cd428404389e0b5a08ba9ea0a>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    3:
    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    4:
    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
  2. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    So the second two are really just errors telling you about the problems that exist in the first two.

    I can't tell you exactly what's going on - but it looks like the error is with IL2CPP which is the thing that essentially converts your project's C# code to C++ (that's a shorthand, for a longer explanation of what's going on you can read this https://gamedev.stackexchange.com/q...een-unity-scripting-backend-il2cpp-and-mono2x)

    In order to fix, the first thing I would try is going to your projecct settings -> player -> OTHER and see if the scripting language is set to IL2CPP, if it is, try switching it to MONO. I might be a little off on the exact location of the menu item, since I'm doing that from memory and I've got a compile running so I can't actually check it for you, it's definitely NEAR there though... find the dropdown that gives you a choice between MONO and IL2CPP and change it.

    That won't necessarily guarantee the project compiles, but you might at the very least be able to move on to the next error message.
     
    JD_FVTC likes this.
  3. Chuzihang

    Chuzihang

    Joined:
    Jan 15, 2020
    Posts:
    4
    Similar question. Have you solved it?