How to Update the Emscripten C/C++ Compiler
The Emscripten C/C++ Compiler for Webassembly is evolving at a blazing speed. Bug fixes and new features. Keeping it updated can save you hours when you stumble upon something that is already resolved.
It goes without saying that you need to have Emscripten installed before you try to update it. Note that this post is dealing with the Windows environment, although the updating process should be pretty similar for the Linux environment.
Commands To Get Emscripten Updated
Before executing the following commands, make sure you go to the directory where Emscripten(emsdk) is installed, and set its environment variables by executing:
Emscripten update commands:
emsdk update-tags emsdk install latest emsdk activate latest
Your compiler is updated after a few minutes. Easy.
Not so fast, my compiler update process failed!
Issue Updating Emscripten
I suspect that the following issue is also happening during the installation.
Currently the emsdk install latest command eventually gives the following error:
. . . Installing tool 'emscripten-1.37.35'.. Error downloading URL 'https://github.com/kripken/emscripten/archive/1.37.35.zip': <urlopen error [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SS L23_GET_SERVER_HELLO:tlsv1 alert protocol version> Installation failed!
This error appears to be happening because the Python shipped with Emscripten will do SSL version 2 only, and sites are refusing this older standard.
Fortunately, there is already a documented workaround.
To work around this error, instead of issuing the emsdk install latest command, use:
c:\Python27\python emsdk install latest
Do not change the last command, keep it as described above: emsdk activate latest.
Issue Was Filed
I have filed a bug report about this issue.
What Prompt me to Try to Update Emscripten?
I was getting the following error on Firefox and Chrome when trying to execute a small wasm module:
TypeError: import object field ‘env’ is not an Object
Was this error be resolved after I had updated Emscripten? Actually no :(. This error is not an issue with the compiler, and I am preparing an interesting post about it (stay tuned!).
|Python||updated from 2.7.5 to 2.7.14|
|emscripten||updated from 1.37.27 to 1.37.35|