Node.js source code build giving segmentation fault on ARM -
tl;dr: tried install node.js on armv7-based cubox running ubuntu 12.10 (quantal). when compiling node.js source (see "second attempt" below), node
produces segmentation fault. can here?
first attempt
first of all, tried install node.js via package manager, following instructions ubuntu given here: installing node.js via package manager: ubuntu, mint
adding repository mentioned there using sudo add-apt-repository ppa:chris-lea/node.js
seems work fine:
you add following ppa system: evented i/o v8 javascript. node's goal provide easy way build scalable network programs more info: https://launchpad.net/~chris-lea/+archive/node.js press [enter] continue or ctrl-c cancel adding gpg: keyring `/tmp/tmpp0owib/secring.gpg' created gpg: keyring `/tmp/tmpp0owib/pubring.gpg' created gpg: requesting key c7917b12 hkp server keyserver.ubuntu.com gpg: /tmp/tmpp0owib/trustdb.gpg: trustdb created gpg: key c7917b12: public key "launchpad chrislea" imported gpg: total number processed: 1 gpg: imported: 1 (rsa: 1) ok
however, sudo apt-get install nodejs
gives me error:
e: unable locate package nodejs
i assume because have arm-based system. far can tell from package details, repo contains builds i386 , amd64. assumption right?
second attempt
so next attempt install node.js source. used instructions given in following gist: node.js , npm in 30 seconds. seems work, including make install
. execution of install.sh
script in last line of gist fails since node
produces segmentation fault. wonder can install node.js on machine?
in order illustrate problem, here output:
install.sh output
this ouput of install.sh
after running make install
, described in gist installation instructions mentioned above.
cyroxx@cubox:~/node-latest-install$ curl https://npmjs.org/install.sh | sh % total % received % xferd average speed time time time current dload upload total spent left speed 100 7882 100 7882 0 0 11251 0 --:--:-- --:--:-- --:--:-- 14984 tar=/bin/tar version: tar (gnu tar) 1.26 copyright (c) 2011 free software foundation, inc. license gplv3+: gnu gpl version 3 or later <http://gnu.org/licenses/gpl.html>. free software: free change , redistribute it. there no warranty, extent permitted law. written john gilmore , jay fenlason. install npm@latest fetching: http://registry.npmjs.org/npm/-/npm-1.2.21.tgz segmentation fault segmentation fault need node run program. node --version reports: v0.10.7 please upgrade node before continuing. failed
node output
cyroxx@cubox:~/node-latest-install$ node segmentation fault
make debug build
running make
buildtype=debug
produces output:
cyroxx@cubox:~/node-latest-install$ make -c out buildtype=debug make: entering directory `/home/cyroxx/node-latest-install/out' cxx(target) /home/cyroxx/node-latest-install/out/debug/obj.target/v8_base/deps/v8/src/arm/stub-cache-arm.o ../deps/v8/src/arm/stub-cache-arm.cc: in function 'void v8::internal::probetable(v8::internal::isolate*, v8::internal::macroassembler*, v8::internal::code::flags, v8::internal::stubcache::table, v8::internal::register, v8::internal::register, v8::internal::register, v8::internal::register, v8::internal::register, v8::internal::register)': ../deps/v8/src/arm/stub-cache-arm.cc:106:15: error: comparison of unsigned expression < 0 false [-werror=type-limits] cc1plus: warnings being treated errors make: *** [/home/cyroxx/node-latest-install/out/debug/obj.target/v8_base/deps/v8/src/arm/stub-cache-arm.o] error 1 make: leaving directory `/home/cyroxx/node-latest-install/out'
what's wrong here? bug in arm implementation of v8? maybe compiler flags not (properly) set? else? totally stuck.
i had problem on few different arm computers. compiling without snapshot feature worked me. snapshot v8 feature allows node start faster, , there seems bug arm.
./configure --without-snapshot make sudo make install
http://www.armhf.com/index.php/node-js-for-the-beaglebone-black/
Comments
Post a Comment