无法使用 Debian squeeze 在 Sheevaplug (armv5t) 上构建节点
我现在已经尝试了几种在运行 Debian(版本 6.0.2)squeeze 的 Sheevaplug(armv5t)上构建节点(版本 0.5.1)的方法,但最终总是......
$ node
Illegal instruction
在我可以的所有情况下让它编译。
我尝试遵循几个指南(即使是各种组合):
- 将 -march=armv5t 添加到 deps/v8/SConstruct ~line 130 (http://code.google.com/p/v8/issues/detail?id=836)
- 从 wscript 行中删除了 if 语句533 并替换为 snapshot = "" (http://comments.gmane. org/gmane.comp.lang.javascript.nodejs/10822)
- 使用 scrapbox2 在其他系统上构建 (http://www.plugcomputer.org/plugwiki/index.php/Scratchbox2_based_cross_compiling)
- 构建v8分开,然后在编译时引用它到node,指南是针对其他arm的,所以我不得不尝试将参数更改为armv5t(http://coolaj86.info/articles/debugging-v8-and -node-js-on-arm.html)
现在我感到很困惑,有几个人似乎已经成功为armv5t构建了node,但对于不同版本的node和v8可能有所不同。
我怎样才能继续尝试?我会很乐意测试任何建议。
I have now tried several ways of building node (version 0.5.1) on/for a Sheevaplug (armv5t) running Debian (version 6.0.2) squeeze but always ends up with...
$ node
Illegal instruction
... in all cases where ever I could get it to compile.
I have tried to follow several guides (even in various combinations):
- Adding -march=armv5t to deps/v8/SConstruct ~line 130 (http://code.google.com/p/v8/issues/detail?id=836)
- Removed if statement from wscript line 533 and replaced with snapshot = "" (http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/10822)
- Build on other system with scratchbox2 (http://www.plugcomputer.org/plugwiki/index.php/Scratchbox2_based_cross_compiling)
- Building v8 separately and then referencing it to node when compiling, guide is for other arm so I had to try and change the parameters to armv5t (http://coolaj86.info/articles/debugging-v8-and-node-js-on-arm.html)
Now I feel stuck, several people seem to have succeeded in building node for armv5t but maybe it's different for different versions of node and v8.
How can I continiue trying? I will happily test any suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 Node 的稳定版本 0.4.10 通过 Sheevaplug 上的以下步骤解决了这个问题。
(可能还需要一些软件包)
将打开的文件 deps/v8/SConstruct 中的第 139 行更改
为
保存文件并退出 nano,ctrl+o 输入 ctrl+x
检查有关丢失软件包的投诉
在我的计算机上需要一段时间约 40 分钟Sheevaplug,构建测试后运行节点,
如果节点 shell 启动正常,则退出 shell 并运行
Using the stable version 0.4.10 of node solved it with the following steps on the Sheevaplug.
(Might be a few more packages needed)
Change ~line 139 in opened file deps/v8/SConstruct
to
Save file and exit nano with, ctrl+o enter ctrl+x
Check for complaints about missing packages
Takes a while ~40 minutes on my Sheevaplug, after build test running node with
If node shell started ok, exit shell and run
我的 pogoplug 上运行了版本 6。我发现删除编译器标志是最好的选择,就好像您在目标 gcc 上构建应该知道该怎么做一样。我现在只是破解了它,因为正确的解决方案是让构建系统设置选项“armeabi:soft”而不是“armeabi:softfp”,后者又设置 gcc 标志。
但如果你只是想让它工作,请在 SConstruct 文件中执行此操作(以及像上一篇文章中那样添加 -march=armv5t' )
这就是我在第 157 行左右注释掉的内容:
我做了一些测试,它对我有用。
I got version 6 working on my pogoplug. I figured out removing compiler flags was the best option as if you build on target gcc should know what to do. I've only hacked it for now as the proper solution is to get the build system to set the option 'armeabi:soft' instead of 'armeabi:softfp' which in turn sets the gcc flags.
But if you just want it to work do this in the SConstruct file ( as well as adding the -march=armv5t' as in the previous post )
This is what I commented out at around line 157:
I did a bit of testing and it works for me.
如果其他人正在寻找,nodejs 问题跟踪器上有一个有用的线程: https: //github.com/joyent/node/issues/2131#issuecomment-3208846
In case anyone else is looking, there's a useful thread on the nodejs issue tracker: https://github.com/joyent/node/issues/2131#issuecomment-3208846