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 08:23 AM.
|