Open JueLance opened 9 years ago
Yes I'm gonna add it in the README file ;)
Thank you in advance. Since there are lots of request for latest node package in QNAP forum, your effort will help us more.
Unfortunately I tried to build newer version of node without any success. I had a lot of issues with v8 compilation so for the moment I can't give you the exact method. But to give you mainlines, you have to create a toolchain on a Linux host (i.e. Ubuntu 14.04) which has the same configuration as your QNAP machine (same GCC, libgc, binutils and kernel version).
I suggest you to use Crosstool-NG to generate it.
The problem is v8 uses a lot of new features from GCC compiler (like linux atomic library) which are not present in the QNAP's GCC version (really old...).
So after generating the makefile to build node with the command :
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --prefix="/opt/nodejs"
You need to staticaly link missing libraries by extracting them from a newer GCC source code, and add filenames in your makefile...
After that you can build it as usual :
make -j4
make install DESTDIR=/your/custom/path
This is a really tricky method, and doesn't work now with other versions of node. But, you could always try to install a newer version of GCC on your QNAP and build node directly on your NAS. (I don't know if it's possible because kernels are old too, and if you want newer kernel you have to create entirely your linux system, and will loose all QNAP functionalities...)
To resume, if you want the most recent version of node on a QNAP, you need the most recent version of Linux kernel and others dependencies.
Hi Jbltx, could you please post some text tell the others(of course, include me) how to compile node on QNAP NAS? Thanks.