无法使用 Debian 挤压在 Sheevaplug (armv5t) 上构建节点 [英] Cannot build node on Sheevaplug (armv5t) with Debian squeeze
问题描述
我现在已经尝试了几种在运行 Debian(版本 6.0.2)的 Sheevaplug(armv5t)上/为运行 Debian(版本 6.0.2)挤压构建节点(版本 0.5.1)的方法,但最终总是......
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):
- 将 -march=armv5t 添加到 deps/v8/SConstruct ~line 130(http://code.google.com/p/v8/issues/detail?id=836)
- 从 wscript 第 533 行删除 if 语句并替换为快照 = "" (http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/10822)
- 使用scratchbox2 在其他系统上构建(http://www.plugcomputer.org/plugwiki/index.php/Scratchbox2_based_cross_compiling)
- 单独构建 v8,然后在编译时将其引用到节点,指南适用于其他 arm,所以我不得不尝试将参数更改为 armv5t (http://coolaj86.info/articles/debugging-v8-and-node-js-on-arm.html)
现在感觉卡住了,好像有几个人已经成功为armv5t构建了node,但是可能不同版本的node和v8不一样.
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.
推荐答案
使用node的稳定版本0.4.10在Sheevaplug上通过以下步骤解决了.
Using the stable version 0.4.10 of node solved it with the following steps on the Sheevaplug.
$ sudo apt-get update
$ sudo apt-get install scons make libssl
(可能还需要几个包)
$ cd /home/user/source
$ wget http://nodejs.org/dist/node-v0.4.10.tar.gz
$ tar zxvf node-v0.4.10.tar.gz
$ cd node-v0.4.10
$ nano deps/v8/SConstruct
在打开的文件 deps/v8/SConstruct 中更改 ~line 139
Change ~line 139 in opened file deps/v8/SConstruct
'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
到
'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv5t'],
保存文件并退出nano,ctrl+o 输入ctrl+x
Save file and exit nano with, ctrl+o enter ctrl+x
$ ./configure
检查有关丢失包裹的投诉
Check for complaints about missing packages
$ make
在我的 Sheevaplug 上花费了大约 40 分钟,在构建测试运行节点之后
Takes a while ~40 minutes on my Sheevaplug, after build test running node with
$ ./node
如果 node shell 启动正常,退出 shell 并运行
If node shell started ok, exit shell and run
$ sudo make install
这篇关于无法使用 Debian 挤压在 Sheevaplug (armv5t) 上构建节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!