Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac 安装 emscripten 编译报 OSError: [Errno 2] No such file or directory #4

Open
unbug opened this issue Jun 22, 2017 · 0 comments

Comments

@unbug
Copy link
Member

unbug commented Jun 22, 2017

官网安装 emsdk 的方法比较慢,可以直接安装 emscripten brew install emscripten.
安装完底部有提示需要修改手动修改 ~/.emscripten.

LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/bin') # directory
BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN') or '') # directory

修改成

LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/local/opt/emscripten/libexec/llvm/bin') # directory
#BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN') or '') # directory

再运行 emcc -v

在编译过程中,如 emcc hello.c -s WASM=1 -o hello.html,可能会报 OSError: [Errno 2] No such file or directory 的错误,安装 brew install cmake 搞定!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant