Closed...NodeJS...is there a package around already?

Marvell Kirkwood based
barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NodeJS...is there a package around already?

Post by barmalej2 » Sat Feb 17, 2018 10:43 am

MrDini wrote:I Can only hardly imagine, it is a part of the original V8.
v8/build/toolchain.gypi as well as v8/src/base/cpu.cc are parts of V8 source code:
https://chromium.googlesource.com/v8/v8 ... chain.gypi
https://chromium.googlesource.com/v8/v8 ... ase/cpu.cc

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NodeJS...is there a package around already?

Post by barmalej2 » Sun Feb 18, 2018 6:49 pm

Update to topic. Successfully build nodejs 6.13.0 from first attempt, using instructions, which I provided to Mr.Dini here. Surprise, surprise nodejs can be build using them. And even more surprise-it runs:
root@NSA310:/i-data/7cf371c4/ffp0.7arm/packages# which node
/ffp/bin/node
root@NSA310:/i-data/7cf371c4/ffp0.7arm/packages# node -v
v6.13.0
root@NSA310:/i-data/7cf371c4/ffp0.7arm/packages# node -h
Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]

Options:
-v, --version print Node.js version
-e, --eval script evaluate script
-p, --print evaluate script and print result
-c, --check syntax check script without executing
-i, --interactive always enter the REPL even if stdin
does not appear to be a terminal
-r, --require module to preload (option can be repeated)
--no-deprecation silence deprecation warnings
--trace-deprecation show stack traces on deprecations
--throw-deprecation throw an exception anytime a deprecated function is used
--no-warnings silence all process warnings
--trace-warnings show stack traces on process warnings
--redirect-warnings=path
write warnings to path instead of stderr
--trace-sync-io show stack trace when use of sync IO
is detected after the first tick
--track-heap-objects track heap object allocations for heap snapshots
--prof-process process v8 profiler output generated
using --prof
--zero-fill-buffers automatically zero-fill all newly allocated
Buffer and SlowBuffer instances
--v8-options print v8 command line options
--v8-pool-size=num set v8's thread pool size
--tls-cipher-list=val use an alternative default TLS cipher list
--use-bundled-ca use bundled CA store (default)
--use-openssl-ca use OpenSSL's default CA store
--openssl-config=path load OpenSSL configuration file from the
specified file (overrides OPENSSL_CONF)
--icu-data-dir=dir set ICU data load path to dir
(overrides NODE_ICU_DATA)
note: linked-in ICU data is
present.
--preserve-symlinks preserve symbolic links when resolving
and caching modules.

Environment variables:
NODE_PATH ':'-separated list of directories
prefixed to the module search path.
NODE_DISABLE_COLORS set to 1 to disable colors in the REPL
NODE_ICU_DATA data path for ICU (Intl object) data
(will extend linked-in data)
NODE_NO_WARNINGS set to 1 to silence process warnings
NODE_OPTIONS set CLI options in the environment
NODE_PATH ':'-separated list of directories
prefixed to the module search path
NODE_PENDING_DEPRECATION set to 1 to emit pending deprecation
warnings
NODE_REPL_HISTORY path to the persistent REPL history file
OPENSSL_CONF load OpenSSL configuration from file
NODE_REDIRECT_WARNINGS write warnings to path instead of stderr

Documentation can be found at https://nodejs.org/
Of course, just running it, is not the final goal, so if anyone has interesting nodejs testing proposal, I would be glad to hear it.
Uploaded new nodejs package here:
http://downloads.zyxel.nas-central.org/ ... -arm-1.txz
Keep in mind, that it might not run for you, because my current ffp system is incompatible with ffp0.7, although I tried to do it as much close as possible.

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Sun Feb 18, 2018 7:14 pm

Wow...that looks awesome...
I will try to load it into my ffp/nsa320...hopefully it will just do what i need it to...
Thx for all your efforts til now
NSA 320 with FFP and Metarepository on 4.7 firmware

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NodeJS...is there a package around already?

Post by barmalej2 » Sun Feb 18, 2018 7:44 pm

Don't expect much. There is only little chance, that it will run.

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: NodeJS...is there a package around already?

Post by MrDini » Sun Feb 18, 2018 8:48 pm

Awesome! :o

I am going to install it.
Thanks nas-central the lot of help! :)

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Sun Feb 18, 2018 10:20 pm

just installed it and ran "node" in console...
Answer was: node: can't load library 'libcares.so.2'
Ideas?
NSA 320 with FFP and Metarepository on 4.7 firmware

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: NodeJS...is there a package around already?

Post by MrDini » Mon Feb 19, 2018 12:08 am

