fbzhong / node-cityhash

NodeJS bindings for Google CityHash
https://github.com/fbzhong/node-cityhash
MIT License
28 stars 4 forks source link

Problem installing on node-0.12.0 #10

Open davidfoliveira opened 9 years ago

davidfoliveira commented 9 years ago

I am trying to install cityhash via npm on node-0.12.0. npm command returns the following errors:

Ze-Macbook-Pro-2:main david$ npm install cityhash npm WARN package.json cityhash@0.0.5 'repositories' (plural) Not supported. Please pick one as the 'repository' field /

cityhash@0.0.5 install /Users/david/projects/sapo/metacache/sapometacache/main/node_modules/cityhash node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead. CXX(target) Release/obj.target/cityhash/binding.o ../binding.cc:34:13: error: using declaration can not refer to namespace using node::Buffer;


../binding.cc:61:42: error: no member named 'New' in 'v8::String'
    Local<Uint32> low = obj->Get(String::New("low"))->ToUint32();
                                 ~~~~~~~~^
../binding.cc:62:43: error: no member named 'New' in 'v8::String'
    Local<Uint32> high = obj->Get(String::New("high"))->ToUint32();
                                  ~~~~~~~~^
../binding.cc:71:17: error: no member named 'AsciiValue' in 'v8::String'
        String::AsciiValue strObj(obj->ToString());
        ~~~~~~~~^
../binding.cc:72:27: error: use of undeclared identifier 'strObj'
        return to_uint64(*strObj, strObj.length());
                          ^
../binding.cc:103:43: error: no member named 'New' in 'v8::String'
    v->first = to_uint64(obj->Get(String::New("low"))->ToObject());
                                  ~~~~~~~~^
../binding.cc:104:44: error: no member named 'New' in 'v8::String'
    v->second = to_uint64(obj->Get(String::New("high"))->ToObject());
                                   ~~~~~~~~^
../binding.cc:112:17: error: no member named 'AsciiValue' in 'v8::String'
        String::AsciiValue strObj(obj->ToString());
        ~~~~~~~~^
../binding.cc:113:24: error: use of undeclared identifier 'strObj'
        to_uint128(v, *strObj, strObj.length());
                       ^
../binding.cc:124:20: error: no member named 'New' in 'v8::String'
    return String::New(buf);
           ~~~~~~~~^
../binding.cc:134:20: error: no member named 'New' in 'v8::String'
    return String::New(buf);
           ~~~~~~~~^
../binding.cc:139:47: error: no member named 'New' in 'v8::String'
    Local<Value> lowObject = obj->Get(String::New("low"));
                                      ~~~~~~~~^
../binding.cc:154:37: error: too few arguments to function call, single argument 'isolate' was not specified
    Local<Object> ret = Object::New();
                        ~~~~~~~~~~~ ^
/Users/david/.node-gyp/0.12.0/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate\* isolate);
  ^
../binding.cc:155:22: error: no member named 'New' in 'v8::String'
    ret->Set(String::New("low"), Integer::NewFromUnsigned(low));
             ~~~~~~~~^
../binding.cc:156:22: error: no member named 'New' in 'v8::String'
    ret->Set(String::New("high"), Integer::NewFromUnsigned(high));
             ~~~~~~~~^
../binding.cc:157:22: error: no member named 'New' in 'v8::String'
    ret->Set(String::New("value"), stringify_hash(hash));
             ~~~~~~~~^
../binding.cc:158:22: error: no member named 'New' in 'v8::String'
    ret->Set(String::New("uint64"), Boolean::New(true));
             ~~~~~~~~^
../binding.cc:165:37: error: too few arguments to function call, single argument 'isolate' was not specified
    Local<Object> ret = Object::New();
                        ~~~~~~~~~~~ ^
/Users/david/.node-gyp/0.12.0/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate\* isolate);
  ^
../binding.cc:166:22: error: no member named 'New' in 'v8::String'
    ret->Set(String::New("low"), objectify_hash(Uint128Low64(hash)));
             ~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: **\* [Release/obj.target/cityhash/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/david/Applications/node-v0.12.0/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:1067:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/Users/david/Applications/node-v0.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/david/projects/sapo/metacache/sapometacache/main/node_modules/cityhash
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/david/Applications/node-v0.12.0/bin/node" "/Users/david/Applications/bin/npm" "install" "cityhash"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! cityhash@0.0.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cityhash@0.0.5 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the cityhash 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 cityhash
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/david/projects/sapo/metacache/sapometacache/main/npm-debug.log
andrefs commented 9 years ago

+1

blackcatworld commented 9 years ago

Same errors with OSX 0.12.7 (installed via brew). Downgraded version 0.10.40 builds ok.