2

Things were working fine in an Emscripten build 1.29.0 but after upgrading to 1.34.1, I get the following error:

1>  Traceback (most recent call last):
1>    File "C:\Program Files\Emscripten\emscripten\1.34.1\\emcc", line 1260, in <module>
1>      shared.Building.llvm_opt(final, link_opts)
1>    File "C:\Program Files\Emscripten\emscripten\1.34.1\tools\shared.py", line 1429, in llvm_opt
1>      assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
1>  AssertionError: Failed to run llvm optimizations: 
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Emscripten\Microsoft.Cpp.Emscripten.Targets(117,5): error MSB6006: "C:\Program Files\Emscripten\emscripten\1.34.1\emcc.bat" exited with code 1.

One cause for concern was reading this line from changelog, and then not knowing what the approach was or the process was if the following was not being used (I'm using VS2010):

 - Enabled native JS optimizer to be built automatically on Windows, requires VS2012 or VS2013. 

If anyone would know why things don't work, after uninstalling and re-installing everything and cleaning source, then please let me know!

1 Answer 1

0

This appear to be a regression in 1.34.1. I had the exact same issue. After upgrading to 1.34.6 the error went away. I don't which commit fixed it but I would suggest you also update to 1.34.6+.

4
  • I am having the same error: things were working fine using 1.35.0, then I tried to "build from source" in order to get binaryen feature... after following the doc: "./emsdk install sdk-incoming-64bit" and "./emsdk activate sdk-incoming-64bit". I now get the "Failed to run llvm optimizations:" as above ... wacky
    – Felipe
    Jul 26, 2016 at 13:52
  • The optimizer breaks from time to time in the incoming branch, I suggest you report the issue and avoid using that branch when it's not stable.
    – Erunehtar
    Jul 26, 2016 at 17:25
  • I'm using incoming because that's the only that supports the BINARYEN=1 option. What I ended up doing is delete the whole sdk folder and reinstall a clean one from scratch with only incoming branch: "./emsdk install sdk-incoming-64bit" and "./emsdk activate sdk-incoming-64bit". This fixed the issue.
    – Felipe
    Jul 27, 2016 at 8:20
  • I have the same problem with 1.38.27.It's 1.34.6+. Sep 3, 2020 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.