-
Notifications
You must be signed in to change notification settings - Fork 87
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
libnode.so for 32 bit is missing #4
Comments
do I have to build libnode.so or can I download it from somewhere? |
hmm, so node has an
so this seemed to work:
remember to include "--shared" so that it becomes a shared object |
It looks like 32-bit is not supported currently. |
It says only ARM64 |
@dominictarr did it compile? Would be super helpful if you could share the shared lib with me so I can package this up so we dont need android studio. Here is how I compiled in Termux otherwise Building Node.js as a shared library in Termux Install deps
Clone the node repo
Configure
Then in
And run Shared lib is |
oh yeah @mafintosh okay i'll try that. |
wow, node's git repo is 1.9gb! |
I managed to get it on my phone with 20 something mb to spare... not sure if this will work to be honest... |
Maybe you could use curl instead to skip the complete history, e.g.
|
Or use
|
@ralphtheninja I tried a shallow clone and it didn't work because first it clones it into .git then it checks it out which uses double. In the end what I did was local clone on my laptop to _node, then |
actually my phone has 20 gb available, but not within the linux container, and not sure how to fix that. |
I left it going overnight, and it ended with this error:
hmm, okay, so it can't find a library... liblog? is this part of node? I'm guessing that there are probably way more errors like this behind it |
@dominictarr Did you manage to build the 32bit library? I've been trying many different things with ndk build, but always run into errors somewhere. My latest try is even with a r17 ndk canary build: nodejs/node#14771 |
I didn't get passed that one. @mafintosh said he was gonna try on his rpi, but havn't heard back about that yet. |
I created a number of NodeJS issues on building for android. Hopefully will result in a solution. Meantime I am looking at J2V8 who have a very nice cross-compile build system PR based on Docker and Vagrant in the works and almost ready to be merged: eclipsesource/J2V8#327 PS Found this to be helpful script addition: # see # see https://github.com/nodejs/node/issues/3074
sed -i 's/#define HAVE_GETSERVBYPORT_R 1/#undef HAVE_GETSERVBYPORT_R/' deps/cares/config/android/ares_config.h
|
I spent yesterday compiling and trying different options. My findings are documented on stackoverflow: - Viable options to running NodeJS on Android (Aug 2017) |
I can make successful builds of Update: Probably not that simple. When running only the |
Hi - I managed to compile a version of node (from master - 9.0.0?) on a Samsung Galaxyy Tab A SM-T280 tablet running Android 5.1.1 Cortex A7 CPU - it is armeabi-v7a, compiled via termux. Here is my commit with the shared lib if anyone needs it. I followed @mafintosh's steps to create the node shared lib. bunsenbrowser/cordova-node-plugin@bb89690 I haven't been able to test it correctly - I think I also may need to make the other shared lib - libc++_shared.so - but haven't had a chance to figure out that process. Thanks a lot to @mafintosh for leading the way for node on android and to @aschrijver for his perseverence and extremely useful list of the many ways to try to compile node on android. Here are my notes - they are based on the steps @mafintosh made above:
|
@chrisekelley thank you, i am honoured :) sorry for the late response. i am building my new tech startup called innercircles i expect to pick up the thread sometime later and persevere some more, ha ha :) you keep rocking! |
I don't know about 32 bit lib builds, but I got the procedure for 64 bit ones working with only minimal changes to This presumes you have a real Android 64 device to do it on. I haven't tried emulators. |
Hi, any help for create libnode.so using the most recent node in android? Thanks This not work for my:
|
okay it looks like I got it installed, it says it built successfully, but when I tried to run it on my phone I got this error:
I'm trying to figure out where libnode.so comes from?
okay, a bit of searching led me here: nodejs/node#14158
gonna check that out...
btw, I changed line 14 of
app/build.gradle
toThe text was updated successfully, but these errors were encountered: