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

io.js armv7l build isn't working on the BeagleBone Black #349

Closed
julianduque opened this issue Jan 14, 2015 · 30 comments
Closed

io.js armv7l build isn't working on the BeagleBone Black #349

julianduque opened this issue Jan 14, 2015 · 30 comments
Labels
arm Issues and PRs related to the ARM platform. build Issues and PRs related to build files or the CI.

Comments

@julianduque
Copy link
Contributor

I'm using iojs-v1.0.0-nightly201501135ea716d895-linux-armv7l on Debian Wheezy (default image for BBB) and this comes with eglibc instead of glibc

root@beaglebone:~/iojs/bin# ./iojs 
./iojs: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by ./iojs)
./iojs: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.15' not found (required by ./iojs)

root@beaglebone:~/iojs/bin# lscpu 
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
@rvagg
Copy link
Member

rvagg commented Jan 14, 2015

ok, well that kind of sucks .. I'm building on an Ubuntu 14.04 base which has a lot of stuff updated

@Fishrock123
Copy link
Contributor

@rvagg @julianduque What's the status on this? I'm assuming this is still an issue.

@rvagg
Copy link
Member

rvagg commented Feb 7, 2015

yes, still an issue, I'd love to have a couple of BBB boards donated to the project so we can integrate them to CI and produce builds based on an older Linux distro on armv7

the only other resolution is for me to come up with a way to produce builds on the current armv7 box but linking to an older libc, which I started on but is not a simple afternoon job.

@Fishrock123 Fishrock123 added the build Issues and PRs related to build files or the CI. label Feb 7, 2015
@runvnc
Copy link

runvnc commented Feb 15, 2015

Maybe I should just not use Debian Wheezy? I recently ran into this glibc issue both on a BeagleBone Black and on my local Debian install on my rooted Android tablet. Should I switch to a different OS with more up-to-date libraries or something? If so, which Linux distribution that is ARM compatible works with io.js?

@fivdi
Copy link

fivdi commented Feb 15, 2015

I've being running the ARMv7 version of io.js 1.0.2 successfully on a BeagleBone Black using Ubuntu 14.4.1. This version of Ubuntu can be downloaded here http://elinux.org/BeagleBoardUbuntu. There are several files available for downloads. I'm using this one https://rcn-ee.net/rootfs/2015-01-06/ubuntu-14.04.1-console-armhf-2015-01-06.tar.xz

@rvagg
Copy link
Member

rvagg commented Feb 15, 2015

I think I have a way to fix this, http://cloud.online.net/ offer a Wheezy version on their ARMv7 machines, I just need to find some time to work on this and hook it up to CI. If it works, then the binaries should be compiled against a much older libc and in theory would work on the standard BBB distro (I think).

@jbergstroem
Copy link
Member

@rvagg Another solution could be creating a cross-compile host which would allow for more "exotic" flavours. Not sure how many we'd actually need, but it's not very hard to setup. I guess we can have it in mind as the build team progresses.

@rvagg
Copy link
Member

rvagg commented Feb 15, 2015

I'm not really keen on cross-compiling because it's very difficult to test

@runvnc
Copy link

runvnc commented Feb 16, 2015

@fivdi thanks.. I have found Ubuntu packages to generally be more up-to-date before. Was just going with Debian because I thought it might be a lighter-weight option but I keep running into issues with packages so I may go back to Ubuntu.

@julianduque
Copy link
Contributor Author

@rvagg I have one BBB Rev C here for you, will give it to you next week if that works

@rvagg
Copy link
Member

rvagg commented Feb 19, 2015

@julianduque aye! thanks

@julianduque
Copy link
Contributor Author

@rvagg talked with people from BeagleBoard and current image will be deprecated, will test binary with new one, also will work on getting io.js bundled on the new image.

@techniq
Copy link

techniq commented Mar 5, 2015

With my Vagrant VM setup for running Docker ARM containers, I noticed the issue using a Docker image based on Debian Wheezy, but not when using Debian Jessie. I know the current default BBB image is based on Wheezy, but it looks like the issue will go away once Jessie becomes standard.

@rvagg
Copy link
Member

rvagg commented Mar 5, 2015

once Jessie becomes standard

