Branched code with node.js v0.8.2 and different capturing solution


Hi there,

Over the last 2 days could spend some time on the software.

I used the Angström distribution that comes with the BeagleBone directly as I like its sleekness.

I found a less hacky solution to build node.js 0.8.x on the ARM platform thanks to a a Rapspberry PI user that had the same issues:

It seems that express (the node library used to host the static part of the site) changed recently to version 3.0 (i got beta2) and that broke the current code. After some fights with node.js (I'm totally new here too) I manged to fix that.

Meanwhile I found a way to stream video without using node.js as a gateway. Even though I can see why you choose to use your own capture app using OpenCV for potential future development, I think right now it makes sense to keep it simple. Therefore I used a tool called MJPG-Streamer ( It takes the video from the webcam and streams it via http as a MJPG (a continuous stream of JPEG images, a little like you did manually). I think this will take away some load from the node.js process and simplify that part of the software greatly.

I haven't yet come around to setup my own blog, but in the meanwhile, I put my branch on github for generall consumption.

I plan to do a little work on the UI and the software until I get my electronics and find a place to get the bodyworks done.

Hope its of help for anyone.




Hi Dominik,

I was trying your less-hacky solution for node.js but the command

git apply --stat ~/node_pi/v0.8.2-release-raspberrypi.patch

returns '0 files changed'

Make runs for a long time but errors out with this:

/usr/include/arm-linux-gnueabihf/bits/stdio.h: In function ‘int getchar()’:
/usr/include/arm-linux-gnueabihf/bits/stdio.h:45:14: sorry, unimplemented: Thumb-1 hard-float VFP ABI
make[1]: *** [/home/rov/.nvm/src/node-v0.8.2/out/Release/] Error 1
make[1]: Leaving directory `/home/rov/.nvm/src/node-v0.8.2/out'
make: *** [node] Error 2

Any ideas? BTW, I'm hanging around in the #openrov IRC channel if you want to chat. It's pretty quiet over there.


Hi sliptronic

Sorry for the late answer.

Have you been in the home directory of your user when you did the

git clone

command? If not you have the use the correct path. As well check that you are in the node source directory /home/rov/.nvm/src/node-v0.8.2 (from what I see in your post)

Beside that, I have to admit that I used the source code package from the node.js website instead the nvm download. But it should not really matter.

I haven't tested the patch with the newest version 0.8.4 of node, so if you wan't to test again with the node source distribution here it is:




Thanks for the reply. I got the patch to apply, but it's erroring out at the same place. Interesting that it's related to the hard-float which is the section the hacky solution recommended be commented out starting at line 1230 in

I'm going to try rebuilding using angstrom instead of ubuntu. I'll post here again.


Have you set the environment variables accordingly?


Yes, I have. I've also tried a number of different variations on them.

I don't understand all of it but this seems to relate directly to the error:

The part at the bottom about the ubuntu static libraries not being suitable for the raspi is interesting. Not sure how closely the raspi and the beaglebone are or whether the beaglebone ubuntu image has 'suitable' static libraries.

I think, at a minimum, building node for the beaglebone ubuntu image is going to need some different compiler flags.


So close. I think I got node.js to build in ubuntu. It requires the -marm flag. I'll write up directions after I get it all working. Everything else seemed to install fine. But when I try it I get this:

rov@openrov:~/openrov-software/src$ NODE_ENV=production node app.js

throw err;
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/home/rov/openrov-software/src/app.js:19:15)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)


Hi Sliptronic,

You need to do

npm install express serialport

to install the node modules needed (express is one of them).


Hmmm. Very strange. I checked the scrollback and I had done that. Everything had installed without error. I repeated it and got a warning that the node path wasn't found but otherwise it went fine again.

Now with start it, it doesn't crash. Browse to the IP gives a 'it works' page.

Here's a pastebin with the output including the last bit of my history.

Do I have to go somewhere other than the IP address to get to the output?


Do you use the official OpenROV codebase or my branch?

As I outline it in by build log, there is an issue with the current OpenROV code and the new node express version.

You might want to diff the app.js from my mjpg-streamer branch ( and the development branch from OpenROV.


I guess the forum has a maximum reply depth, so sorry for the out-of-order reply. I'd missed your build log. Looks good. Thanks for all the help, btw.

I think we're close. I've switched to your fork and rebuilt the development branch. Interestingly, I had to re-do the express install (again) after compiling. app.js launches now. This is shown in the console:

rov@openrov:~/openrov-software/src$ NODE_ENV=production node app.js
info - started
config { debug: true,
sample_freq: 20,
dead_zone: 10,
video_frame_rate: 15,
production: 'production',
port: 8080 }
Initializing serial port
ROV controller initialized
Start listening on port: 8080
There was an error setting the TX on UART1: Error: EACCES, open '/sys/kernel/debug/omap_mux/uart1_txd'

From the browser, I see a warning about gamepad not connected and a blank image pane with the word OpenROV.


Trying this

I keep getting stuck at step 4/5 .... nvm is not a recognized command despite step 4 seeming to work?


Hum, check your PATH variable. Seems like the nvm script isn’t in the PATH.


Ah, one possible reason: log off and back on (ctrl-d) as the path gets set via the .bashrc at login!


ok that worked.. now with the last part of step 6 ... what dir should i be in when i run

export GYP_DEFINES="armv7=0"
export CCFLAGS='-march=armv6'
export CXXFLAGS='-march=armv6'`

? mine seems to hang?


That doesn’t matter. The export command only sets environment variables. But there seems to be an additional character at the end of the last line, that could put the shell in a state where it waits for more text.


that was it right there - didnt catch it

Now it is hanging with the same hard float that was mentioned earlier in the thread

/usr/include/arm-linux-gnueabihf/bits/stdio.h: In function ‘int getchar()’:
/usr/include/arm-linux-gnueabihf/bits/stdio.h:45:14: sorry, unimplemented: Thumb
-1 hard-float VFP ABI
make[1]: *** [/home/ubuntu/.nvm/src/node-v0.8.2/out/Release/
eps/v8/src/accessors.o] Error 1
make[1]: Leaving directory `/home/ubuntu/.nvm/src/node-v0.8.2/out'
make: *** [node] Error 2


Bugger… So there is a difference in some library or the compiler between Ubuntu and Angström.
As I don’t have an sd with Ubuntu right now, I can’t give much help, sorry!


Check out step 6 here:

It uses different compiler flags. I think the -marm flag is the one that did it.

You have to add it in step 7 as well so the install works.


i added the -marm code for the install under both the CCFLAGS and the CXXFLAGS, no luck?

ACTION _home_ubuntu__nvm_src_node_v0_8_2_deps_v8_tools_gyp_v8_gyp_v8_snapshot_
target_run_mksnapshot /home/ubuntu/.nvm/src/node-v0.8.2/out/Release/
ERROR: Binary compiled with -mfloat-abi=hard but without -DUSE_EABI_HARDFLOAT
make[1]: *** [/home/ubuntu/.nvm/src/node-v0.8.2/out/Release/
ot/geni/] Error 1
make[1]: Leaving directory `/home/ubuntu/.nvm/src/node-v0.8.2/out'
make: *** [node] Error 2