mscdex / node-xxhash

An xxhash binding for node.js
Other
193 stars 28 forks source link

Error when install with 12.2.0 #31

Closed wroughtec closed 5 years ago

wroughtec commented 5 years ago

Am getting the following error when attempting to install with node 12 (on Mac 10.14.4)


Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /node_modules/xxhash
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.2.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/node_modules/xxhash/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/.node-gyp/12.2.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/.node-gyp/12.2.0',
gyp info spawn args   '-Dnode_gyp_dir=/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/.node-gyp/12.2.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/node_modules/xxhash',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/hash/src/hash.o
In file included from ../src/hash.cc:3:
../src/hash_32.hpp:147:28: error: no template named 'Handle'
    static void Initialize(Handle<Object> target) {
                           ^
../src/hash_32.hpp:57:38: error: too few arguments to function call, single argument 'context' was not specified
        return seed_val->Uint32Value();
               ~~~~~~~~~~~~~~~~~~~~~ ^
/.node-gyp/12.2.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
  ^
/.node-gyp/12.2.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/hash.cc:3:
../src/hash_32.hpp:157:42: error: too few arguments to function call, single argument 'context' was not specified
      target->Set(name, tpl->GetFunction());
                        ~~~~~~~~~~~~~~~~ ^
/.node-gyp/12.2.0/include/node/v8.h:5947:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/.node-gyp/12.2.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/hash.cc:4:
../src/hash_64.hpp:147:28: error: no template named 'Handle'
    static void Initialize(Handle<Object> target) {
                           ^
../src/hash_64.hpp:57:38: error: too few arguments to function call, single argument 'context' was not specified
        return seed_val->Uint32Value();
               ~~~~~~~~~~~~~~~~~~~~~ ^
/.node-gyp/12.2.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
  ^
/.node-gyp/12.2.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/hash.cc:4:
../src/hash_64.hpp:158:42: error: too few arguments to function call, single argument 'context' was not specified
      target->Set(name, tpl->GetFunction());
                        ~~~~~~~~~~~~~~~~ ^
/.node-gyp/12.2.0/include/node/v8.h:5947:3: note: 'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/.node-gyp/12.2.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/hash.cc:7:8: error: variable has incomplete type 'void'
  void Init(v8::Handle<v8::Object> target) {
       ^
../src/hash.cc:7:34: error: expected '(' for function-style cast or type construction
  void Init(v8::Handle<v8::Object> target) {
                       ~~~~~~~~~~^
../src/hash.cc:7:17: error: no member named 'Handle' in namespace 'v8'
  void Init(v8::Handle<v8::Object> target) {
            ~~~~^
../src/hash.cc:7:36: error: use of undeclared identifier 'target'
  void Init(v8::Handle<v8::Object> target) {
                                   ^
../src/hash.cc:7:43: error: expected ';' after top level declarator
  void Init(v8::Handle<v8::Object> target) {
                                          ^
                                          ;
11 errors generated.
make: *** [Release/obj.target/hash/src/hash.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/.nvm/versions/node/v12.2.0/bin/node" "/.nvm/versions/node/v12.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /node_modules/xxhash```
wroughtec commented 5 years ago

Just seen this may be resolved by: https://github.com/mscdex/node-xxhash/pull/30

mscdex commented 5 years ago

This should be resolved now in master.

joshharington commented 2 years ago

@mscdex This isnt resolved, still happening using Node 12, 14 and 16 on Mac OSX