Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.10.33 segfaults on Raspberry Pi with Raspbian Wheezy (2014-09-09) #44

Closed
sandeepmistry opened this Issue Dec 6, 2014 · 23 comments

Comments

Projects
None yet
@sandeepmistry
Copy link

sandeepmistry commented Dec 6, 2014

I followed the Debian and Ubuntu based Linux distributions instructions.

When I run node or npm a segmentation fault occurs.

pi@raspberrypi ~ $ node -v
Segmentation fault
pi@raspberrypi ~ $ npm -v
Segmentation fault

GDB output:

pi@raspberrypi ~ $ gdb /usr/bin/node
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/node...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/node 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x001e8fd2 in DES_xcbc_encrypt ()
(gdb) bt
#0  0x001e8fd2 in DES_xcbc_encrypt ()
(gdb) 

Install output:

pi@raspberrypi ~ $ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  rlwrap
The following NEW packages will be installed:
  nodejs rlwrap
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/5,671 kB of archives.
After this operation, 17.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously unselected package rlwrap.
(Reading database ... 78080 files and directories currently installed.)
Unpacking rlwrap (from .../rlwrap_0.37-3_armhf.deb) ...
Selecting previously unselected package nodejs.
Unpacking nodejs (from .../nodejs_0.10.33-2nodesource1~wheezy1_armhf.deb) ...
Processing triggers for man-db ...
Setting up rlwrap (0.37-3) ...
update-alternatives: using /usr/bin/rlwrap to provide /usr/bin/readline-editor (readline-editor) in auto mode
Setting up nodejs (0.10.33-2nodesource1~wheezy1) ...

Ran a sudo apt-get update && sudo apt-get upgrade before node setup/install.

@rvagg

This comment has been minimized.

Copy link
Contributor

rvagg commented Dec 6, 2014

Unfortunately this is because RaspPi is ARMv6 while the 'armhf' Debian distro is for ARMv7 and above. We need to have an arch check in the setup script to make sure this is stated at install time.

What we probably need to do is have a separate Raspbian-compatible build for RPI, it's not straight-forward unfortunately but we'll look in to it.

@sandeepmistry

This comment has been minimized.

Copy link
Author

sandeepmistry commented Dec 11, 2014

@rvagg thanks, let me know if there's anything I can help out with.

@babraham123

This comment has been minimized.

Copy link

babraham123 commented Dec 30, 2014

Hey @rvagg, I'm having the same segfault problem. Thanks for working on this

@andig

This comment has been minimized.

Copy link

andig commented Jan 2, 2015

Same problem here, crashing at least up to 0.11.14-1nodesource1~wheezy1

Could we get a more current build of 0.11 that contains the fix mentioned in #44?

@babraham123

This comment has been minimized.

Copy link

babraham123 commented Jan 2, 2015

@andig
For now I've fixed the problem by compiling node from source. Just change the numbers to the version you want.
http://shapeshed.com/compiling-nodejs-from-source-on-ubuntu-10-04/

@DarkPark

This comment has been minimized.

Copy link

DarkPark commented Jan 5, 2015

just to remind - the problem is still here

@rvagg

This comment has been minimized.

Copy link
Contributor

rvagg commented Jan 6, 2015

I don't believe we can build armv6 binaries through our standard deb builder setup but it might be practical to maintain a completely separate channel for raspbian.

To try out a test setup I've made, remove the nodesource entries from /etc/apt/sources.list and do the following:

sudo apt-get remove nodejs
sudo su -c 'echo "deb https://deb.nodesource.com/armv6l-node/ weezy main" >> /etc/apt/sources.list'
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install nodejs

Don't count on this working forever, I'll need to discuss this with @chrislea and make sure we can keep things consistent.

If it stops working, come back here and chat.

@DarkPark

This comment has been minimized.

Copy link

DarkPark commented Jan 6, 2015

thanks

@sandeepmistry

This comment has been minimized.

Copy link
Author

sandeepmistry commented Jan 6, 2015

@rvagg thanks! Works on my RPi!

Will the instructions be added to the nodesource/distributons read me or Installing Node.js via package manager wiki page?

@rvagg

This comment has been minimized.

Copy link
Contributor

rvagg commented Jan 7, 2015

