Installing Emscripten on the Mac is not always straightforward. There are common problems mostly related to SSL certificates. If you encounter any of these, first search the internet for help as someone else will usually have encountered the same issue. If you cannot find a solution, you will need to raise a support ticket at https://github.com/emscripten-core/emscripten/issues/.
To install Emscripten on the Mac, first start a terminal window (Applications/Utilites/Terminal).
You should see a MacOS terminal window. First, make sure both GIT and Python are installed properly. To do this, type "git --version" and "pyhon --version" in the command prompt window, you should see some output as in the diagram below.
If you have both GIT and Python installed, you can now move onto the next step. Vensim has a script that will download and install the Emscripten SDK for you. In the terminal window, change folder to /Users/Shared/Vensim/comp/wasm. Now make sure the script is "executable" but typing the command "chmod 755 install_emscripten_sdk_macos.unx".
Now we are ready to run the script. Do this by issuing the command "./install_emscripten_sdk_macos.unx" in the terminal window. This will download the Emscripten SDK for you. If it works, you should see the following in the terminal window.
MACBOOKPRO:wasm admin$ ./install_emscripten_sdk_macos.unx Cloning into 'emsdk'... remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (13/13), done. remote: Total 1866 (delta 4), reused 4 (delta 1), pack-reused 1851 Receiving objects: 100% (1866/1866), 1.02 MiB | 2.37 MiB/s, done. Resolving deltas: 100% (1181/1181), done. Already up to date. Installing SDK 'sdk-releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'.. Installing tool 'node-12.9.1-64bit'.. Downloading: /Users/Shared/Vensim/comp/wasm/emsdk/zips/node-v12.9.1-darwin-x64.tar.gz from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v12.9.1-darwin-x64.tar.gz, 18200540 Bytes Unpacking '/Users/Shared/Vensim/comp/wasm/emsdk/zips/node-v12.9.1-darwin-x64.tar.gz' to '/Users/Shared/Vensim/comp/wasm/emsdk/node/12.9.1_64bit' Done installing tool 'node-12.9.1-64bit'. Installing tool 'releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'.. Downloading: /Users/Shared/Vensim/comp/wasm/emsdk/zips/7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-wasm-binaries.tbz2 from https://storage.googleapis.com/webassembly/emscripten-releases-builds/mac/7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f/wasm-binaries.tbz2, 127627813 Bytes Unpacking '/Users/Shared/Vensim/comp/wasm/emsdk/zips/7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-wasm-binaries.tbz2' to '/Users/Shared/Vensim/comp/wasm/emsdk/upstream' Done installing tool 'releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'. Running post-install step: npm ci ... Done running: npm ci Done installing SDK 'sdk-releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'. Writing .emscripten configuration file to user home directory /Users/admin/ The Emscripten configuration file /Users/admin/.emscripten has been rewritten with the following contents:
NODE_JS = '/Users/Shared/Vensim/comp/wasm/emsdk/node/12.9.1_64bit/bin/node' LLVM_ROOT = '/Users/Shared/Vensim/comp/wasm/emsdk/upstream/bin' BINARYEN_ROOT = '/Users/Shared/Vensim/comp/wasm/emsdk/upstream' EMSCRIPTEN_ROOT = '/Users/Shared/Vensim/comp/wasm/emsdk/upstream/emscripten' TEMP_DIR = '/var/folders/q6/047j0jc17_3gtn74ckfs67vm0000gn/T' COMPILER_ENGINE = NODE_JS JS_ENGINES = [NODE_JS]
To conveniently access the selected set of tools from the command line, consider adding the following directories to PATH, or call 'source ./emsdk_env.sh' to do this for you.
/Users/Shared/Vensim/comp/wasm/emsdk:/Users/Shared/Vensim/comp/wasm/emsdk/node/12.9.1_64bit/bin:/Users/Shared/Vensim/comp/wasm/emsdk/upstream/emscripten
Set the following tools as active: node-12.9.1-64bit releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit
Adding directories to PATH: PATH += /Users/Shared/Vensim/comp/wasm/emsdk PATH += /Users/Shared/Vensim/comp/wasm/emsdk/upstream/emscripten PATH += /Users/Shared/Vensim/comp/wasm/emsdk/node/12.9.1_64bit/bin
Setting environment variables: EMSDK = /Users/Shared/Vensim/comp/wasm/emsdk EM_CONFIG = /Users/admin/.emscripten EMSDK_NODE = /Users/Shared/Vensim/comp/wasm/emsdk/node/12.9.1_64bit/bin/node
MACBOOKPRO:wasm admin$
|
---|