CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 6461|回复: 2

关于CubieBoard自编译Node.js 0.10.5最新版(二楼补充0.8.22和0.6.19)

[复制链接]
发表于 2013-5-3 03:37:23 | 显示全部楼层 |阅读模式
本帖最后由 BiG 于 2013-5-4 01:34 编辑

系统:
http://cn.cubieboard.org/forum.php?mod=viewthread&tid=347
ps:谢谢chinaspc同学啊啊啊啊啊啊~~

参考资料地址:
https://groups.google.com/forum/ ... xSjagw/I4qJx6WVyuUJ
https://github.com/archlinuxarm/ ... ity/nodejs/PKGBUILD
https://github.com/joyent/node/wiki/Installation
https://groups.google.com/forum/#!msg/beagleboard/T5_lVo0Ngn4/IeMZFIVNWj8J
http://brachestudios.com/2012/03/13/installing-the-latest-version-of-node-js-on-the-beaglebone/

注:蓝色地址的方法试了,编译0.10.5无措,但运行node后出现
segmentation fault
经过N小时奋战,在上面两个地址找到了编译的参数,无需修改任何文件,直接编译!!其实就是参考ArchLinuxARM的PKGBuild源文件,因为我装的是APT系统...但又不知道怎么下载ArchLinux源上面的文件,只能靠摸索了,其实源上面就有编译好的文件..._-_

1 到 http://nodejs.org/dist/ 找一个版本,虽然参考资料说的其中一个修改文件的编译方法能在0.8.9上通过,但我自己的操作是编译直接报错,所以我最后还是找回0.10.5稳定版
2 解压如 tar -zxf node-v0.10.5.tar.gz
3 cd到那个目录,运行一个install.sh,内容如下:
##########################################
export GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp3_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"

./configure --prefix=~/opt/node-v0.10.5 --without-snapshot --with-arm-float-abi=hard

make

make install
##########################################
这里我去掉了所有sudo,可以参考这里
https://increaseyourgeek.wordpre ... without-using-sudo/

评分

参与人数 1威望 +20 金钱 +20 贡献 +20 收起 理由
cubieplayer + 20 + 20 + 20 贡献奖

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2013-5-4 01:45:23 | 显示全部楼层
继续参考ArchLinuxARM的PKGBuild的History,可以编译0.8.22和0.6.19了
https://github.com/archlinuxarm/ ... er/community/nodejs

------------------------------------------------------------------------------------------------------
这里是for 0.6.19 only的:
在PKGBuild有段很重要的注释,导向了一个解决0.6.19的办法

https://github.com/joyent/node/issues/2131#issuecomment-3208846
当然,A10是Armv7-a,这里要把东西参数改一下,进入node的源码目录里的deps/v8,找到SConstruct,编辑之

在82行加入armv7-a,修改完后是这样的

80 'gcc': {
81      'all': {
82        'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv7-a'],

在1083改为hard,修改完后是这样的


1081  'armeabi': {
1082    'values': ['hard', 'softfp', 'soft'],
1083    'default': 'hard',

保存退出
------------------------------------------------------------------------------------------------------



在node的源码根目录,建立一个install.sh文件,把对应版本的注释去掉,按Enter前看看有没有错误信息,比如没找到ssl之类的
#################################################
#for 0.10.5
#export GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp3_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"
#./configure --prefix=/home/bigmusic/opt/node-v0.10.5 --without-snapshot --with-arm-float-abi=hard


#for 0.8.22
#export GYPFLAGS="-Darmeabi=hard -Dv8_use_arm_eabi_hardfloat=true -Dv8_can_use_vfp3_instructions=true -Dv8_can_use_vfp2_instructions=true -Darm7=1"
#./configure --prefix=/home/bigmusic/opt/node-v0.8.22 --without-snapshot --with-arm-float-abi=hard


#for 0.6.19
#./configure --prefix=/home/bigmusic/opt/node-v0.6.19 --without-snapshot --openssl-libpath=/usr/lib/ssl --openssl-includes=/usr/include/openssl

read -n 1 -p "Press ENTER to Continue or Press Ctrl+C to exit..."

make clean

make

make install
####################################################
键入./install.sh进行编译,路径要自己改好喔

回复 支持 反对

使用道具 举报

发表于 2013-5-16 16:26:08 | 显示全部楼层
希望再完善整理一下,还不够清晰
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-19 21:12 , Processed in 0.023392 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部