Successfully compiled nodejs v0.6.13 on BeagleBone/Angström

Node 0.4.x being outdated and having no NPM, I decided to build a more recent version.

Followed the steps from here, with some changes:
https://github.com/joyent/node/issues/2131#issuecomment-3208846

Here is exactly what I did (make sure you have build essentials etc. installed):

Get source

wget http://nodejs.org/dist/v0.6.13/node-v0.6.13.tar.gz
tar -xf node-v0.6.13.tar.gz
cd node-v0.6.13

Edit deps/v8/SConstruct and add two compiler flags:

[…]
‘CCFLAGS’: [’$DIALECTFLAGS’, ‘$WARNINGFLAGS’, ‘-march=armv7-a’, ‘-mtune=cortex-a8’],
[…]

I decided to leave the existing node intact and install this version for a node user.

./configure --path=$HOME/local

Grab a coffee

make

Almost done

make install

Build took <1h. Until now I haven’t had any problems. Don’t forget to add $HOME/local/bin to your user’s PATH.

make test resulted in only 1 failed test, and I think that was related to the busybox curl version having problems with https.

Hope someone finds this useful!

Excellent! Can you already use this version with the installed cloud9 ide, or does that require extra steps?

Markus

2012/3/17 Jan <jankolkmeier@gmail.com>

Cloud9 IDE it is still depending on 0.4.x (even the more recent versions!)
Specifically node has recently dropped “require.paths”, which is used extensively in one place by cloud9
There are workarounds, but I expect this to be officially fixed soon anyway.

See the Issue on github: https://github.com/ajaxorg/cloud9/issues/394

There are node 0.6.x recipes in openembedded as well

I am really confused on what to do here… any chance you could be more in depth…

Edit deps/v8/SConstruct and add two compiler flags:

[…]
‘CCFLAGS’: [’$DIALECTFLAGS’, ‘$WARNINGFLAGS’, ‘-march=armv7-a’, ‘-mtune=cortex-a8’],
[…]

I suppose the easiest way is using a openembedded recipe, but I never did that before and failed to find any documentation on that myself.

What have you tried already? where are you stuck?

A small update on this: there's now a special 'node4' binary specifically for cloud and 'node' now runs 0.6.14. I haven't been able to make the switch in cloud9 work, but progress nonetheless.