在OSX 10.15上安装并运行emscripten

时间:2020-06-16 16:00:43

标签: macos webassembly emscripten

我最近使用自制软件在Macbook air上安装了emscripten。 但是,当我尝试运行它时,即使我执行简单的emcc --version也会收到错误llc executable not found at /usr/bin/llc。我该如何解决?

2 个答案:

答案 0 :(得分:1)

解决方案:尚未安装llvm,所以在brew install llvm之后加上echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc为我解决了这个问题。

答案 1 :(得分:0)

嗯。好像添加brew install llvm一样,我仍然无法拨打llvm

所以我刚刚安装了brew install emscripten 然后我做了emcc给我

Welcome to Emscripten!

This is the first time any of the Emscripten tools has been run.

A settings file has been copied to /usr/local/Cellar/emscripten/1.39.18/libexec/.emscripten, at absolute path: /usr/local/Cellar/emscripten/1.39.18/libexec/.emscripten

It contains our best guesses for the important paths, which are:

  LLVM_ROOT       = /usr/bin
  NODE_JS         = /usr/local/bin/node
  EMSCRIPTEN_ROOT = /usr/local/Cellar/emscripten/1.39.18/libexec

Please edit the file if any of those are incorrect.

This command will now exit. When you are done editing those paths, re-run it.

然后我再次做emcc,给了我BINARYEN_ROOT is set to empty value in /usr/local/Cellar/emscripten/1.39.18/libexec/.emscripten

您如何设置BINARYEN_ROOT?我在最新的macos 10.15.5上。