surely you jest! Wheezy will live longer than you and I ..

The priority for the @iojs/build team re ARMv7 is to start building releases on a Wheezy-based OS. I think the easiest path there is to just start using a Wheezy image on Online Labs.

@rvagg
Copy link
Member

rvagg commented Mar 5, 2015

nodejs/build#63

@techniq
Copy link

techniq commented Mar 5, 2015

😄

@rvagg
Copy link
Member

rvagg commented Mar 25, 2015

Update: I got a gcc-4.8 compiled for wheezy / armhf and am now using it on an ARMv7 machine running Wheezy machine on online.net: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/371/nodes=iojs-armv7-wheezy/console

Next step would be to switch releases over to this setup if this works OK.

I also have a bunch of new equipment to help me better set up the growing ARM cluster in my office so should have more machines coming on board soon.

/cc @iojs/build

@samkrew
Copy link

samkrew commented Apr 15, 2015

Any updates ?

@rvagg
Copy link
Member

rvagg commented Apr 15, 2015

some notes on this in nodejs/build#77 - summary: WIP

@rvagg
Copy link
Member

rvagg commented Jun 16, 2015

Hey folks, just letting you know that as of this build: https://iojs.org/download/nightly/v2.3.1-nightly2015061696165f9be2/ the nightlies are coming out of a Wheezy-based ARMv7 machine. I'd love to hear if they are solving the problems coming up here.

@fivdi
Copy link

fivdi commented Jun 16, 2015

It's definitely looking a lot better. Here's the output of a few commands on a BeagleBone Black using the latest Recommended Debian Wheezy 7.8 Image:

debian@beaglebone:~$ uname -a
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
debian@beaglebone:~$ 
debian@beaglebone:~$ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
debian@beaglebone:~$ 
debian@beaglebone:~$ iojs -v
v2.3.1-nightly2015061696165f9be2
debian@beaglebone:~$ 
debian@beaglebone:~$ node -v
v2.3.1-nightly2015061696165f9be2
debian@beaglebone:~$ 
debian@beaglebone:~$ node
> console.log("Hello, World!")
Hello, World!
undefined
> 
(^C again to quit)
> 
debian@beaglebone:~$ 

This is the first time I've worked with a nightly build and I haven't figured out how to get npm/gyp to install addons yet. For example, below is the output of npm install onoff. onoff depends on the addon epoll, and in order to compile it, gyp tries to download iojs-v2.3.1-nightly2015061696165f9be2.tar.gz from https://iojs.org/dist/v2.3.1-nightly2015061696165f9be2. It gets a 404 because it's not there. io.js doesn't have it's nightlies at https://iojs.org/dist/, it has them at https://iojs.org/download/nightly/. Maybe npm/gyp have an option for this, but I haven't found it yet.

debian@beaglebone:~/dev/onoff$ npm install onoff
npm WARN engine [email protected]: wanted: {"node":">=0.8.0"} (current: {"node":"2.3.1-nightly2015061696165f9be2","npm":"2.11.2"})
npm WARN engine [email protected]: wanted: {"node":">=0.8.0"} (current: {"node":"2.3.1-nightly2015061696165f9be2","npm":"2.11.2"})
\
> [email protected] install /home/debian/dev/onoff/node_modules/onoff/node_modules/epoll
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: 404 response dowloading https://iojs.org/dist/v2.3.1-nightly2015061696165f9be2/iojs-v2.3.1-nightly2015061696165f9be2.tar.gz
gyp ERR! stack     at Request.<anonymous> (/home/debian/opt/iojs-v2.3.1-nightly/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:251:14)
gyp ERR! stack     at emitOne (events.js:82:20)
gyp ERR! stack     at Request.emit (events.js:169:7)
gyp ERR! stack     at Request.onRequestResponse (/home/debian/opt/iojs-v2.3.1-nightly/lib/node_modules/npm/node_modules/request/request.js:1142:10)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at ClientRequest.emit (events.js:169:7)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient (_http_client.js:415:21)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:305:20)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "/home/debian/opt/iojs-v2.3.1-nightly/bin/iojs" "/home/debian/opt/iojs-v2.3.1-nightly/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/debian/dev/onoff/node_modules/onoff/node_modules/epoll
gyp ERR! node -v v2.3.1-nightly2015061696165f9be2
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Linux 3.8.13-bone70
npm ERR! argv "/home/debian/opt/iojs-v2.3.1-nightly/bin/iojs" "/home/debian/opt/iojs-v2.3.1-nightly/bin/npm" "install" "onoff"
npm ERR! node v2.3.1-nightly2015061696165f9be2
npm ERR! npm  v2.11.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the epoll package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls epoll
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/debian/dev/onoff/npm-debug.log
debian@beaglebone:~/dev/onoff$ 

