-
- Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
Steps to reproduce
- Install the latest version of node-gyp globally.
- Use Node 4.0.0+
- Attempt to install this module via npm:
npm install argon2 --savein a project.
Expected behaviour
The module should be installed without issue.
Actual behaviour
The module fails to build with node-gyp:
npm install argon2 --save > argon2@0.9.0 install /Users/rdegges/Dropbox/Code/testing/argon/node_modules/argon2 > node-gyp rebuild 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 CC(target) Release/obj.target/libargon2/argon2/src/opt.o LIBTOOL-STATIC Release/argon2.a CXX(target) Release/obj.target/argon2/src/argon2_node.o In file included from ../src/argon2_node.cpp:8: ../src/argon2_node.h:28:10: error: no type named 'unique_ptr' in namespace 'std' std::unique_ptr<char[]> output; ~~~~~^ ../src/argon2_node.h:28:20: error: expected member name or ';' after declaration specifiers std::unique_ptr<char[]> output; ~~~~~~~~~~~~~~~^ ../src/argon2_node.cpp:22:16: error: no member named 'ceil' in namespace 'std' using std::ceil; ~~~~~^ ../src/argon2_node.cpp:24:35: error: use of undeclared identifier 'ceil' return static_cast<size_type>(ceil(length / 3.0)) * 4; ^ ../src/argon2_node.cpp:20:21: error: no return statement in constexpr function constexpr size_type base64Length(size_type length) ^ ../src/argon2_node.cpp:30:16: error: no member named 'to_string' in namespace 'std' using std::to_string; ~~~~~^ ../src/argon2_node.cpp:34:32: error: use of undeclared identifier 'to_string' memoryCostLength = to_string(log(ARGON2_MAX_MEMORY)).size(), ^ ../src/argon2_node.cpp:35:30: error: use of undeclared identifier 'to_string' timeCostLength = to_string(ARGON2_MAX_TIME).size(), ^ ../src/argon2_node.cpp:36:33: error: use of undeclared identifier 'to_string' parallelismLength = to_string(ARGON2_MAX_LANES).size(); ^ ../src/argon2_node.cpp:47:69: error: member initializer 'output' does not name a non-static data member or base class memory_cost{memory_cost}, parallelism{parallelism}, type{type}, output{} ^~~~~~~~ ../src/argon2_node.cpp:53:5: error: use of undeclared identifier 'output' output.reset(new char[ENCODED_LEN]); ^ ../src/argon2_node.cpp:57:23: error: use of undeclared identifier 'output' HASH_LEN, output.get(), ENCODED_LEN, type); ^ ../src/argon2_node.cpp:74:34: error: use of undeclared identifier 'output' promise->Resolve(Nan::Encode(output.get(), strlen(output.get()))); ^ ../src/argon2_node.cpp:74:55: error: use of undeclared identifier 'output' promise->Resolve(Nan::Encode(output.get(), strlen(output.get()))); ^ ../src/argon2_node.cpp:141:24: error: no member named 'unique_ptr' in namespace 'std' auto output = std::unique_ptr<char[]>{new char[ENCODED_LEN]}; ~~~~~^ ../src/argon2_node.cpp:141:39: error: expected '(' for function-style cast or type construction auto output = std::unique_ptr<char[]>{new char[ENCODED_LEN]}; ~~~~^ ../src/argon2_node.cpp:251:34: warning: implicit conversion from 'unsigned long long' to 'uint32_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion] Nan::New<Number>(log(ARGON2_MAX_MEMORY))); ~~~ ^~~~~~~~~~~~~~~~~ ../src/../argon2/include/argon2.h:58:50: note: expanded from macro 'ARGON2_MAX_MEMORY' ARGON2_MIN(UINT32_C(0xFFFFFFFF), UINT64_C(1) << ARGON2_MAX_MEMORY_BITS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/../argon2/include/argon2.h:53:46: note: expanded from macro 'ARGON2_MIN' #define ARGON2_MIN(a, b) ((a) < (b) ? (a) : (b)) ^ 1 warning and 16 errors generated. make: *** [Release/obj.target/argon2/src/argon2_node.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/rdegges/.nvm/versions/node/v5.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) gyp ERR! stack at emitTwo (events.js:100:13) gyp ERR! stack at ChildProcess.emit (events.js:185:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 15.3.0 gyp ERR! command "/Users/rdegges/.nvm/versions/node/v5.5.0/bin/node" "/Users/rdegges/.nvm/versions/node/v5.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/rdegges/Dropbox/Code/testing/argon/node_modules/argon2 gyp ERR! node -v v5.5.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN EPACKAGEJSON argon@1.0.0 No description npm WARN EPACKAGEJSON argon@1.0.0 No repository field. npm ERR! Darwin 15.3.0 npm ERR! argv "/Users/rdegges/.nvm/versions/node/v5.5.0/bin/node" "/Users/rdegges/.nvm/versions/node/v5.5.0/bin/npm" "install" "argon2" "--save" npm ERR! node v5.5.0 npm ERR! npm v3.3.12 npm ERR! code ELIFECYCLE npm ERR! argon2@0.9.0 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the argon2@0.9.0 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 their info via: npm ERR! npm owner ls argon2 npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/rdegges/Dropbox/Code/testing/argon/npm-debug.logEnvironment
Operating system: OSX
Node version: 5.5.0
Compiler version:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels