• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by matt_wills8 · Feb 28, 2020 at 12:34 PM · webglil2cppcircle

Error building WebGL project in CI

Hey guys, I've been banging my head on the table over this one for a couple of days now... if you have any suggestions at all I'd really appreciate it.

Some key points:

I have a WebGL project that I'm trying to build remotely in Circle CI using this docker image https://hub.docker.com/r/gableroux/unity3d/.

I'm using a jslib with using System.Runtime.InteropServices; and [DllImport("__Internal")] (not sure if related).

The project builds fine locally, both via the unity editor and via the CLI, but fails when building in the docker image in CI.

The docker container has 4GB of RAM.

License activation is working fine, and the build is running but throwing an error.

Build appears to run smoothly until the il2cpp post processing part.

Then i see (trying to not spam you with a massive error message so I've cut some bits out where ** is):

Failed running /opt/Unity/Editor/Data/il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WebGL" --architecture="EmscriptenJavaScript" --configuration="Release" --outputpath="/root/workspace/Assets /../Temp/StagingArea/Data/Native/build.bc" --cachedirectory="/root/workspace/Assets/../Library/il2cpp_cache" --compiler-flags="-Oz -DIL2CPP_EXCEPTION_DISABLED=1 " --emit-method-map [--additional-libraries= ... (lots of additional libraries, lmk if they might be relevant) ] --profiler-report --map-file-parser="/opt/Unity/Editor/Data/Tools/MapFileParser/MapFileParser" --directory="/root/workspace/Temp/StagingArea/Data/Managed" --generatedcppdir="/root/workspace/Temp/StagingArea/Data/il2cppOutput"

il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: (that same command above again)

Traceback (most recent call last): File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py", line 3063, in sys.exit(run()) File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc.py", line 1607, in run shared.Building.link(linker_inputs, specified_target) File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 2114, in link output = run_process([LLVM_LINK] + link_args + ['-o', target], stdout=PIPE).stdout File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 167, in run_process return run_base(cmd, universal_newlines=universal_newlines, check=check, args, *kw) File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 162, in run_base result.check_returncode() File "/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/tools/shared.py", line 148, in check_returncode raise Py2CalledProcessError(returncode=self.returncode, cmd=self.args, output=self.stdout, stderr=self.stderr) tools.shared.Py2CalledProcessError: Command '['/opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten_FastComp_Linux/llvm-link', '@/tmp/tmpCPp3vB.response', '-o', '/root/workspace/Library/il2cpp_cache/linkresult_D6CF06372CB752494F520E4794944216/build.bc']' returned non-zero exit status -9

at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles (System.Collections.Generic.HashSet`1[T] objectFiles, Unity.IL2CPP.Building.ToolChains.CppToolChainContext toolChainContext) [0x001fb] in :0 at Unity.IL2CPP.Building.CppProgramBuilder.Build (Unity.IL2CPP.Building.Statistics.IBuildStatistics& statistics) [0x00275] in :0 at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner (Unity.IL2CPP.Building.CppProgramBuilder builder, Unity.IL2CPP.Building.Statistics.IBuildStatistics& statistics) [0x00001] in :0 at il2cpp.Program.DoRun (System.String[] args, System.Collections.Generic.List`1[T] foundAssemblies) [0x005b5] in :0 at il2cpp.Program.Run (System.String[] args, System.Boolean setInvariantCulture) [0x00042] in :0 at il2cpp.Program.Main (System.String[] args) [0x00002] in :0

Exception: /opt/Unity/Editor/Data/il2cpp/build/deploy/net471/il2cpp.exe did not run properly! at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00120] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128 at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00060] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71 at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) [0x00086] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:519 at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) [0x002e8] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:500 at UnityEditorInternal.IL2CPPBuilder.Run () [0x000ce] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:337 at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001c] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:72 at UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) [0x000d3] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:387 at UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x002ad] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:929 at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in /home/builduser/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27 at 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) [0x000dc] in /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:340 UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean) UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline.bindings.cs:376) UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline.bindings.cs:275) UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at /home/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline.bindings.cs:258) BuildCommand:PerformBuild() (at Assets/Scripts/Editor/BuildCommand.cs:159)


I skipped out some parts of the error logs that looked repetitive but lmk if you need to see them and i can send them over.

Thanks so much for any guidance you can offer.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dairebyrne · Jul 22, 2020 at 03:45 PM 0
Share

Also getting this error, a vanilla webgl project builds fine but a real project fails with the above exception.

@ matt_wills8 did you find a solution for this? $$anonymous$$emory issue?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

202 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error building WebGL in Unity 5.5 2 Answers

Failed to Build for WebGL.I am using unity 5.6.1f1. 0 Answers

Unity hangs when compiling the game on WebGL 1 Answer

build with IL2CPP error 0 Answers

Building to WebGL failing, failed running il2cpp.exe 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges