mapbox / node-s2

bindings for s2 in node
88 stars 38 forks source link

Error when trying to install on mac #79

Closed djumanoff closed 8 years ago

djumanoff commented 9 years ago

I am getting this error when I try to install on Mac OS X 10.11 . Node version v4.1.1. Any help will be very appreciated.

../node_modules/nan/nan.h:189:68: error: too many arguments to function call,
      expected at most 2, have 4
    return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
           ~~~~~~~~~~~~~~~~~~                                      ^~~~~~~~~~
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:4675:3: note: 'New' declared
      here
  static Local<Signature> New(
  ^
In file included from ../src/latlng.cc:2:
../node_modules/nan/nan.h:271:3: error: redefinition of 'NanNew'
  NanNew<v8::StringObject, v8::Handle<v8::String> >(
  ^
../node_modules/nan/nan.h:264:3: note: previous definition is here
  NanNew<v8::StringObject, v8::Local<v8::String> >(
  ^
../node_modules/nan/nan.h:289:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../node_modules/nan/nan.h:283:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../node_modules/nan/nan.h:301:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../node_modules/nan/nan.h:295:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::RegExp> NanNew(
                                   ^
../node_modules/nan/nan.h:481:19: error: no type named
      'ExternalAsciiStringResource' in 'v8::String'; did you mean
      'ExternalStringResource'?
      v8::String::ExternalAsciiStringResource *resource) {
      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ExternalStringResource
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:2210:19: note: 
      'ExternalStringResource' declared here
  class V8_EXPORT ExternalStringResource
                  ^
In file included from ../src/latlng.cc:2:
../node_modules/nan/nan.h:480:36: error: redefinition of 'NanNew'
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:475:36: note: previous definition is here
  NAN_INLINE v8::Local<v8::String> NanNew(
                                   ^
../node_modules/nan/nan.h:495:27: error: redefinition of '_NanEscapeScopeHelper'
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:490:27: note: previous definition is here
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T> val) {
                          ^
../node_modules/nan/nan.h:511:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Primitive]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:516:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Primitive]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:521:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Boolean]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:526:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent())));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Boolean]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:755:13: error: no member named 'smalloc' in namespace
      'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../node_modules/nan/nan.h:766:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/djumanoff/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: 
      candidate function not viable: no known conversion from 'uint32_t'
      (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: 
      candidate function not viable: 2nd argument ('const char *') would lose
      const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/node_buffer.h:28:40: note: 
      candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/node_buffer.h:36:40: note: 
      candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/latlng.cc:2:
../node_modules/nan/nan.h:770:12: error: no viable conversion from
      'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:210:7: note: candidate
      constructor (the implicit copy constructor) not viable: no known
      conversion from 'v8::MaybeLocal<v8::Object>' to 'const
      v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:210:7: note: candidate
      constructor (the implicit move constructor) not viable: no known
      conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&'
      for 1st argument
class Local {
      ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:214:13: note: candidate
      template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:326:13: note: candidate
      template ignored: could not match 'S *' against
      'v8::MaybeLocal<v8::Object>'
  V8_INLINE Local(S* that)
            ^
In file included from ../src/latlng.cc:2:
../node_modules/nan/nan.h:777:26: error: no member named 'Use' in namespace
      'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:1809:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Function]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:1824:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(node::MakeCallback(
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Value]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:1897:12: error: no matching function for call to
      '_NanEscapeScopeHelper'
    return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:499:43: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEscapeScopeHelper(val))
                                          ^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:495:27: note: candidate template ignored: substitution
      failure [with T = v8::Object]
  NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) {
                          ^
../node_modules/nan/nan.h:2103:12: error: no member named 'IsExternalAscii' in
      'v8::String'; did you mean 'IsExternal'?
  if (str->IsExternalAscii()) {
           ^~~~~~~~~~~~~~~
           IsExternal
/Users/djumanoff/.node-gyp/4.1.1/include/node/v8.h:2174:8: note: 'IsExternal'
      declared here
  bool IsExternal() const;
       ^
samirahmedsc commented 8 years ago

using node 0.10 i was able to compile

tmcw commented 8 years ago

Folding into #85