简体   繁体   English

ubuntu版本出现脚本问题“由于异常而从js编译器中止:未知向量类型<4 x i8> | 未定义”

[英]emscripten issue with ubuntu version “aborting from js compiler due to exception: unknown vector type <4 x i8> | undefined”

I cannot compile anything with the current version of emscripten from the ubuntu repos 我无法使用ubuntu存储库中的emscripten当前版本进行任何编译

Here is the error 这是错误

http://pastebin.com/j5Z0ztTs http://pastebin.com/j5Z0ztTs

I suspect it might be because emscripten is outdated in the repos, but why is there no bug reports?? 我怀疑这可能是因为回购中的emscripten已过时,但是为什么没有错误报告?

Could anyone help? 有人可以帮忙吗? I cannot find any updated information. 我找不到任何更新的信息。

Thanks in advance. 提前致谢。

The reason is because you are using the /usr/bin/clang++ that comes with your Linux distribution. 原因是因为您使用的是Linux发行版随附的/usr/bin/clang++

This version does not support Javascript backend. 此版本不支持Javascript后端。 In order to use emscripten, you have to compile fastcomp (an LLVM clang compiler with Javascript backend added) 为了使用emscripten, you have to compile fastcomp (添加了Javascript后端的LLVM clang编译器)

If you have not built fastcomp yet, Emscripten won't work. 如果您尚未构建fastcomp,Emscripten将无法正常工作。

Check out this page for installation instructions: 查看此页面以获取安装说明:

http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html


If you have already built fastcomp, then the problem is in your emscriptenrc file, and moreover your PATH. 如果您已经构建了fastcomp,则问题出在emscriptenrc文件中,此外还有PATH。

This is how I worked around the issue: 这就是我解决该问题的方法:

I created a file called emscriptenrc.sh that did this: 我创建了一个名为emscriptenrc.sh的文件来执行以下操作:

export PATH=/home/mike/emscripten/fastcomp/build/master/bin:/home/mike/emscripten/fastcomp/build/master/include:/home/mike/emscripten/fastcomp/build/master/lib:$PATH

then after I created that file 然后我创建了那个文件之后

I rebuilt the ~/.emscripten configuration file by calling 我通过调用来重建~/.emscripten配置文件

./emcc -v from the emscripten build directory -- this seemed to get the right version of clang registered... ./emcc -v从emscripten构建目录-似乎注册了正确的clang版本...

now you can go ahead and compile with emcc 现在您可以继续使用emcc进行编译

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. 我建议在尝试使用emscripten之前,先阅读http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html以及其他文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM