NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

dacarson's avatar
dacarson
Aspirant
Jan 27, 2019

Building Nodejs on ReadyNas

After many attempts, I was finally able to build Node on my ReadyNas. 

 

For those who are trying to do this, I basically followed instructions here:

http://elsmorian.com/post/23474168753/nodejs-on-raspberry-pi

 

Rather than the old Node version mentioned in the URL above, I checked out a newer version:

 

$ git checkout v10.15.0

 

 

Doing a little research, I found that the ReadyNas that I have, has a ARM Cortex A15. This CPU has an ARMv7-A architecture, so I entered the following lines into the shell:

 

$ export CCFLAGS='-march=armv7-a'
$ export CXXFLAGS='-march=armv7-a'

 

I tried building everything and found that I had to comment out one line, which I think impacts debugging. In the file:

deps/v8/src/base/platform/platform-posix.cc

There are these lines:

 

void OS::DebugBreak() {
#if V8_HOST_ARCH_ARM
  //asm("bkpt 0");
#elif V8_HOST_ARCH_ARM64

I had to add the '//' to the asm line

 

 

Then kicking off the build:

 

$ ./configure
$ make
$ make install

 

The "make" took a long time, aka almost 2 hours. After it was built and installed, it was all there:

root@ReadyNas:~# node -v

v10.15.0

root@ReadyNas:~# npm -v

6.4.1

 

7 Replies

Replies have been turned off for this discussion
  • JohnCM_S's avatar
    JohnCM_S
    NETGEAR Employee Retired

    Hi dacarson,

     

    Welcome to the Community!

     

    Thank you for sharing this information. We appreciate your contribution to the community.

     

    Feel free to post any suggestions, questions, recommendations or anything about your NAS that you think needs attention or will help others.

     

    Regards,

  • Can you please go into greater details how you were able to get this to work?

    I've been looking all over trying to get this set up and you're the first person I've seen who was sucessfull.

    Thank you so much in advance

    • dacarson's avatar
      dacarson
      Aspirant

      I can help you out with getting it to compile. Can you tell me which part of the instructions I point to are not working?

      • DMod's avatar
        DMod
        Tutor

        Are you compiling it on the NAS or on your computer then transfering it over to install?

         

        I was having trouble typing out

        $ git checkout v10.15.0

        so I just downloaded the files onto my computer.  I entered

        $ export CCFLAGS='-march=armv7-a'
        $ export CXXFLAGS='-march=armv7-a'

        like you said and commented out the line in the code. When trying to run make I'm getting this error but I'm running make on my computer.

        node/node-master/out/Release/obj.target/icuucx/deps/icu-small/source/common/uniset_props.o.d.raw  -march=armv7-a -c
        ../deps/icu-small/source/common/uniset_props.cpp:1:0: error: bad value (armv7-a) for -march= switch
         // © 2016 and later: Unicode, Inc. and others.
         ^
        tools/icu/icuucx.target.mk:290: recipe for target '/home/m/node/node-master/out/Release/obj.target/icuucx/deps/icu-small/source/common/uniset_props.o' failed
        make[1]: *** [/home/m/node/node-master/out/Release/obj.target/icuucx/deps/icu-small/source/common/uniset_props.o] Error 1
        Makefile:99: recipe for target 'node' failed
        make: *** [node] Error 2
        

         

        I'm logged in as root through ssh. What steps do I now take? Is there a reason why not installing it through apt instead?

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More