Quick Update:

I got nodejs built and running on android.

I went and tried the usual process from the Android NDK Cross-Compile Setup 
(libpng and freetype) 
<http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/>article.
 
Then quicky ran into a issue that nodes configure doesn't support the 
--host flag. Did a bit of searching and found out the newer versions 
(testing unstable) of nodejs have a configure script just for android. So I 
went and downloaded node-v0.11.9 from their website and tried some steps I 
saw other do with similar versions then ran into a error with node looking 
for bz2 module in python (which I guess NDK build doesn't have) fixed that 
and it worked.

Here's the build process:
#download nodejs
wget http://nodejs.org/dist/v0.11.9/node-v0.11.9.tar.gz


#export toolchain environment variable
export PLATFORM_PREFIX=/home/bobajeff/android-ext
export NDK_PATH=/home/bobajeff/Downloads/android-ndk-r10
export NDK_PLATFORM=android-9
export PATH=$PLATFORM_PREFIX/bin:$PATH

#make necessary alterations for toolchain
cd node-v0.11.9
# assuming your using the same version of NDK I am and have the patch for it
patch -p1 < node-v0.11.9-android-ndk-r10.diff

#build and install nodejs
source ./android-configure $NDK_PATH
make
make DESTDIR=/home/bobajeff/clangandroid install



this time it install to  a slightly different location but still contained 
in clangandroid. So to push it to android I did:

adt-bundle-linux-x86-20140702/sdk/platform-tools/adb push /home/bobajeff/
clangandroid/usr/local /data/data/jackpal.androidterm/shared_prefs



Then your ready to test the node with a helloworld

cd /data/data/jackpal.androidterm/shared_prefs
bin/node hello.js



And it works! Next it's finally time to see what I'm in for by trying to 
run Emscripten.

On Thursday, July 17, 2014 7:47:42 AM UTC-5, [email protected] wrote:
>
> I fascinated with the idea of using Android code editor/IDE (like 
> DroidEdit or AIDE) to program C++ applications while on a phone. 
>
> I was wondering if there is a way to run emscripten on Android. Can I 
> compile emscripten to android? Has anyone tried it?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -Naur node-v0.11.9/android-configure node-v0.11.9b/android-configure
--- node-v0.11.9/android-configure	2013-11-20 18:03:31.000000000 -0600
+++ node-v0.11.9b/android-configure	2014-08-26 15:47:53.801795000 -0500
@@ -3,7 +3,7 @@
 export TOOLCHAIN=$PWD/android-toolchain
 mkdir -p $TOOLCHAIN
 $1/build/tools/make-standalone-toolchain.sh \
-    --toolchain=arm-linux-androideabi-4.7 \
+    --toolchain=arm-linux-androideabi-4.6 \
     --arch=arm \
     --install-dir=$TOOLCHAIN \
     --platform=android-9
diff -Naur node-v0.11.9/deps/v8/tools/js2c.py node-v0.11.9b/deps/v8/tools/js2c.py
--- node-v0.11.9/deps/v8/tools/js2c.py	2013-11-20 18:03:31.000000000 -0600
+++ node-v0.11.9b/deps/v8/tools/js2c.py	2014-08-26 16:01:47.453082000 -0500
@@ -33,7 +33,7 @@
 
 import os, re, sys, string
 import jsmin
-import bz2
+#import bz2
 
 
 def ToCAsciiArray(lines):

Reply via email to