Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Emscripten/python error, can't compile very simple project.

Discussion in 'WebGL' started by Pajaroide, Mar 28, 2015.

  1. Pajaroide

    Pajaroide

    Joined:
    Sep 19, 2012
    Posts:
    34
    Hello! :) I'm using Unity 5.0.0p3 64bit on Windows 8.1, I have a simple scene with a cube, light and camera. This is the error when compiling. It actually repeats itself several times with slight variations in the local/temp/.tmp file name.

    Then it says Exception: IL2CPP compile failed.
    Followed by: Error building Player: Exception: IL2CPP compile failed.
     
    Last edited: Mar 30, 2015
  2. vedinislamovic

    vedinislamovic

    Joined:
    Apr 5, 2014
    Posts:
    122
    Same here :)
     
  3. gear

    gear

    Joined:
    May 11, 2009
    Posts:
    35
    I was getting same error, then run Unity with Admin permission and it work fine.
     
  4. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    I'm having the same problem . running as admin or installing emscripten or cmake didn't fix it. any other sugestions?
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It might not be the same problem, could post the editor log ?
     
  6. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    There are two errors in the editor console
    the first one is this

    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten/emcc" @"D:/Plannerce/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    warning: unresolved symbol: glCompressedTexSubImage3D
    warning: unresolved symbol: glProgramParameteri
    warning: unresolved symbol: glGetInternalformativ
    warning: unresolved symbol: glFlushMappedBufferRange
    warning: unresolved symbol: _ZN4FMOD13DSPConnection6setMixEf
    warning: unresolved symbol: glUnmapBuffer
    warning: unresolved symbol: glGetStringi
    warning: unresolved symbol: glProgramBinary
    warning: unresolved symbol: glMapBufferRange
    warning: unresolved symbol: pthread_create
    warning: unresolved symbol: glGetProgramBinary
    warning: unresolved symbol: glCopyBufferSubData
    Traceback (most recent call last):
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten/emcc", line 1365, in <module>
    open(final + '.mem.js', 'w').write(src)
    IOError: [Errno 0] Error

    UnityEditor.HostView:OnGUI()

    and the second one is this

    Exception: Failed building WebGL Player.
    UnityEditor.WebGL.ProgramUtils.StartProgramChecked (UnityEditor.Utils.Program p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:32)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:423)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    UnityEditor.HostView:OnGUI()
     
  7. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    The same thing happened last week and I fixed it by migrating to a new project but that took almost a day and I don't want to waste a day every week for the same problem
     
    Last edited: Sep 21, 2016
  8. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    I am able to make development builds with no error only when use pre-build engine is on. otherwise I get another error along with the second error that I posted before
    the error is this

    Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten_Win/python/2.7.5.3_64bit/python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten/emcc" @"D:/Plannerce/Assets/../Temp/emcc_arguments.resp"

    stdout:
    stderr:
    warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 3 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unresolved symbol: glCompressedTexSubImage3D
    warning: unresolved symbol: glProgramParameteri
    warning: unresolved symbol: glGetInternalformativ
    warning: unresolved symbol: _ZN4FMOD13DSPConnection6setMixEf
    warning: unresolved symbol: glUnmapBuffer
    warning: unresolved symbol: glGetStringi
    warning: unresolved symbol: glProgramBinary
    warning: unresolved symbol: glMapBufferRange
    warning: unresolved symbol: pthread_create
    warning: unresolved symbol: glGetProgramBinary
    warning: unresolved symbol: glFlushMappedBufferRange
    warning: unresolved symbol: glCopyBufferSubData
    WARNING root: function requested to be exported, but not implemented: "_SendMessageInt"
    Traceback (most recent call last):
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1064, in <module>
    _main(environ=os.environ)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1054, in _main
    temp_files.run_and_clean(lambda: main(
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 39, in run_and_clean
    return func()
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 1060, in <lambda>
    DEBUG_CACHE=DEBUG_CACHE,
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 961, in main
    temp_files=temp_files, DEBUG=DEBUG, DEBUG_CACHE=DEBUG_CACHE)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 921, in emscript
    outfile.write(funcs_js)
    IOError: [Errno 0] Error
    Traceback (most recent call last):
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport/BuildTools/Emscripten/emcc", line 1294, in <module>
    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
    File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 1535, in emscripten
    assert os.path.exists(filename + '.o.js'), 'Emscripten failed to generate .js'
    AssertionError: Emscripten failed to generate .js

    UnityEditor.HostView:OnGUI()
     
    Last edited: Sep 21, 2016
  9. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I am assuming you have enough free disk space, right ?
     
  10. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    I have 5GB on C and 300MB on D where I save the build is that enough?
     
  11. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Let's find that out, could you try to save it in C: ?
     
  12. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    Nope, The same results with the Development build and the release build.
    The project is also on D could that be the problem?
     
  13. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It could be. Before copying the build to the final output folder, we generate it (along with other temp files) in the Temp folder, inside the project. So, if there is not enough space on D: that might be a problem.
     
  14. ahmadian

    ahmadian

    Joined:
    Nov 24, 2015
    Posts:
    44
    Yeap! that fixed it,I freed some space in D: and it worked. thank you soooooo much :D
    how could you figure out were the problem was?
     
  15. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Just a lucky guess :cool:

    I am glad it's fixed now.