I have trouble installing uCoin on an ARM computer

I’m trying to install ucoin on a cubietruck (card-sized computer like Raspberry Pi) running arkOS, a linux distro based on arch linux.

However, I when I try to install ucoin on this computer I run into a little problem:

[root@arkos ~]# npm install -g ucoin
 
> naclb@0.0.1 install /usr/lib/node_modules/ucoin/node_modules/naclb
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.29"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/ucoin/node_modules/naclb/.node-gyp"
make: Entering directory '/usr/lib/node_modules/ucoin/node_modules/naclb/build'
  CXX(target) Release/obj.target/nacl/nacl.o
  CXX(target) Release/obj.target/nacl/tweetnacl.o
../tweetnacl.cpp: In function ‘int vn(const u8*, const u8*, int)’:
../tweetnacl.cpp:61:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     FOR(i, n) d |= x[i] ^ y[i];
            ^
../tweetnacl.cpp:4:33: note: in definition of macro ‘FOR’
 #define FOR(i,n) for (i = 0;i < n;++i)
                                 ^
../tweetnacl.cpp: In function ‘int crypto_sign(u8*, u64*, const u8*, u64, const u8*)’:
../tweetnacl.cpp:840:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     FOR(i, n) {
            ^
../tweetnacl.cpp:4:33: note: in definition of macro ‘FOR’
 #define FOR(i,n) for (i = 0;i < n;++i)
                                 ^
../tweetnacl.cpp: In function ‘int crypto_sign_open(u8*, u64*, const u8*, u64, const u8*)’:
../tweetnacl.cpp:921:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     FOR(i, n) {
            ^
../tweetnacl.cpp:4:33: note: in definition of macro ‘FOR’
 #define FOR(i,n) for (i = 0;i < n;++i)
                                 ^
../tweetnacl.cpp:935:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         FOR(i, n) {
                ^
../tweetnacl.cpp:4:33: note: in definition of macro ‘FOR’
 #define FOR(i,n) for (i = 0;i < n;++i)
                                 ^
../tweetnacl.cpp:940:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     FOR(i, n) {
            ^
../tweetnacl.cpp:4:33: note: in definition of macro ‘FOR’
 #define FOR(i,n) for (i = 0;i < n;++i)
                                 ^
  CXX(target) Release/obj.target/nacl/randombytes.o
  SOLINK_MODULE(target) Release/obj.target/nacl.node
  SOLINK_MODULE(target) Release/obj.target/nacl.node: Finished
  COPY Release/nacl.node
make: Leaving directory '/usr/lib/node_modules/ucoin/node_modules/naclb/build'
 
> netroute@0.2.5 install /usr/lib/node_modules/ucoin/node_modules/nat-upnp/node_modules/netroute
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.29"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/ucoin/node_modules/nat-upnp/node_modules/netroute/.node-gyp"
make: Entering directory '/usr/lib/node_modules/ucoin/node_modules/nat-upnp/node_modules/netroute/build'
  CXX(target) Release/obj.target/netroute/src/netroute.o
  CXX(target) Release/obj.target/netroute/src/platform-linux.o
  SOLINK_MODULE(target) Release/obj.target/netroute.node
  SOLINK_MODULE(target) Release/obj.target/netroute.node: Finished
  COPY Release/netroute.node
make: Leaving directory '/usr/lib/node_modules/ucoin/node_modules/nat-upnp/node_modules/netroute/build'
 
> usage@0.6.0 install /usr/lib/node_modules/ucoin/node_modules/usage
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.29"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/ucoin/node_modules/usage/.node-gyp"
make: Entering directory '/usr/lib/node_modules/ucoin/node_modules/usage/build'
  CXX(target) Release/obj.target/sysinfo/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/sysinfo.node
  SOLINK_MODULE(target) Release/obj.target/sysinfo.node: Finished
  COPY Release/sysinfo.node
make: Leaving directory '/usr/lib/node_modules/ucoin/node_modules/usage/build'
 
> ws@0.5.0 install /usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory '/usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
 
> scrypt@3.0.1 install /usr/lib/node_modules/ucoin/node_modules/scrypt
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.29"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/ucoin/node_modules/scrypt/.node-gyp"
make: Entering directory '/usr/lib/node_modules/ucoin/node_modules/scrypt/build'
  CC(target) Release/obj.target/scrypt_wrapper/src/util/salt.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/keyderivation.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/pickparams.o
  CC(target) Release/obj.target/scrypt_wrapper/src/scryptwrapper/hash.o
  AR(target) Release/obj.target/scrypt_wrapper.a
  COPY Release/scrypt_wrapper.a
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/sha256.o
  CC(target) Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/crypto_scrypt-sse.o
../scrypt/scrypt-1.1.6/lib/crypto/crypto_scrypt-sse.c:34:23: fatal error: emmintrin.h: No such file or directory
 #include <emmintrin.h>
                       ^
compilation terminated.
scrypt_lib.target.mk:95: recipe for target 'Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/crypto_scrypt-sse.o' failed
make: *** [Release/obj.target/scrypt_lib/scrypt/scrypt-1.1.6/lib/crypto/crypto_scrypt-sse.o] Error 1
make: Leaving directory '/usr/lib/node_modules/ucoin/node_modules/scrypt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.4.90-4-ARCH
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/ucoin/node_modules/scrypt
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 
 
> vucoin@0.23.8 postinstall /usr/lib/node_modules/ucoin/node_modules/vucoin
> ./postinstall.sh

 
> ws@0.4.31 install /usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

\
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/.node-gyp/0.10.29/deps/cares/src'
npm ERR! error rolling back  ucoin@0.11.2 { [Error: ENOTEMPTY, rmdir '/usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/.node-gyp/0.10.29/deps/cares/src']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/usr/lib/node_modules/ucoin/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/.node-gyp/0.10.29/deps/cares/src' }
npm ERR! scrypt@3.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrypt@3.0.1 install script.
npm ERR! This is most likely a problem with the scrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls scrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.4.90-4-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ucoin"
npm ERR! cwd /root
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

To which I believe the relevant error is:

fatal error: emmintrin.h: No such file or directory
 #include <emmintrin.h>

Now I do have a file that very much looks like it located at:
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.2/include/mmintrin.h

I think this issue below is related to my issue:

Anyway, if anyone knows what problem this is, please reply.

Thanks for linking the scrypt on GItHub issue. I’ve already participated to another issue few weeks ago for its scrypt library’s compliance with Node v0.12 and io.js, and @barrysten seems to be a very good and reactive developer (not only did he fixed this, but rather quickly too :slight_smile: ).

Looking at the issue, I guess I need to upgrade the version of scrypt I use in uCoin.

Hurry up! I want it to work! :slight_smile:

1 « J'aime »

What is this interface? Yunohost?

This is arkOS a similar distro as YunoHost based on Arch aiming to facilitate self-hosting.

Here is some screenshots of a beginning of uCoin application packaged for YunoHost:

1 « J'aime »

Ah cool, looks I have to do even less work to get this working. You’ve written all the commands for me. :smiley:

Thanks M5oul.

And you just so happen to be a contributor of Yunohost, the only similar distro to arkOS. Good to see the right people are finding about uCoin so early :smile:.

1 « J'aime »

Great :smile: we gone self-host our futur monetary system :blush:

2 « J'aime »

We could lift the whole world out of extreme poverty with this. :blush:

That is, as soon as cgeek upgrades ucoin’s scrypt dependency to 4.0.7 and vucoin to a version that quit using scrypt if I’m correct.

[EDIT] Thanks cgeek! I can now bother the arkOS guy to finish his bugs.

1 « J'aime »