nodejs / iojs.org

https://iojs.org
Other
232 stars 130 forks source link

bcrypt installation error #420

Closed sunny-mittal closed 9 years ago

sunny-mittal commented 9 years ago

Hello, I just updated to iojs v3 and can't get bcrypt to install :( I get the following very fun error (ignore the xcode ones, though. Those are just because I didn't install the GUI). I switched back to my v2.5 install and bcrypt installs fine. Is this an issue with bcrypt or iojs (or possibly just me)?

error:

➭ npm install bcrypt@latest \

bcrypt@0.8.4 install /Users/Sunny/Projects/sites/bpb/node_modules/bcrypt node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o In file included from ../src/bcrypt_node.cc:1: ../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal' NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:256:25: note: previous definition is here NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) { ^ ../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node' , node::smalloc::FreeCallback callback


../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/node_buffer.h:35:40: note: candidate function not viable:
      no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate\* isolate,
                                       ^
/Users/Sunny/.node-gyp/3.0.0/include/node/node_buffer.h:47:40: note: candidate function not viable:
      2nd argument ('const char _') would lose const qualifier
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate_ isolate,
                                       ^
/Users/Sunny/.node-gyp/3.0.0/include/node/node_buffer.h:32:40: note: candidate function not viable:
      requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate\* isolate, size_t length);
                                       ^
/Users/Sunny/.node-gyp/3.0.0/include/node/node_buffer.h:40:40: note: candidate function not viable:
      requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate\* isolate,
                                       ^
In file included from ../src/bcrypt_node.cc:1:
../node_modules/nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocalv8::Object' to
      'v8::Localv8::Object'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:210:7: note: candidate constructor
      (the implicit copy constructor) not viable: no known conversion from
      'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' for 1st argument
class Local {
      ^
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:210:7: note: candidate constructor
      (the implicit move constructor) not viable: no known conversion from
      'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object &&' for 1st argument
class Local {
      ^
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:214:13: note: candidate template ignored: could not
      match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:327:13: note: candidate template ignored: could not
      match 'S _' against 'v8::MaybeLocalv8::Object'
  V8_INLINE Local(S_ that)
            ^
In file included from ../src/bcrypt_node.cc:1:
../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
In file included from ../src/bcrypt_node.cc:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/Sunny/.node-gyp/3.0.0/include/node/node.h:42:
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    _(static_cast<T_ volatile_>(0)) = static_cast<S_>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:414:12: note: in instantiation of function template specialization
      'v8::Localv8::Primitive::Localv8::Value' requested here
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

```
                         ^
```

In file included from ../src/bcrypt_node.cc:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/Sunny/.node-gyp/3.0.0/include/node/node.h:42:
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Boolean _volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T_ volatile_>(0)) = static_cast<S_>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:424:12: note: in instantiation of function template specialization
      'v8::Localv8::Boolean::Localv8::Value' requested here
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

```
                         ^
```

In file included from ../src/bcrypt_node.cc:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/Sunny/.node-gyp/3.0.0/include/node/node.h:42:
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Function _volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T_ volatile_>(0)) = static_cast<S_>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template specialization
      'v8::Localv8::Function::Localv8::Value' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

```
                         ^
```

In file included from ../src/bcrypt_node.cc:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/Sunny/.node-gyp/3.0.0/include/node/node.h:42:
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Object _volatile'
      from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/Sunny/.node-gyp/3.0.0/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T_ volatile_>(0)) = static_cast<S_>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template specialization
      'v8::Localv8::Object::Localv8::Value' requested here
    return NanEscapeScope(handle->Get(NanNew(key)).Asv8::Object());
           ^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))

```
                         ^
```

9 errors generated.
make: **\* [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
fhemberger commented 9 years ago

To quote @rvagg here:

Be aware that there is significant V8 API breakage at the C++ end so don't expect your favourite native addons to work out of the box.

So this is an issue with bcrypt, which needs to be updated to the latest changes in V8. https://github.com/nodejs/io.js/wiki/Breaking-Changes#300-from-2x

fhemberger commented 9 years ago

… and you filed the ticket against the website repo. ;) So I'm closing this here.

sunny-mittal commented 9 years ago

Sorry about that! I didn't realize /iojs/iojs redirected here. Thanks for taking the time to answer, though!