LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2016, 11:16 PM   #1
Lop3
Member
 
Registered: Aug 2013
Posts: 48

Rep: Reputation: Disabled
Question Running Node.js in Debian Chroot on Android


This might be solved, see bottom of my 2nd post in this thread.

I've been playing around with running Debian on my Android phone. It's running in a Chroot using the lil'debi app from F-Droid.

After sorting out a few hiccups, now I'm stuck trying to run node.js.

I'll start by showing node running on my bananaPi which is also an ARM CPU also running an armv7l kernel and has the exact same node binary.

$ uname -a
Linux my-bpi 3.x.xxx-bananian #1 SMP PREEMPT xxx xxx x xx:xx:xx xxx xxxx armv7l GNU/Linux

$ ls -l node
-rwxr-xr-x 1 n n 22620686 Apr 5 23:46 node

~/.nvm/versions/node/v5.10.1/bin$ ./node --version
v5.10.1

$ md5sum node
70bd7821b1c45facab2ed5b3b4016434 node

$ sha512sum node
0844256fb5b469d180cc0cee05d0ffd572d03c97f09d7e031f8f4a248ade977420c431584bd6c8308f4963cb4f6f9a9494c0 96fe561fae00d9978fcb1fb47527

$ file --version
file-5.11

$ file node
node: ELF 32-bit LSB executable, ARM, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xbb627e23ee82b1e1579120eb4d87347e422b92b5, not stripped

interesting parts of /proc/cpuinfo
Processor : ARMv7 Processor rev 4 (v7l)
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt

================================

Now when I try this on my Android phone

$ uname -a
Linux my-android 3.x.xx-xx-xxxxxxxx #1 SMP PREEMPT xxx xxx xx xx:xx:xx xxx xxxx armv7l GNU/Linux

~/.nvm/versions/node/v5.10.1/bin$ ls -l node
-rwxr-xr-x. 1 n n 22620686 Apr 5 21:46 node

~/.nvm/versions/node/v5.10.1/bin$ ./node --version
bash: ./node: No such file or directory

$ md5sum node
70bd7821b1c45facab2ed5b3b4016434 node

$ sha512sum node
0844256fb5b469d180cc0cee05d0ffd572d03c97f09d7e031f8f4a248ade977420c431584bd6c8308f4963cb4f6f9a9494c0 96fe561fae00d9978fcb1fb47527

$ file --version
file-5.22

$ file node
node: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=237e62bbe1b182eeeb2091577e34874db5922b42, not stripped

interesting parts of /proc/cpuinfo
Processor : ARMv7 Processor rev 0 (v7l)
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls


========================================================

The BananaPi can run Node.js, and my android phone can't. Why? How can I get it working?

I see that my BananaPi has some features that my Android phone lacks: vfpv4 idiva idivt ... features regarding to arithmetic and numbers.

So I guess I've gotta compile node.js myself for this phone.

Why is it possible that debian jessie runs on both, yet node doesn't?
Is it that node.js was compiled assuming it would run on a CPU with more features than Jessie?

Last edited by Lop3; 04-11-2016 at 09:23 AM.
 
Old 04-11-2016, 07:39 AM   #2
Lop3
Member
 
Registered: Aug 2013
Posts: 48

Original Poster
Rep: Reputation: Disabled
I tried to build node.js 5.10.1 from source now (on one core) and after a few seconds it said:
g++ '-DV8_TARGET_ARCH_ARM' '-DCAN_USE_ARMV7_INSTRUCTIONS' '-DENABLE_DISASSEMBLER' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' -I../deps/v8 -pthread -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -mfpu=vfp -marm -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF

error: #error "Your CPU's ARM architecture is not supported yet"

Hopefully I've figured it out. I've been compiling on 4 cores for about 10 mins without any errors. (it's still busy)
https://github.com/nodejs/node/issues/6144

Update:
make[1]: Leaving directory '/home/n/node-v5.10.1/out' ln -fs out/Release/node node
~/node-v5.10.1$ cd out/Release/
$ ./node --version
v5.10.1


BOOM!

Last edited by Lop3; 04-11-2016 at 10:02 AM.
 
  


Reply

Tags
android, arm7, chroot, debian jessie, node.js


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trust CXT24 joystick doesn't get a device node in ubuntu 14.04 (chroot) M@rtijn Linux - Hardware 1 12-02-2015 08:20 AM
[SOLVED] Not able to access device node in chroot rajendrabani Linux - Software 3 10-27-2015 10:26 AM
rhel 2 node cluster: resources do not move to second node when node halted tapuhi Linux - Software 1 03-01-2015 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration