ubuntu版本的emscripten问题“由于异常而从js编译器中止":未知向量类型< 4 x i8>|未定义" [英] emscripten issue with ubuntu version "aborting from js compiler due to exception: unknown vector type <4 x i8> | undefined"
问题描述
我无法从ubuntu存储库中使用当前版本的emscripten编译任何东西
I cannot compile anything with the current version of emscripten from the ubuntu repos
这是错误
我怀疑这可能是因为回购中的emscripten已过时,但是为什么没有错误报告?
I suspect it might be because emscripten is outdated in the repos, but why is there no bug reports??
有人可以帮忙吗?我找不到任何更新的信息.
Could anyone help? I cannot find any updated information.
谢谢.
推荐答案
原因是因为您使用的是Linux发行版随附的/usr/bin/clang ++
.
The reason is because you are using the /usr/bin/clang++
that comes with your Linux distribution.
此版本不支持Javascript后端.为了使用emscripten,您必须编译fastcomp
(添加了Javascript后端的LLVM clang编译器)
This version does not support Javascript backend. In order to use emscripten, you have to compile fastcomp
(an LLVM clang compiler with Javascript backend added)
如果尚未构建fastcomp,Emscripten将无法正常工作.
If you have not built fastcomp yet, Emscripten won't work.
查看此页面以获取安装说明:
Check out this page for installation instructions:
http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
如果您已经构建了fastcomp,则问题出在 emscriptenrc
文件中,此外还有PATH.
If you have already built fastcomp, then the problem is in your emscriptenrc
file, and moreover your PATH.
这是我解决该问题的方法:
This is how I worked around the issue:
我创建了一个名为emscriptenrc.sh的文件来完成此操作:
I created a file called emscriptenrc.sh that did this:
export PATH=/home/mike/emscripten/fastcomp/build/master/bin:/home/mike/emscripten/fastcomp/build/master/include:/home/mike/emscripten/fastcomp/build/master/lib:$PATH
然后我创建了该文件
我通过调用
./emcc -v
-这似乎获得了正确版本的clang注册...
./emcc -v
from the emscripten build directory -- this seemed to get the right version of clang registered...
现在您可以继续使用emcc进行编译
now you can go ahead and compile with emcc
我建议阅读 http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html 以及尝试使用emscripten之前的其他文档.
I would suggest reading http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html as well as the rest of the documentation prior to trying to use emscripten.
这篇关于ubuntu版本的emscripten问题“由于异常而从js编译器中止":未知向量类型< 4 x i8>|未定义"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!