Search Issue Tracker
Duplicate
Votes
0
Found in
5.4.0b5
Issue ID
767783
Regression
Yes
[WebGL] build errors with benchmark project
-e: see title, it is the unity benchmark project, works well in 5.3.2
-repro:
--1) get project from ono (/test-data/unity_bench2)
--2) open in 5.4.0beta
--3) try building for WebGL
--NOTICE it fails with errors
Failed running D:\Unity Installs\5.4.0b4\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --copy-level=None --output-format=Compact --compile-cpp --platform="WebGL" --architecture="EmscriptenJavaScript" --configuration="Release" --outputpath="D:/Mercurial/test-data/unity_bench2/Assets /../Temp/StagingArea/Data\Native\UserAssembly.bc" --cachedirectory="D:/Mercurial/test-data/unity_bench2/Assets/../Library/il2cpp_cache" --compiler-flags="-Oz -DIL2CPP_EXCEPTION_DISABLED=1 " --linker-flags="-Oz -s NO_EXIT_RUNTIME=1" --additional-include-directories="D:/Mercurial/test-data/unity_bench2/Assets/../Temp/StagingArea/Data\Native\UserAssembly.bc" --extra-types.file="D:\Unity Installs\5.4.0b4\Editor\Data\il2cpp\il2cpp_default_extra_types.txt" --assembly="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" --assembly="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll" --assembly="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" --assembly="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Managed\UnityEngine.dll" --generatedcppdir="D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput"
stdout:
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: WARNING root: -I or -L of an absolute path "-ID:\Unity Installs\5.4.0b4\Editor\Data\il2cpp\libil2cpp" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp:814:34: error: non-constant-expression cannot be narrowed from type 'uintptr_t' (aka 'unsigned int') to 'il2cpp_array_size_t' (aka 'int') in initializer list [-Wc++11-narrowing]
il2cpp_array_size_t L_10[] = { (((uintptr_t)L_8)), ((int32_t)16) };
^~~~~~~~~~~~~~~~~~
D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp:814:34: note: insert an explicit cast to silence this issue
il2cpp_array_size_t L_10[] = { (((uintptr_t)L_8)), ((int32_t)16) };
^~~~~~~~~~~~~~~~~~
static_cast<il2cpp_array_size_t>( )
1 error generated.
ERROR root: compiler frontend failed to generate LLVM bitcode, halting
Invocation was: Executable: "D:\Unity Installs\5.4.0b4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: "D:\Unity Installs\5.4.0b4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -std=c++11 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -I"D:\Unity Installs\5.4.0b4\Editor\Data\il2cpp\libil2cpp" -I"D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput" -I"D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Native\UserAssembly.bc" "D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp" -o "D:\Mercurial\test-data\unity_bench2\Library\il2cpp_cache\objectfiles\AA0CA371DEEB205B58BB1792BE8BEFCA.o"
at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile)
at Unity.IL2CPP.Building.CppProgramBuilder.Build()
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: WARNING root: -I or -L of an absolute path "-ID:\Unity Installs\5.4.0b4\Editor\Data\il2cpp\libil2cpp" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass '-Wno-warn-absolute-paths' to emcc to hide this warning.
D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp:814:34: error: non-constant-expression cannot be narrowed from type 'uintptr_t' (aka 'unsigned int') to 'il2cpp_array_size_t' (aka 'int') in initializer list [-Wc++11-narrowing]
il2cpp_array_size_t L_10[] = { (((uintptr_t)L_8)), ((int32_t)16) };
^~~~~~~~~~~~~~~~~~
D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp:814:34: note: insert an explicit cast to silence this issue
il2cpp_array_size_t L_10[] = { (((uintptr_t)L_8)), ((int32_t)16) };
^~~~~~~~~~~~~~~~~~
static_cast<il2cpp_array_size_t>( )
1 error generated.
ERROR root: compiler frontend failed to generate LLVM bitcode, halting
Invocation was: Executable: "D:\Unity Installs\5.4.0b4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: "D:\Unity Installs\5.4.0b4\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -std=c++11 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -I"D:\Unity Installs\5.4.0b4\Editor\Data\il2cpp\libil2cpp" -I"D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput" -I"D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\Native\UserAssembly.bc" "D:\Mercurial\test-data\unity_bench2\Temp\StagingArea\Data\il2cppOutput\Bulk_Assembly-CSharp_0.cpp" -o "D:\Mercurial\test-data\unity_bench2\Library\il2cpp_cache\objectfiles\AA0CA371DEEB205B58BB1792BE8BEFCA.o"
at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile)
at Unity.IL2CPP.Building.CppProgramBuilder.Build()
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:98)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:351)
UnityEditorInternal.IL2CPPBuilder:Run() (at
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
This is a duplicate of issue #767744