node-argon2: Failed at the argon2@0.16.2 install script 'node-gyp rebuild'.

Hi! Trying to build jfurrow/flood on my rpi, and it consistently dies on this step. Only Argon2 seems to be a problem. node-gyp was installed globally successfully prior to this install.

Steps to reproduce

1.sudo npm install --unsafe-perm -g --verbose argon2 2. 3.

Expected behaviour

Build successful.

Actual behaviour

Verbose output below.

Environment

Raspbian Jessie Node version: 7.10.1 Compiler version: 4.9.2

npm verb stack Error: argon2@0.16.2 install: node-gyp rebuild npm verb stack Exit status 1 npm verb stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) npm verb stack at emitTwo (events.js:106:13) npm verb stack at EventEmitter.emit (events.js:194:7) npm verb stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) npm verb stack at emitTwo (events.js:106:13) npm verb stack at ChildProcess.emit (events.js:194:7) npm verb stack at maybeClose (internal/child_process.js:899:16) npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npm verb pkgid argon2@0.16.2 npm verb cwd /opt/flood npm ERR! Linux 4.9.35-v7+ npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “–unsafe-perm” “-g” “–verbose” “argon2” npm ERR! node v7.10.1 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1

npm ERR! argon2@0.16.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the argon2@0.16.2 install script ‘node-gyp rebuild’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the argon2 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 information on how to open an issue for this project with: npm ERR! npm bugs argon2 npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls argon2 npm ERR! There is likely additional logging output above. npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request: npm ERR! /root/.npm/_logs/2017-11-27T15_02_34_772Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 23 (11 by maintainers)

Most upvoted comments

doesn’t work for me too

Nah, it’s an error with C++ bindings. For some reason GCC tries to use structural initialization (initialize every member of a struct, in order) instead of move constructor, even though that’s explicitly what I wrote.

I’m studying the best way to fix it without too much boilerplate, but it has been long fixed in current versions of GCC that I don’t have access anymore.

At least the compiler corruption issue seems to be gone 😄

Sorry, indeed I forgot it… But now another error pops up:

➜  node-argon2 git:(master) ✗ npm install -g

> argon2@0.16.2 install /home/osmc/.nvm/versions/node/v8.9.4/lib/node_modules/argon2
> node-gyp rebuild

make: Entering directory '/home/osmc/git/node-argon2/build'
  CC(target) Release/obj.target/libargon2/argon2/src/ref.o
  CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
  CC(target) Release/obj.target/libargon2/argon2/src/core.o
  CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
  CC(target) Release/obj.target/libargon2/argon2/src/thread.o
  CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
  AR(target) Release/obj.target/argon2.a
  COPY Release/argon2.a
  CXX(target) Release/obj.target/argon2/src/argon2_node.o
../src/argon2_node.cpp: In constructor ‘NodeArgon2::HashWorker::HashWorker(std::string, NodeArgon2::Options)’:
../src/argon2_node.cpp:85:31: error: could not convert ‘std::move<NodeArgon2::Options&>((* & options))’ from ‘std::remove_reference<NodeArgon2::Options&>::type {aka NodeArgon2::Options
}’ to ‘std::string {aka std::basic_string<char>}’
     options{std::move(options)}
                               ^
../src/argon2_node.cpp:85:31: warning: missing initializer for member ‘NodeArgon2::Options::hash_length’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:85:31: warning: missing initializer for member ‘NodeArgon2::Options::time_cost’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:85:31: warning: missing initializer for member ‘NodeArgon2::Options::memory_cost’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:85:31: warning: missing initializer for member ‘NodeArgon2::Options::parallelism’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:85:31: warning: missing initializer for member ‘NodeArgon2::Options::type’ [-Wmissing-field-initializers]
../src/argon2_node.cpp: In constructor ‘NodeArgon2::VerifyWorker::VerifyWorker(std::string, std::string, NodeArgon2::Options)’:
../src/argon2_node.cpp:157:31: error: could not convert ‘std::move<NodeArgon2::Options&>((* & options))’ from ‘std::remove_reference<NodeArgon2::Options&>::type {aka NodeArgon2::Option
s}’ to ‘std::string {aka std::basic_string<char>}’
     options{std::move(options)}
                               ^
../src/argon2_node.cpp:157:31: warning: missing initializer for member ‘NodeArgon2::Options::hash_length’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:157:31: warning: missing initializer for member ‘NodeArgon2::Options::time_cost’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:157:31: warning: missing initializer for member ‘NodeArgon2::Options::memory_cost’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:157:31: warning: missing initializer for member ‘NodeArgon2::Options::parallelism’ [-Wmissing-field-initializers]
../src/argon2_node.cpp:157:31: warning: missing initializer for member ‘NodeArgon2::Options::type’ [-Wmissing-field-initializers]
make: *** [Release/obj.target/argon2/src/argon2_node.o] Error 1
argon2.target.mk:104: recipe for target 'Release/obj.target/argon2/src/argon2_node.o' failed
make: Leaving directory '/home/osmc/git/node-argon2/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/osmc/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.29-10-osmc
gyp ERR! command "/home/osmc/.nvm/versions/node/v8.9.4/bin/node" "/home/osmc/.nvm/versions/node/v8.9.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/osmc/git/node-argon2
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! argon2@0.16.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the argon2@0.16.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/osmc/.npm/_logs/2018-01-13T16_57_19_059Z-debug.log

Building argon2 on it’s own does work, so I would guess, there is something wrong with the gyp or so.