@sandeepmistry it'll be bundled into the setup script for all .deb-based distributions so you'll run the standard command used by ubuntu and debian (listed on that page and in the README of this repo). I just need to make some changes and test. It'll have to do a uname -a to find armv6l to differentiate it from vanilla weezy which is the problem now (i.e. no differentiation).

@nisargjhaveri

This comment has been minimized.

Copy link

nisargjhaveri commented May 7, 2015

Doesn't work for me. @rvagg, Any other solution now?

@enzanki-ars

This comment has been minimized.

Copy link

enzanki-ars commented May 27, 2015

By the way, Adafruit has their own builds for Node.js. See: https://learn.adafruit.com/node-embedded-development/installing-node-dot-js

@ayancey

This comment has been minimized.

Copy link

ayancey commented May 27, 2015

@enzanki-ars Node works fine on Adafruit's repo, but do you know if they have anything for npm?

@enzanki-ars

This comment has been minimized.

Copy link

enzanki-ars commented May 27, 2015

When you install node from adafruit, it also installs npm.

@LouiseLi1889

This comment has been minimized.

Copy link

LouiseLi1889 commented Jun 23, 2015

I got the same problem due to follow the instruction
by DougieLawson » Wed Mar 04, 2015 6:50 pm
On a Raspberry Pi 2B use
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y build-essential python-dev python-rpi.gpio nodejs

@rvagg

This comment has been minimized.

Copy link
Contributor

rvagg commented Jul 4, 2015

Just a note here, if you're looking for good binaries for armv6 platforms, io.js comes with binaries that are now built on wheezy: https://iojs.org/dist/latest/

@LouiseLi1889

This comment has been minimized.

Copy link

LouiseLi1889 commented Jul 7, 2015

Thanks.

On Sat, Jul 4, 2015 at 6:59 AM, Rod Vagg notifications@github.com wrote:

Just a note here, if you're looking for good binaries for armv6 platforms,
io.js comes with binaries that are now built on wheezy:
https://iojs.org/dist/latest/


Reply to this email directly or view it on GitHub
#44 (comment)
.

@dmiddlecamp

This comment has been minimized.

Copy link

dmiddlecamp commented Dec 15, 2015

just hit this again... from instructions here trying to install 4.x - https://nodejs.org/en/download/package-manager/

@chrislea

This comment has been minimized.

Copy link
Contributor

chrislea commented Dec 16, 2015

Please look here at the bottom. We don't currently support ARM builds on old Debian / Ubuntu distros due to compiler toolchain issues.

@chrislea chrislea closed this Dec 16, 2015

@dmiddlecamp

This comment has been minimized.

Copy link

dmiddlecamp commented Dec 16, 2015

I was using the latest Jessie raspbian on a Pi B+ v1.2 when I hit the segfault issue:

screen shot 2015-12-16 at 11 01 09 am

Fixed by grabbing https://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-armv6l.tar.gz

@aburgd

This comment has been minimized.

Copy link

aburgd commented Jan 2, 2016

Using the source that @rvagg posted worked for me on DietPi Jessie, FWIW

@mathiasrw

This comment has been minimized.

Copy link

mathiasrw commented Jan 5, 2016

@dmiddlecamp thanks 👍

@samfearn

This comment has been minimized.

Copy link

samfearn commented Jan 19, 2016

The instructions supplied by @rvagg don't seem to work on a full Jessie build as opposed to the light version working as reported by @aburgd.

Also, @dmiddlecamp, I'm presumably being stupid, but how did you install from that tarball? The readme says to do ./configure, but there is no configure or makefile or anything :s

Edit: Oh, that was a stupid question :) just needs putting into /usr/local. For anyone else that this might be helpful for,

wget http://nodejs.org/dist/v4.2.4/node-v4.2.4-linux-armv6l.tar.gz
cd usr/local
sudo tar xzvf ~/node-v4.2.4-linux-armv6l.tar.gz --strip=1

This goes and gets node v4.2.4 using wget and puts it in the home folder, changes to usr/local where we want to put node so we can call it from the command line using "node", and then uncompresses the archive. The strip command is to stop it from being uncompresses into a folder called "node-v4.2.4-linux-armv6l.tar.gz".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.