3rd-Eden / node-hashring

hashring is a consistent hashing algorithm for Node.js that is compatible with libketama and python's hash_ring package
MIT License
350 stars 61 forks source link

Node 0.12 #32

Closed alexgorbatchev closed 8 years ago

alexgorbatchev commented 9 years ago

getting compilation errors

> hashring@1.0.1 install hashring
> node-gyp rebuild

  CXX(target) Release/obj.target/hashvalue/src/hashvalue.o
../src/hashvalue.cc:6:28: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Hasher(const Arguments& args) {
                           ^~~~~~~~~
                           v8::internal::Arguments
/Users/alex/.node-gyp/0.12.2/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/hashvalue.cc:7:15: error: calling a protected constructor of class 'v8::HandleScope'
  HandleScope scope;
              ^
/Users/alex/.node-gyp/0.12.2/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/hashvalue.cc:9:34: error: type 'const v8::internal::Arguments' does not provide a subscript operator
  unsigned int hash = ((int) args[0]->NumberValue() << 24)
                             ~~~~^~
../src/hashvalue.cc:10:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
    | ((int) args[1]->NumberValue() << 16)
             ~~~~^~
../src/hashvalue.cc:11:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
    | ((int) args[2]->NumberValue() << 8)
             ~~~~^~
../src/hashvalue.cc:12:17: error: type 'const v8::internal::Arguments' does not provide a subscript operator
    | (int) args[3]->NumberValue();
            ~~~~^~
../src/hashvalue.cc:14:16: error: no member named 'Close' in 'v8::HandleScope'
  return scope.Close(Number::New(hash));
         ~~~~~ ^
../src/hashvalue.cc:14:38: error: too few arguments to function call, expected 2, have 1
  return scope.Close(Number::New(hash));
                     ~~~~~~~~~~~     ^
/Users/alex/.node-gyp/0.12.2/deps/v8/include/v8.h:1999:3: note: 'New' declared here
  static Local<Number> New(Isolate* isolate, double value);
  ^
../src/hashvalue.cc:19:15: error: no member named 'NewSymbol' in 'v8::String'
      String::NewSymbol("hash")
      ~~~~~~~~^
../src/hashvalue.cc:20:29: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handle<v8::Value> (const v8::internal::Arguments &)'
    , FunctionTemplate::New(Hasher)->GetFunction()
                            ^~~~~~
/Users/alex/.node-gyp/0.12.2/deps/v8/include/v8.h:3456:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate,
               ^
10 errors generated.
make: *** [Release/obj.target/hashvalue/src/hashvalue.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/alex/.nvm/versions/node/v0.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/Users/alex/.nvm/versions/node/v0.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alex/work/npmawesome/articles/strong-agent-example/node_modules/statsd/node_modules/hashring
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
3rd-Eden commented 9 years ago

That is so weird, as the travis-ci build does pass on 0.12.2 https://travis-ci.org/3rd-Eden/node-hashring/jobs/61887563

alexgorbatchev commented 9 years ago

Hm... I have just upgraded to latest osx, perhaps my setup is messed up. Any idea what is the problem? On May 10, 2015 2:40 PM, "Arnout Kazemier" notifications@github.com wrote:

That is so weird, as the travis-ci build does pass on 0.12.2 https://travis-ci.org/3rd-Eden/node-hashring/jobs/61887563

— Reply to this email directly or view it on GitHub https://github.com/3rd-Eden/node-hashring/issues/32#issuecomment-100704347 .

3rd-Eden commented 8 years ago

Closing this, latest version no longer uses binary addons.