mscdex / node-xxhash

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

Build fails on node 0.11.14 #7

Closed despairblue closed 9 years ago

despairblue commented 9 years ago
PYTHON=python2 npm i xxhash
> xxhash@0.2.0 install /home/despairblue/vcs/git/prototype2/node_modules/xxhash
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/home/despairblue/vcs/git/prototype2/node_modules/xxhash/build'
  CXX(target) Release/obj.target/hash/src/hash.o
../src/hash.cc:11:38: error: expected class-name before ‘{’ token
 class Hash : public node::ObjectWrap {
                                      ^
../src/hash.cc:26:36: error: ‘Arguments’ does not name a type
     static Handle<Value> New(const Arguments& args) {
                                    ^
../src/hash.cc:47:39: error: ‘Arguments’ does not name a type
     static Handle<Value> Update(const Arguments& args) {
                                       ^
../src/hash.cc:75:39: error: ‘Arguments’ does not name a type
     static Handle<Value> Digest(const Arguments& args) {
                                       ^
../src/hash.cc:87:43: error: ‘Arguments’ does not name a type
     static Handle<Value> StaticHash(const Arguments& args) {
                                           ^
In file included from /home/despairblue/.node-gyp/0.11.14/src/node.h:61:0,
                 from ../src/hash.cc:1:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> Hash::New(const int&)’:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/hash.cc:27:19: error: within this context
       HandleScope scope;
                   ^
../src/hash.cc:29:17: error: request for member ‘IsConstructCall’ in ‘args’, which is of non-class type ‘const int’
       if (!args.IsConstructCall()) {
                 ^
../src/hash.cc:31:13: error: ‘New’ is not a member of ‘v8::String’
             String::New("Use `new` to create instances of this object."))
             ^
../src/hash.cc:32:9: error: ‘ThrowException’ was not declared in this scope
         );
         ^
../src/hash.cc:35:16: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
       if (args.Length() == 0 || !args[0]->IsUint32()) {
                ^
../src/hash.cc:35:40: error: invalid types ‘const int[int]’ for array subscript
       if (args.Length() == 0 || !args[0]->IsUint32()) {
                                        ^
../src/hash.cc:37:13: error: ‘New’ is not a member of ‘v8::String’
             String::New("Expected unsigned integer seed argument"))
             ^
In file included from /home/despairblue/.node-gyp/0.11.14/src/node.h:61:0,
                 from ../src/hash.cc:1:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:3434:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:3434:34: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&)’ to ‘v8::Isolate*’
../src/hash.cc:131:28: error: ‘NewSymbol’ is not a member of ‘v8::String’
       Local<String> name = String::NewSymbol("XXHash");
                            ^
../src/hash.cc:133:58: error: no matching function for call to ‘v8::Persistent<v8::FunctionTemplate>::New(v8::Local<v8::FunctionTemplate>&)’
       constructor = Persistent<FunctionTemplate>::New(tpl);
                                                          ^
../src/hash.cc:133:58: note: candidate is:
In file included from /home/despairblue/.node-gyp/0.11.14/src/node.h:61:0,
                 from ../src/hash.cc:1:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:5724:4: note: static T* v8::PersistentBase<T>::New(v8::Isolate*, T*) [with T = v8::FunctionTemplate]
 T* PersistentBase<T>::New(Isolate* isolate, T* that) {
    ^
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:5724:4: note:   candidate expects 2 arguments, 1 provided
../src/hash.cc:134:18: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
       constructor->InstanceTemplate()->SetInternalFieldCount(1);
                  ^
../src/hash.cc:135:18: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
       constructor->SetClassName(name);
                  ^
../src/hash.cc:137:62: error: could not convert ‘constructor’ from ‘v8::Persistent<v8::FunctionTemplate>’ to ‘v8::Handle<v8::FunctionTemplate>’
       NODE_SET_PROTOTYPE_METHOD(constructor, "update", Update);
                                                              ^
../src/hash.cc:138:62: error: could not convert ‘constructor’ from ‘v8::Persistent<v8::FunctionTemplate>’ to ‘v8::Handle<v8::FunctionTemplate>’
       NODE_SET_PROTOTYPE_METHOD(constructor, "digest", Digest);
                                                              ^
../src/hash.cc:140:18: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
       constructor->Set(String::NewSymbol("hash"),
                  ^
../src/hash.cc:140:24: error: ‘NewSymbol’ is not a member of ‘v8::String’
       constructor->Set(String::NewSymbol("hash"),
                        ^
../src/hash.cc:141:56: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
                        FunctionTemplate::New(StaticHash)->GetFunction());
                                                        ^
../src/hash.cc:141:56: note: candidate is:
In file included from /home/despairblue/.node-gyp/0.11.14/src/node.h:61:0,
                 from ../src/hash.cc:1:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:3434:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:3434:34: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&)’ to ‘v8::Isolate*’
../src/hash.cc:143:36: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
       target->Set(name, constructor->GetFunction());
                                    ^
In file included from /home/despairblue/.node-gyp/0.11.14/src/node.h:61:0,
                 from ../src/hash.cc:1:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h: In function ‘void Init(v8::Handle<v8::Object>)’:
/home/despairblue/.node-gyp/0.11.14/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/hash.cc:149:17: error: within this context
     HandleScope scope;
                 ^
hash.target.mk:89: recipe for target 'Release/obj.target/hash/src/hash.o' failed
make: *** [Release/obj.target/hash/src/hash.o] Error 1
make: Leaving directory '/home/despairblue/vcs/git/prototype2/node_modules/xxhash/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1059:12)
gyp ERR! System Linux 3.14.25-1-lts
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/despairblue/vcs/git/prototype2/node_modules/xxhash
gyp ERR! node -v v0.11.14
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 

npm ERR! Linux 3.14.25-1-lts
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "xxhash"
npm ERR! node v0.11.14
npm ERR! npm  v2.0.0
npm ERR! code ELIFECYCLE
npm ERR! xxhash@0.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the xxhash@0.2.0 install script.
npm ERR! This is most likely a problem with the xxhash 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 xxhash
npm ERR! There is likely additional logging output above.
georgzoeller commented 9 years ago

Same on 0.11.15

mscdex commented 9 years ago

This should be fixed now in the master branch. Can you please give it a try? npm install https://github.com/mscdex/node-xxhash/tarball/master. I personally tested on node v0.10 and iojs v1.0.4.

georgzoeller commented 9 years ago

Confirmed. master branch is compiling fine on 0.11.15

mscdex commented 9 years ago

Thanks for the confirmation. I've published v0.2.1 with these changes.