@Fishrock123
Copy link
Contributor

@fivdi iirc node-gyp doesn't work with nightlies.

@rvagg
Copy link
Member

rvagg commented Jun 17, 2015

you can grab the source for the nightly and stick it in ~/.node-gyp/ with the appropriate name and it'll work, alternatively use --nodedir /path/to/source when using node-gyp or npm install and it should be fine

... working towards making this actually work without hackery but we're not there yet

@fivdi
Copy link

fivdi commented Jun 17, 2015

Yes, using --nodedir=/path/to/source works :)

One additional hack was needed. argv.push('--no-parallel') here had to be commented out to avoid the following error:

...
gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/home/debian/opt/iojs-v2.3.1-nightly/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.8.13-bone70
...

Whether or not it's a good idea to comment out this line is a different question.

Did a few tests and they all worked as expected 👍

@fivdi
Copy link

fivdi commented Jun 23, 2015

@rvagg the v2.3.1 nightlies are coming out of a Wheezy-based ARMv7 machine, but v2.3.1 release didn't. Will release builds come out of a Wheezy-based ARMv7 machine in the future?

@rvagg
Copy link
Member

rvagg commented Jun 24, 2015

only nightlies so far sorry, transition to releases is planned but not something I want to hurry for complicated reasons

@rvagg
Copy link
Member

rvagg commented Jul 1, 2015

new release job that we're now using for nightlies, next-nightlies, rcs and releases is using the new Wheezy-based ARMv7 build machine so expect v2.3.2 to have a binary that works on older linuxes.

@rvagg
Copy link
Member

rvagg commented Jul 2, 2015

v2.3.2 armv7 binary came off a wheezy machine so should fix this issue

@fivdi
Copy link

fivdi commented Jul 2, 2015

Nice Job :)

Other than the node-gyp workaround mentioned below, everything is looking good on the BeagleBone Black now:

debian@beaglebone:~$ iojs -v
v2.3.2
debian@beaglebone:~$ 
debian@beaglebone:~$ iojs
> Date()
'Thu Jul 02 2015 19:35:15 GMT+0000 (UTC)'
> 
(^C again to quit)
> 
debian@beaglebone:~$ 

Tried out a few modules and addons and everything functioned as expected.

argv.push('--no-parallel') here in node-gyp still needs to be commented out to avoid the error below when addons are installed. There's already a few issues over at node-gyp related to the topic, for example, nodejs/node-gyp#426, nodejs/node-gyp#434, and nodejs/node-gyp#651

debian@beaglebone:~/dev/lcd$ npm install lcd
-
> [email protected] install /home/debian/dev/lcd/node_modules/lcd/node_modules/onoff/node_modules/epoll
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/home/debian/opt/iojs-v2.3.2/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "/home/debian/opt/iojs-v2.3.2/bin/iojs" "/home/debian/opt/iojs-v2.3.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/debian/dev/lcd/node_modules/lcd/node_modules/onoff/node_modules/epoll
gyp ERR! node -v v2.3.2
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Linux 3.8.13-bone70
npm ERR! argv "/home/debian/opt/iojs-v2.3.2/bin/iojs" "/home/debian/opt/iojs-v2.3.2/bin/npm" "install" "lcd"
npm ERR! node v2.3.2
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the epoll package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls epoll
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/debian/dev/lcd/npm-debug.log
debian@beaglebone:~/dev/lcd$ 

@brendanashworth brendanashworth added the arm Issues and PRs related to the ARM platform. label Jul 13, 2015
@brendanashworth
Copy link
Contributor

Should this issue be closed or should it be kept open for the node-gyp issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm Issues and PRs related to the ARM platform. build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

9 participants