prebuilt for ARM devices... [$65] #1151
bmatusiak posted onGitHub
there are 2 common arm build as i can see
one is armel and the other is armhf
it would be cool if there was a ARM prebuilt binary
If there are others who would like to see ARM prebuilt binaries add a +1 to this issue and hopefully maintainer will deliver
<bountysource-plugin>
There is a $65 open bounty on this issue. Add to the bounty at Bountysource. </bountysource-plugin>
Related: #193, #437.
+1
+1 Would be great for digital signage.
+1
+1
+1
+1
Does anyone know the current steps to doing this?
Yeah something to "dd" on the ssd card ;) and paf node-webkit on rpi
Awesome ^^
Would be really nice! Want to run it on a Raspberry Pi (in fullscreen :-)).
@milanvanschaik but you can do this with chromium-browser in kiosk mode :-)
@cranic, "chromium-browser" does not support nodejs plugins/modules automatically
+1
Workaround so far is chromium-browser with browserified packages (browser specific shims.) This is undesirable of course. Anyone who needs a solution now might benefit from this though.
What about this? Seems like possible but we simply need a 'prebuild' version? https://github.com/rogerwang/node-webkit/issues/193#issuecomment-21974887
I was misunderstanding. I simply thought that I can do npm node-webkit on Raspberry Pi when the binary is available. During trying to build node-webkit with latest deps packages, I learnt that it was not easy to maintain multiple arm binaries. I will withdraw my +1 now. -1 ;-) Note: Actualy, I could not build webkit on Raspberry pi (w/DISTCC) with latest deps. The build is terminated by VFP related error on merging V8. I do not know it is the cause but I found "Removed ARM support for VFP2." on V8 3.18.0 release note.
+1. None of the instructional gists for compiling my own version seem to work. I'm dying for a prebuilt binary for arm.
+1
+1
+2
On Mon, Jul 21, 2014 at 1:48 PM, Quinton Pike notifications@github.com wrote:
+1
— Reply to this email directly or view it on GitHub https://github.com/rogerwang/node-webkit/issues/1151#issuecomment-49663288 .
+1
+1
We are at 14 votes, so please vote!
+1
+1
+1
+1
+5
+1
+1
+1
+1
I am reposting my issue here in the thread just in case if someone has any information about this problem.
Hi all, I have been trying to compile the latest version of nodewebkit for armhf to be used on a beaglebone black. As beaglebone black is not really suited for the compilation, i got a freescale imx6.quad wandboard and am using Ubuntu14.04 from armhf to compile the nodewebkit. I have followed all the instruction from different gist available like https://gist.github.com/xdenser/ba4454f79d4438d7f2f2 https://gist.github.com/albi90/6135922 and have been able to compile the source, however, the linker is failing with two different message, first was 'memory exhausted'. I activated 4 GB of swap and it still kept on failing regardless.
Then I based on chromium's fast build suggestion, I switched to shared library compilation, again compilation is fine, however, the linker now fails with following error,
/usr/bin/ld: obj/content/nw/src/api/shortcut/nw_lib.global_shortcut_listener_x11.o: undefined reference to symbol '_ZN2ui24XKeysymForWindowsKeyCodeENS_12KeyboardCodeEb' lib//libevents_base.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
I checked to see if libevents_base.so exists in the lib folder or not and its there also, the file is included in the linker argument list, so I any help if resolving this problem would be really helpful.
+1
+1 over a year later and i still need
+1
+1
+1
+1
+1
+1
+1
@rogerwang I manage to make an arm build, using this guide https://code.google.com/p/chromium/wiki/LinuxChromiumArm if i want to support this on live build, how I customize the build machine ?
I've an nw12 armhf build https://github.com/jtg-gg/node-webkit/releases/download/nw-v0.12.0/nwjs-v0.12.0-linux-arm.tar.gz tested on Raspberry Pi 2
@jtg-gg Amazing job! Thanks!
@jtg-gg Many Thanks! Can you share more detailed recipe how to make this build? It would be awesome.
I see some compatibility commits in your fork, is it enough to build for ARM? (I don't have close at hand environment to check).
@jtg-gg Thank you very much! Works great!
One Question because i want to play H.264 / MP4 Files - is there a suitable ffmpegsumo.so file? Or must it be compiled together?
@rafalgalka I compiled it using Ubuntu 14.04 LTS from my x86 PC I follow the cross compilation method https://code.google.com/p/chromium/wiki/LinuxChromiumArm
then I need to modify the zlib.gyp, because it refer to x86 assembly then the default rootfs/sysroot from Google is actually fine, but nwjs is using libnotify, hence I need to add this library package into the sysroot. then after that you can compile
but to distribute, I need to modify the nw.gypi, since the symbol dump + stripping doesn't work on x86. I strip the symbol using the raspberry pi (if you are not stripping the symbol, the executable is 1 GB in size)
@daCuJo I am not sure about the custom ffmpegsumo.so with h.264/mp4 capability the default ffmpegsumo is supplied with the build
@jtg-gg I tried to run your build using Raspbian with LXDE with no success. What is the environment you use to run this?
Also I tested the build of #193 and I can run, but it's too old version.
@eduardodoria the build only works with raspberry 2
@jtg-gg Nice Work here, It's up and running smoothly on my pi2. Do you know if it is hardware accelerated ?? I don't know how to test if it is....
@shyne99 try this "chrome://gpu/"
@jtg-gg Thank you! It works fine in raspberry pi 2.
@jtg-gg Tried out chrome://gpu.... Seems that it's not using Hardware acceleration at all... It works really well, but only in software acceleration....
Somebody here know if it can be run HWmode ?? And if not, why ??
+1, would be awesome if this would be officially available as prebuilt variants.
@shyne99 Install chromium on your Pi using apt-get and see if GPU support is enabled. If I remember correctly Chromium did not have proper HTML5 support with Raspberry PI a year ago, this included audio tags, I used iceweasel instead at the time. I don't recall GPU being supported either.
If Chromium doesn't support the GPU then I doubt nwjs would be able to either.
@mscreenie Chromium is hardware accelerated (just tested). The Gpu is recognized in chromium but not in nw.js.
That's the errors that I have on startup of nw.js :
[3090:0327/150247:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with$ [3090:0327/150247:ERROR:browser_main_loop.cc(216)] GLib-GObject: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised [3090:0327/150247:ERROR:browser_main_loop.cc(216)] GLib-GObject: Attempt to add property GtkSettings::gtk-entry-select-on-focus after class was initialised [3090:0327/150247:ERROR:browser_main_loop.cc(216)] GLib-GObject: Attempt to add property GtkSettings::gtk-entry-password-hint-timeout after class was initialised [3090:0327/150247:INFO:audio_manager_pulse.cc(258)] Failed to connect to the context. Error: Connection refused failed to create drawable [3108:0327/150247:ERROR:gl_surface_glx.cc(657)] glXCreatePbuffer failed. [3108:0327/150247:ERROR:gpu_info_collector.cc(27)] gfx::GLContext::CreateOffscreenGLSurface failed [3108:0327/150247:ERROR:gpu_info_collector.cc(89)] Could not create surface for info collection. [3108:0327/150247:ERROR:gpu_main.cc(410)] gpu::CollectGraphicsInfo failed (fatal). [3108:0327/150247:ERROR:gpu_child_thread.cc(146)] Exiting GPU process due to errors during initialization
Like I said NW and everything is working fine except the HW rendering system....
And it seems not to be a so hard issue to fix here ...
@jtg-gg : If you have any clue, you are the doctor here ^^
@jtg-gg thanks. You'll need to install a buildbot slave and connect it to the master in our infrastructure. Will send you the detail once you have your slave machine ready.
Ni
This thread is really interesting I plan to use a vab820 (armv7l) to d'un a small nwjs production but this is really a pain to find a binary for ubuntu armv7l :(
@rogerwang sorry, I don't have an slave machine 😞
What hardware is required for a slave machine, just a raspberry pi 2?
@chrisJohn404 Or just an emulated ARM server probably.
@chrisJohn404 I build it using 64bit Linux Ubuntu x64 CPU. building with raspberry will be slow and might be impossible, the linker needs > 2 GB memory
@jtg-gg Do you have a gist, or any quick instructions on how to do so. Tried on the same configuration as yours, but was not able to suceed...
2015-04-21 4:17 GMT+02:00 jtg-gg notifications@github.com:
@chrisJohn404 https://github.com/chrisJohn404 I build it using 64bit Linux Ubuntu x64 CPU. building with raspberry will be slow and might be impossible, the linker needs > 2 GB memory
— Reply to this email directly or view it on GitHub https://github.com/nwjs/nw.js/issues/1151#issuecomment-94614878.
TOUMI Mehdi : clldinf@gmail.com
@shyne99 what is the error message? I need to modify chrome and node webkit, take a look at my commits https://github.com/jtg-gg/chromium.src/commit/e22f5a4951b86c6a427ea6a839a5fbb7e9fafe13 https://github.com/jtg-gg/node-webkit/commit/a51d4d022e9e3754dc33958f0c0ce2fe20845e56
+1 this is awesome, i've been tinkering with and RPI app the last couple of weeks, and i really need UI transparency so this is great to see!
I don't think that it will help if i post my errors... I am new to the cross compiling things(nwjs is the first program that i can't actually build from the raspberry itself) and I think that the problem came from me and not the actual code... I think i forgot things...
Wanted to give it a try, to enable hardware accelereration since chromium have it when i install it from the packages, even with my low level. I failed here... UPDATE : I'll try it again this week on debian. Where did you find the Pi2 sysroot btw ??
+1
Yay I got it working too! Try the following steps:
- Download on you pc: https://github.com/jtg-gg/node-webkit/releases/download/nw-v0.12.0/nwjs-v0.12.0-linux-arm.tar.gz
npm install --ignore-scripts nw
On the Rpi2- transfer the extracted
nwjs-v0.12.0-linux-arm.tar.gz
's content to the Rpi2 with FileZilla inside the foldernode_modules/nw/nwjs/
- Here make the
nw
file of 50MB+ Read, Write,Excecute - Have fun! =D
Does anybody tried to build with hardware accelerated?
@eduardodoria Hi do you mean hardware accelerated rendering of html objects? This is something you can trigger using css3 properties translate3d but there are more (any maybe better ones). If you mean using your gpu to calculate .js code or something like: WebGL / OpenGL ES you should write that code yourself :) Just like the css3.
@hawkerboy7 The current build doesn't have any GPU acceleration at all. There is no way to achieve acceleration through CSS3 or anything else if the binary doesn't support it.
@PTS93 Ahh alright too bad.. Didn't know the binary didn't support that yet. Thanks!
Hello
@jtg-gg , if you have the time, can you try to rebuild nwjs for the pi2 again. The 0.13.0 seeml to use a HW accelerated version of chromium. Maybe the HW feature will work with this version.
I tried myself to cross compil it without success (crappy connection, and my average knowledge don't help ... ).
Thanks a lot if you can ( and even if you not^^)
+100
+1
@jtg-gg I've been able to pull in your commits and build for ARM successfully. :+1:
One thing I couldn't work into the toolchain was to add libnotify
into the chromium build sysroot. Gclient insisted on downloading the pre-created image from Google Cloud instead of building a new sysroot with the new libnotify
ARMHF packages declared in your commit.
So I've been unpackaging the debs directly into the sysroot after it un-packs the Google image:
# PATCH SYSROOT IMAGE WITH LIBNOTIFY ARM PACKAGES
rm -rf /tmp/libnotify
mkdir /tmp/libnotify
cd /tmp/libnotify
wget http://mirror-host/main/libn/libnotify/libnotify4_0.7.5-1_armhf.deb
wget http://mirror-host/main/libn/libnotify/libnotify-dev_0.7.5-1_armhf.deb
dpkg -x libnotify4_0.7.5-1_armhf.deb /tmp/libnotify
dpkg -x libnotify-dev_0.7.5-1_armhf.deb /tmp/libnotify
cp -r /tmp/libnotify/usr/* /opt/nwjs_arm_x11/src/chrome/installer/linux/debian_wheezy_arm-sysroot/usr/
Do you have any docs or recipe you could share for creating the sysroot in the normal gclient toolchain?
Thanks!
hi @pztrick gclient will download pre-created sysroot by google, which does not contain libnotify you can execute 'sysroot-creator-wheezy.sh' to automatically download the libnotify packages my workflow is:
- run gclient
- run the 'sysroot-creator-wheezy.sh' (in case the sysroot is replaced by gclient)
- build using ninja
@shyne99, @eduardodoria: If you have hw accelerated chromium on your arm device replace the libffmpegsumo.so file from nw.js with the libffmpegsumo.so file from the chromium installation. It worked for me, at least now I have hw accelerated webGL
EDIT: here you can download the version I Use: https://git.popcorntime.io/laslaul/popcorn-time-building-guide-armv7/blob/master/nwjs-v0.12.0-linux-arm.tar.gz
@LeonardLaszlo I tried what you said but no success. When you type "chrome://gpu" can you see "Hardware accelerated"? In Chromium is Hardware accelerated, but in NW isn't. Could you share the libffmpegsumo.so you are using?
chrome://gpu address was available only on chromium last time I checked. Try to open a WebGL project with nw.js and you will see the difference between hw accelerated WebGL and not available WebGL. An example of WebGL project: http://oos.moxiecode.com/js_webgl/md5_test/ The libffmpegsumo.so I am using is in the tar.gz archive I linked in the previous post.
Hi @jtg-gg !
What parameters do you use for running the 'sysroot-creator-wheezy.sh'. As I see some mode and arguments should be specified.
@LeonardLaszlo
I believe you run ./sysroot-creator-wheezy.sh UpdatePackageListsARM
followed by BuildSysrootARM tarball.tar
.
I already tweaked/refactored the script to run automatedly and build for jessie target (instead of wheezy) so may be missing a step. There were some extra apt packages, etc, I added. :) Cheers!
@LeonardLaszlo the https://git.popcorntime.io/laslaul/popcorn-time-building-guide-armv7/blob/master/nwjs-v0.12.0-linux-arm.tar.gz link is broken, it seems the repo has been deleted :/, could you provide another link? Thank you so much
@adriengibrat my repository was deleted without any notification. Sorry for that!
I moved the project to: https://github.com/LeonardLaszlo/popcorn-time-building-guide-armv7 You will find the file you need there! Have fun!
Hello! I would like to build nw.js v0.12.3 on my Odroid-XU4 with Ubuntu 15.04 (20150710). Can anyone help me with that?
+1
@elusive I managed to cross compile nw.js for armv7. My binaries are available on the follwing address: https://github.com/LeonardLaszlo/nw.js-armv7-binaries
Thanks for your help. I am hoping for an arm build for node 4x support eventually. I have also been able to cross compile for up to the 0.12.2 release Jg
On Wednesday, December 2, 2015, Leonard László notifications@github.com wrote:
@elusive https://github.com/elusive I managed to cross compile nw.js for armv7. My binaries are available on the follwing address: https://github.com/LeonardLaszlo/nw.js-armv7-binaries
— Reply to this email directly or view it on GitHub https://github.com/nwjs/nw.js/issues/1151#issuecomment-161470664.
john gilliland blog http://johngilliland.wordpress.com | github https://github.com/elusive | l/in http://www.linkedin.com/in/johncgilliland/ | pgp https://db.tt/HckmD6LN
@LeonardLaszlo Is GPU acceleration enabled on those binaries?
good question. when I said i did it that wasn't exactly true. me and my buddy did it, which means I watched him do it and then checked on it till it was done. I will ask him.
On Thu, Dec 3, 2015 at 8:03 AM, PTS93 notifications@github.com wrote:
@LeonardLaszlo https://github.com/LeonardLaszlo Is GPU acceleration enabled on those binaries?
— Reply to this email directly or view it on GitHub https://github.com/nwjs/nw.js/issues/1151#issuecomment-161630562.
john gilliland blog http://johngilliland.wordpress.com | github https://github.com/elusive | l/in http://www.linkedin.com/in/johncgilliland/ | pgp https://db.tt/HckmD6LN
on my odroid devices I use "--use-gl=egl" flag to enable GPU acceleration.
very nice, thanks. if you don't mind I am going to let my co-worker and friend continue this discussion. we were just talking the other day about him having trouble getting the switches for gpu accell to work so you might really be able to help us out. Thanks so much Leonard. his name is zak.
cheers, John
On Thu, Dec 3, 2015 at 10:17 AM, Leonard László notifications@github.com wrote:
on my odroid devices I use "--use-gl=egl" flag to enable GPU acceleration.
— Reply to this email directly or view it on GitHub https://github.com/nwjs/nw.js/issues/1151#issuecomment-161671569.
john gilliland blog http://johngilliland.wordpress.com | github https://github.com/elusive | l/in http://www.linkedin.com/in/johncgilliland/ | pgp https://db.tt/HckmD6LN
I was also able to compile binaries for version 0.12.2 using the guide you a couple others previously linked along with some other useful information pulled from the far reaches of the web. I have compiled a document containing links to various articles and pages I found useful: https://docs.google.com/document/d/12KbgmEXcWI-TuRRWfy_6d_onhDG0MBt9yfbPJxqzJ1o/edit?usp=sharing I used a an Ubuntu VM using the latest LTS version of Ubuntu (Ubuntu 14.04.3 LTS).
That said however, the one thing I have to failed to get working is gpu acceleration. One theory I have is that gpu acceleration is not available due to how I am interacting with nwjs on my raspberry pi 2. I am using an x11 forward via an ssh terminal initiated from my desktop. My gut says this might prevent gpu acceleration from appearing as "available" no matter what I do. Can you explain in what kind environment you are running these binaries and on exactly what kind of hardware? Are you using a mouse and keyboard/monitor to interact with the hardware or a remote ssh terminal? @LeonardLaszlo, I really appreciate your input!
Thanks in advance, -D-
The "--use-gl=egl" flag should be used when you execute your app not when you compile nw.js. For exapmple: ./nw index.html --use-gl=egl
.
I am using a Odroid-U3 device with OpenGLES enabled.
To find out if you have OpenGLES enabled on your device run glmark-es2
in terminal.
It should work on RPi2 too!
Thanks for the quick reply. My apologies for misunderstanding. I was able to run the binaries using the flag --use-gl=egl. It would appear that WebGL support on the pi is non-existant from what I read. It would also appear to be an issue with the current implementation of x11 (wayland here I come!).
https://www.raspberrypi.org/forums/viewtopic.php?f=67&t=43994 https://www.reddit.com/r/raspberry_pi/comments/37bccv/help_enable_hardware_acceleration_raspberry_pi_2/
Thanks again for the clarification, -D-
It seems that the flag does indeed not make a difference on the Pi2. I tried some CSS animations and they were running badly either way.
https://github.com/jtg-gg/node-webkit/releases/download/nw-v0.12.0/nwjs-v0.12.0-linux-arm.tar.gz => i has been download it but not work for me :( i'm using rasberry pi ARMV6
That's because the build is for ARMv7 architecture
so it's not working for ARMV6 ? :(
Because ARMv6 and ARMv7 are different architectures with different instruction sets it won't work!
ok thanks for your info .. @LeonardLaszlo Do you have link for nwjs support in ARMv6 ?
I don't have links for that.
I just ordered my first pi (3 model b) and am very much hoping I can get this (Or better yet atom electron) running on it. The wondrous things I could more easily accomplish...
I was able to get it working with earlier version. If you have any luck with latest or with electronic. Let me know. Thanks and good luck!
Get Outlook for mobile
On Tue, Apr 26, 2016 at 3:35 AM -0700, "TomAshley303" notifications@github.com wrote:
I just ordered my first pi (3 model b) and am very much hoping I can get this (Or better yet atom electron) running on it. The wondrous things I could more easily accomplish...
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
@jonwwilkes asked me to post how to build for armv7, so here there are:
this is a cross compilation, I am using Ubuntu 14.04 LTS, 64 bit, 8 GB Ram
apply my commits (on top of Roger Wang's nw14) chrome src: https://github.com/jtg-gg/chromium.src/commit/854341a content/nw: https://github.com/jtg-gg/node-webkit/commit/72ecc3aaee24060c0fe37e191de3e47684484e5d https://github.com/jtg-gg/node-webkit/commit/47cacc66370c692d593fb4cd63274db3f1e24459
then
export GYP_CROSSCOMPILE=1
export GYP_DEFINES="target_arch=arm arm_float_abi=hard nwjs_sdk=1 disable_nacl=0"
export GYP_GENERATOR_FLAGS=output_dir=out_arm
gclient runhooks
ninja -C out_arm/Release dist
if you see errors, you might want to try these (these steps suppose to be handled by gclient runhooks):
The install-build-deps script can be used to install all the compiler and library dependencies directly from Ubuntu:
build/install-build-deps.sh --arm
install sysroot for arm, might be automated by gclient runhooks
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm
@jtg-gg , I have been using @LeonardLaszlo 's v0.12.2 release. It has helped solved the problem with videos. Thanks to @LeonardLaszlo. But now a new problem has come up. Calls to Google apis throw a SSL_PROTOCOL_ERR. Using relevant chromium arguments does not help. On a different thread, it has been mentioned that this is fixed in non-ARM versions from v0.12.3.
Hope you or someone has been able to build a 0.12.3 or higher version for Ubuntu 14.04. If yes, would be great if a link is provided.
@vishyapps I managed to build v0.14.6 and v0.15.1, but I was not able to try it yet.
Could you confirm if it works?
Hi @LeonardLaszlo. I tried the v0.14.6 builds on Odroid XU4 and Odroid C1 running Ubuntu 14.04. NW file was showing as a "shared library" instead of an executable. Unable to work with them.
I am a newbie to using Node Webkit. So, I might be missing something. Earlier builds (0.12.0 & 0.12.2) were not sdk releases. All 14.6 build on your repo are sdk versions. Maybe SDK versions have to be used differently. Please let me know if so.
I see that 0.15.1 - no sdk has been added. Will try it and confirm.
@vishyapps After you extract the archive copy the files from the lib directory to /usr/lib. This way v0.15.1 and v0.14.6 works on my XU4 device with ubuntu 15.04.
Let me know if you succeeded!
@LeonardLaszlo,
Thanks for the help. copying files to /usr/lib worked. Videos play and google api errors also resolved.
But now a new problem has cropped up. I use the node module request https://github.com/request/request to download images from AWS s3 bucket and also from social media apis. Facebook's graph api, and AWS S3 urls, both of which are with HTTPS, fail with "error: write EPROTO". twitter api which return images on http protocol works.
error Error: 140290117064512:error:1006706B:elliptic curve routines:ec_GFp_simple_oct2point:point is not on curve:../deps/openssl/openssl/crypto/ec/ecp_oct.c:421:
The same issue was posted on Github in 2014 under npm: https://github.com/npm/npm/issues/5230 . Unfortunately the person who solved it did not post a solution.
My search on SO and github says that this is an error due to OpenSSL
There is a more recent thread with OpenSSL error here : https://github.com/nodejs/node/issues/3692. But this is not the same error i am getting.
Strangely, an ajax request to https url works.
It will be great if you could help with the openssl module.
You are welcome! Unfortunately, I cannot help with that. I am not a developer of this project! I only managed to build it for my armv7 device!
I suggest you to ask help from the developers on other issue.
BTW, do you have this error on other architectures too?
@LeonardLaszlo, I have tested on Mac - no errors. Due to limitations on "ARM" architecture, I ordered an x86 board. Was able to load official NWJS v0.15.1 from nwjs.io. Works well. No errors. If anyone is interested, this is the board I got: http://www.jaguarboard.org/. It is slightly bigger than Odroid.
Thanks for your help.
i think we need ARM, i been working with electron, and they have a ARM build, unfortunaly only works with ARM7, and many of the boards of raspi b, a, and compute modules still are ARM6, would be great to have both binaries
@LeonardLaszlo Thanks for the binaries!
One question: why does libffmpeg.so need to be installed to /usr/lib ? The rpath for the nw binary shows $ORIGIN/lib, so it seems like it should work without installing to a system directory.
Roger's binaries all work without installing ffmpeg lib to a system directory, and I depend on that for my app. Is there any way to build the arm binaries so that nw can run without installing to system dirs?
@jonwwilkes @vishyapps:
When you run nw, the application tries to load some dependecies (shared objects, a.k.a. lib*.so files). By linux conventions shared objects are stored in some special paths in you filesystem. One of this paths is /usr/lib.
If you don't want to store nw.js shared objects there, as an alternative, you can add the library where you store the shared objects to LD_LIBRARY_PATH environment variable, as shown below:
export LD_LIBRARY_PATH=/path/to/nwjs/nwjs-v0.15.1-linux-arm/lib:$LD_LIBRARY_PATH
Now if you run nw as shown below it should work with no pproblems:
./nw --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2
EDIT:
If you don't want to export the environment variable everytime you reboot you device you can add the export line to the end of .bashrc
file.
EDIT2: I don't know why rpath is not working.
@LeonardLaszlo It just makes it a lot easier to develop, test and install if I can get the nw binary to find the libraries in ./lib. It's my understanding that is what $ORIGIN/lib is for, so I'm a bit surprised nw cannot find the libs there.
If anyone can figure that out it would be much appreciated.
And again, many thanks for publishing these binaries!
@jonwwilkes Probably -rpath,'$ORIGIN/lib' argument is missing somewhere in the building scripts. I just used the building tutorial posted by jtg-gg to build nw.js, so I don't understand the bulding process deeply. That is why I cannot help with that!
If you find where is this argument is missing I will gladly rebuild the binaries!
@LeonardLaszlo The weird thing is that '$ORIGIN/lib' is already present. Try chrpath -l nw
and you can see it exists. That should allow nw to search in ./lib, yet it doesn't for some reason.
@jtg-gg what do you think about this?
Maybe obvious but have you tested if the permissions of your ./lib directory are correct? Maybe the binary is unable to access it.
On 15 Jun 2016 19:09, at 19:09, "Leonard László" notifications@github.com wrote:
@jtg-gg what do you think about this?
You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/nwjs/nw.js/issues/1151#issuecomment-226253868
drwxrwxr-x 2 odroid odroid 4096 Jun 1 16:14 .
drwxrwxr-x 4 odroid odroid 4096 Jun 1 16:14 ..
-rwxrwxr-x 1 odroid odroid 941988 Jun 1 16:14 libffmpeg.so
-rwxrwxr-x 1 odroid odroid 3321224 Jun 1 16:14 libnode.so
-rwxrwxr-x 1 odroid odroid 71018864 Jun 1 16:14 libnw.so
... and I run nw as user odroid
@LeonardLaszlo in my build, the libffmpeg.so is located at lib folder together with libnode and libnw I have no problem using it, hmm whats the problem ?
is it because you compile the ffmpeg separately ? and you copy manually to lib folder ?
update
ok after reading more comments, looks like the issue is all the .so files need to be moved to usr/lib? hmm I don't have any arm7 board with me. I test the build using qemu arm emulator which runs on debian, and the .so files can be loaded directly from the nwjs lib folder
The .so files above were located in the lib directory after the build and I didn't compile ffmpeg separetly.
Any more info on getting this to work without installing to /usr/lib? If I can get it to read from ./libs I'll be able to ship an alpha release of my software for RPI.
I didn't manage to figure out what's wrong :-/
+1
Hello,
I have just created a repository with the node-webkit binary port that runs on Raspbian, tested and working on Raspberry Pi 1 and Raspberry Pi 3 so it is ARMv6 and ARMv7 compatible.
Here you can check it: https://github.com/jalbam/nwjs_rpi
For the lazy people on this thread:
the nw.js v0.14.6 and v0.15.1 binaries you can find in my repo work just fine on my Odroid-XU4 with Ubuntu 16, you only need to export to LD_LIBRARY_PATH environment variable the path of the lib directory.
As an alternative you can copy the shared objects to /usr/lib.
If you don't want to store nw.js shared objects there, as an alternative, you can add the library where you store the shared objects to LD_LIBRARY_PATH environment variable, as shown below: export LD_LIBRARY_PATH=/path/to/nwjs/nwjs-v0.15.1-linux-arm/lib:$LD_LIBRARY_PATH
Now if you run nw as shown below it should work with no pproblems: ./nw --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2
If you don't want to export the environment variable everytime you reboot you device you can add the export line to the end of .bashrc file.
I figured out what's causing $ORIGIN/libs to not get searched-- the nw binary must use RPATH instead of RUNPATH.
Unfortunately:
- After reading the ELF docs, I have absolutely no idea why RUNPATH wouldn't get searched in this circumstance. (I see no docs that explain how a RUNPATH would fail to be searched in the situation where the library isn't found anywhere else.)
- the
chrpath
tool only allows to change an RPATH to a RUNPATH, but not the other way around.
So it's quite a sad combination-- the ELF docs are incomprehensible, and the only widespread tool to make modest adjustments is so limited as to be useless. :(
So... I downloaded the source for chrpath
and edited the code for the stupid "--convert" flag to make it convert from DT_RUNPATH to DT_RPATH. Compiled it and ran my bastardized chrpath --unconvert ./nw
on the rpi. It worked-- nw found the necessary libs inside $ORIGIN/lib just as it should, and booted up just fine.
This is all really unfortunate, as DT_RUNPATH is obviously a better setting-- lower precedence than sys paths and the relevant env var. Unfortunately DT_RUNPATH doesn't seem to work at all (on rpi or Debian i386). I suppose I could investigate further with ELF and linker gurus, but I'm afraid I'd lose my sanity if I went down that rabbit hole...
@jtg-gg When I try to build v0.15.x with your patches I get the error bellow. Any Idea Why?
leonard@leonard-VirtualBox:/media/leonard/data/nwjs2/src$ ninja -C out_arm/Release dist
ninja: Entering directory `out_arm/Release'
[21980/21987] ACTION Dumping breakpad symbols to "nw.breakpad.arm"
bb
aa
[21981/21987] ACTION Dumping breakpad symbols to "node.so.breakpad.arm"
bb
aa
[21982/21987] ACTION Dumping breakpad symbols to "ffmpeg.so.breakpad.arm"
bb
aa
[21983/21987] ACTION Dumping breakpad symbols to "nacl_helper.breakpad.arm"
bb
aa
[21984/21987] ACTION Dumping breakpad symbols to "nw.so.breakpad.arm"
FAILED: nw.so.breakpad.arm
cd ../../chrome; ../content/nw/tools/dump_app_syms ../out_arm/Release/dump_syms arm-linux-gnueabihf-strip ../out_arm/Release/lib/libnw.so ../out_arm/Release/nw.so.breakpad.arm
bb
Killed
ninja: build stopped: subcommand failed.
@LeonardLaszlo might be not enough ram ? you can see the memory usage using system monitor ? I would recommend 8 - 10 gb RAM, 8 was enough, but on recent build I need 10 gb
@jtg-gg Because the building process take a lot of time I was never near the computer when this error came up! :-/
I'll try to increase the RAM. Thank you!
It worked! But when I build v0.17.x I get another error:
leonard@leonard-VirtualBox:/media/leonard/seagate/nwjs/src$ ninja -C out_arm/Release dist
ninja: Entering directory `out_arm/Release'
ninja: error: 'lib/libffmpeg.so', needed by 'ffmpeg.so.breakpad.arm', missing and no known rule to make it
@LeonardLaszlo looks like you are still using gyp nw17 needs to use gn build system
ok. thanks!
@jonwwilkes @vishyapps The "copying files to /usr/lib" (LD_LIBRARY_PATH) issue was solved in v0.17.x.
You can find building tutorials and the binaries (under the releases menu) in my nw.js-armv7-binaries repository
@LeonardLaszlo forgive me if this is a silly question... but... is there a way to run this on raspbian jessie lite? the goal is to run nw at startup or after login...
been searching over the internet but can't find a solution... I always end up with gtk cannot open display.. thanks...
As far as I know you need a desktop environment to run applications with graphical user interface.
If your application doesn't have a gui what you want is Node.js
@vishyapps @jtg-gg
I think this error:
error Error: 140290117064512:error:1006706B:elliptic curve routines:ec_GFp_simple_oct2point:point is not on curve:../deps/openssl/openssl/crypto/ec/ecp_oct.c:421:
might be produced by this openSSL patch: https://github.com/jtg-gg/node-webkit/commit/91fc077bbdfeb01804d61b7e45a2a2b3898f4ceb
@LeonardLaszlo hmm not sure, that patch just a compile error fixes looks like it crashes on other file anyway, I am not using arm platform anymore, so don't have resources to debug it
Is there a functional build I can use?
@LeonardLaszlo I am running my Raspberry Pi image in qemu:
qemu-system-arm \
-kernel qemu-rpi-kernel/kernel-qemu-4.4.13-jessie \
-cpu arm1176 \
-m 256 \
-M versatilepb \
-serial stdio \
-append "root=/dev/sda2 rootfstype=ext4 rw" \
-net nic \
-net user,hostfwd=tcp::10022-:22 \
-hda $1
But when I start nwjs from the link, it crashes with Illegal instruction
message.
Comform to https://www.arm.com/products/processors/classic/arm11/arm1176.php?tab=Specifications the architecture of the arm1176 processor is ARMv6 .
The binaries I linked are built for ARMv7 architecture (check the title of the repository). That is the reason why you get Illegal instruction error.
You should check the README of the repository for further informations!
Thank you for the info. You are completely correst. Is there a way to emulate ARMv7 in qemu?
Probably there is, but I never did it.
Any update to this, I would like to use the newest NW.JS on my Pi
@boostio funded this issue with $15. Visit this issue on Issuehunt
@loadbalance-sudachi-kun funded this issue with $256. Visit this issue on Issuehunt
there are 2 common arm build as i can see
one is armel and the other is armhf
it would be cool if there was a ARM prebuilt binary
If there are others who would like to see ARM prebuilt binaries add a +1 to this issue and hopefully maintainer will deliver
There is a $65 open bounty on this issue. Add to the bounty at Bountysource.
I hope this includes ARMv6 or in other words the Raspberry Pi Zero.
@0maxxam0 funded this issue with $12. See it on IssueHunt
@rororofff has funded $2.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.
I'm looking into providing 0.39.2 on arm and pursuing work started here. I will reply here if I succeed.
Good news! There's no technical reason why NW.js can't be built for ARM devices. In fact, Chromium has supported ARM builds for a while now. Heck, Chromium OS runs on ARM devices.
Building NW.js only required one tweak and one extra install step, but the build was successful and I ended up with ARM binaries. To make things easier, I took notes during the process and put together the following script for building the ARM binaries from an Ubuntu machine: https://gist.github.com/llamasoft/33af03b73945a84d7624460d67b922ab
The two modifications required were:
- Running
build/linux/sysroot_scripts/install-sysroot.py --arch=arm
to install the ARM sysroot files. - Modifying
third_party/node-nw/common.gypi
to point to the ARM sysroot files. (PR https://github.com/nwjs/node/pull/38)
Aside from that, you just have to set the correct build flags and wait a few hours for the build to complete.
Good news! The full build was successful, including the packaging:
root@nwjs-builder:~/nwjs/src# ls -alh out/nw/dist/
total 205M
drwxr-xr-x 2 root root 4.0K Feb 18 00:28 .
drwx------ 22 root root 4.0K Feb 18 00:27 ..
-rw-r--r-- 1 root root 90 Feb 18 00:28 SHASUMS256.txt
-rw-r--r-- 1 root root 20M Feb 18 00:28 nw-headers-v0.44.2.tar.gz
-rw-r--r-- 1 root root 77M Feb 18 00:28 nwjs-sdk-symbol-v0.44.2-linux-arm.tar.gz
-rw-r--r-- 1 root root 109M Feb 18 00:27 nwjs-sdk-v0.44.2-linux-arm.tar.gz
I've updated my build script gist to reflect the steps and arguments required to create the ARM/Linux build. The script currently requires two manual changes (PR 38 and PR 7382) and includes a hacky workaround for one upstream issue.
I still need to test the resulting files on my Raspberry Pi, but I'm cautiously optimistic. Once NW.js offers pre-built packages for ARM devices, it will unblock a major nw-builder issue which should bring a whole plethora of NW.js apps to ARM devices!
@llamasoft Thanks for your effort!
This is great, I can drop running applications in Chrome and rewrite it to nwjs!
Is that for ARMv7 only or also for ARMv6?
@jalbam These changes primarily target ARMv7 (because that's what Chromium and LLVM considers the "arm" target architecture). That said, you should be able to modify the build files to set -march
flags to compile to ARMv6.
@llamasoft Can confirm, your build script works!
It would be great if you could get Roger to update the build instructions so that something like your script is linked. I'd guess that most devs would rather run a single script and get a coffee than manually read about and type out every build instruction.
Also-- do you know if there's any point to trying an aarch64 build? The arm build seems to run fine on my aarch64 laptop-- not sure if there are any obvious benefits to compiling for the aarch64 instruction set.
@llamasoft the script fails on Pi-4b - buster image
@bmatusiak I imagine it would fail. The system requirements for building Chrome is something like 100GB of storage and at least 8GB of RAM. The script builds binaries for ARM but the build itself doesn't need to take place on an ARM device. You're better off building the files on a more powerful machine and copying the results over.
i year ya.. i have it setup on POE with NFS,, only limit i have is ram ;)
Probably 8GB of ram are not enough for the linking process. I use 16 and I cross-compile. Soon I'll release all flavours of v0.44.x
@LeonardLaszlo I checked your uploaded v0.44.x arm builds and they are working flawlessly so far on a Raspberry Pi 4B with Debian Buster. Thank you for your work!
I am glad I could help.