I compiled these packages a few days ago. [url]

You can find c-ares as c_ares, and http-parser as http_parser.

But I'll have to update the ICU package, because currently i have *.58 and for this node build, *.60 is required:

Code: Select all

        libicui18n.so.60 => not found
        libicuuc.so.60 => not found
        libicudata.so.60 => not found
@barmalej2 Thanks. It looks amazing! :) I don't know what Can be the problem, but I get the same CPU not supported error every time when I execute the make.
Thanks nas-central the lot of help! :)

barmalej2
Posts: 2395
Joined: Sun Apr 29, 2012 5:24 pm

Re: NodeJS...is there a package around already?

Post by barmalej2 » Mon Feb 19, 2018 6:48 am

Unfortunately, it's just look amazing. In practice, resulting binary is unusable:(
root@NSA310:~# npm
Illegal instruction (core dumped)
root@NSA310:~# node -e addition.js
Illegal instruction (core dumped)
root@NSA310:~# node debug addition.js
Illegal instruction (core dumped)
That just confirms my old statement-compilation and correct functioning are two different things :( It just compiles is not enough.
And it is time to admit, that is impossible to run nodejs higher than 0.10.48 version on CPU, which doesn't has FPU.
@Mr.Dini. Can you compile and share with others nodejs-0.10.48?

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Mon Feb 19, 2018 2:10 pm

@Mr.Dini
Are you trying to invade a country or so with all thewse packages you compiled on your page?
Holy...after installing those, the NAS pretty much only lacks the ability to serve cofe...smile
And yes...would like to try the last working version as well if it works with what i need...

Thx for everyone!!!
NSA 320 with FFP and Metarepository on 4.7 firmware

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: NodeJS...is there a package around already?

Post by MrDini » Mon Feb 19, 2018 2:44 pm

Are you trying to invade a country or so with all thewse packages you compiled on your page?
What did you mean by "invade a country"? Never heard this expression... :oops:

And sure, I am going to upload mine last node.js package. But it is completely unusable, because almost all of the newer JS libraries require a newer version... :x
Thanks nas-central the lot of help! :)

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Mon Feb 19, 2018 2:57 pm

Hmmm...to sad that some jokes dont survive translation...and maybe invading countries is only funny when you are german as i am...
Was just trying to express that i was estonished about the amount of tools you have available for this limited box...
To sad that the overclocking attempts never really got grip...would be probably a better performer with some more steam...
NSA 320 with FFP and Metarepository on 4.7 firmware

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: NodeJS...is there a package around already?

Post by MrDini » Tue Feb 20, 2018 6:12 pm

I am a busy man nowadays. But the deal is deal. I packaged and uploaded mine old, but working nodejs 0.10.30 compile. Gonna compile 0.10.48 too.

http://users.atw.hu/mrdini/packages/tes ... -arm-1.txz
Thanks nas-central the lot of help! :)

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Wed Feb 21, 2018 7:26 pm

Hello...
Installed this one...and yes...this version does not do what i need...
It squealz pretty early in the otherwise great working code...
Still hoping for the second one you were talking about...but slowly but steady i should stop holding my breath
Thx anyways...great work
NSA 320 with FFP and Metarepository on 4.7 firmware

User avatar
MrDini
Posts: 651
Joined: Mon Dec 21, 2015 7:21 pm
Contact:

Re: NodeJS...is there a package around already?

Post by MrDini » Wed Feb 21, 2018 10:50 pm

What is the exact error message, or what do you experience when executing the start command?

BTW as I said node isn't the best choice for our NASes due to the already discussed incompatibilities. But you Can install Python, which has a lot of libraries too. Maybe you Can port your script to Python too. And in this case you don't need node js. Or if it must be JS, then use duktape. It doesn't have any external library support, and it isn't so huge, like node, but for quick JS operations it is more than fine.
Thanks nas-central the lot of help! :)

Darkyputz
Posts: 27
Joined: Sun Nov 07, 2010 7:16 pm
Location: New Jersey

Re: NodeJS...is there a package around already?

Post by Darkyputz » Thu Feb 22, 2018 12:02 am

Hello...

Error message is this(but working pretty well when run from windows/node):
njstuya.js:41
tuya.resolveIds().then(( => {
^
SyntaxError: Unexpected token =
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
There is also a python version out for the control i am trying to obtain...just started with getting it in java script to run and thought...YES
So maybe i have to check in python and see how that works...
Ducktape? hmm...never even heard of that...
My good old days seem to be pretty over for a while...
NSA 320 with FFP and Metarepository on 4.7 firmware

Post Reply