Skip to content

Cannot install module (error while compilation) with io.js #6

@ghost

Description

I get a lot of errors when trying to install the package. Is this a io.js <-> node.js compatibility issue?

> node-gyp rebuild

  CXX(target) Release/obj.target/nn/lib/nn.o
In file included from ../lib/nn.cc:22:
../lib/nn.hh:38:19: error: expected class name
class NN : public ObjectWrap {
                  ^
../lib/nn.hh:143:34: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> New(const Arguments& args);
                                 ^~~~~~~~~
                                 v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:144:42: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> TrainSetAdd(const Arguments& args);
                                         ^~~~~~~~~
                                         v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:145:36: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> Train(const Arguments& args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:146:38: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> MTTrain(const Arguments& args);
                                     ^~~~~~~~~
                                     v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:147:34: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> Run(const Arguments& args);
                                 ^~~~~~~~~
                                 v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:148:39: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> ToString(const Arguments& args);
                                      ^~~~~~~~~
                                      v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:149:39: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> GetState(const Arguments& args);
                                      ^~~~~~~~~
                                      v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../lib/nn.cc:22:
../lib/nn.hh:150:37: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
  static Handle<Value> SetLog(const Arguments& args);
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../lib/nn.cc:701:34: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
Handle<Value> NN::ToString(const Arguments& args) {
                                 ^~~~~~~~~
                                 v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../lib/nn.cc:702:15: error: calling a protected constructor of class
      'v8::HandleScope'
  HandleScope scope;
              ^
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:869:13: note: declared
      protected here
  V8_INLINE HandleScope() {}
            ^
../lib/nn.cc:705:12: error: use of undeclared identifier 'ObjectWrap'
  NN* nn = ObjectWrap::Unwrap<NN>(args.This());
           ^
../lib/nn.cc:705:31: error: 'NN' does not refer to a value
  NN* nn = ObjectWrap::Unwrap<NN>(args.This());
                              ^
../lib/nn.hh:38:7: note: declared here
class NN : public ObjectWrap {
      ^
../lib/nn.cc:705:39: error: member access into incomplete type 'const
      v8::internal::Arguments'
  NN* nn = ObjectWrap::Unwrap<NN>(args.This());
                                      ^
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: forward
      declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../lib/nn.cc:708:35: error: no member named 'New' in 'v8::String'; did you mean
      simply 'New'?
  v8::Handle<v8::String> result = v8::String::New(nn->to_string().c_str());
                                  ^~~~~~~~~~~~~~~
                                  New
../lib/nn.hh:143:24: note: 'New' declared here
  static Handle<Value> New(const Arguments& args);
                       ^
../lib/nn.cc:708:51: error: reference to type 'const v8::internal::Arguments'
      could not bind to an rvalue of type 'const char *'
  v8::Handle<v8::String> result = v8::String::New(nn->to_string().c_str());
                                                  ^~~~~~~~~~~~~~~~~~~~~~~
../lib/nn.hh:143:45: note: passing argument to parameter 'args' here
  static Handle<Value> New(const Arguments& args);
                                            ^
../lib/nn.cc:710:16: error: no member named 'Close' in 'v8::HandleScope'
  return scope.Close(result);
         ~~~~~ ^
../lib/nn.cc:716:34: error: unknown type name 'Arguments'; did you mean
      'v8::internal::Arguments'?
Handle<Value> NN::GetState(const Arguments& args) {
                                 ^~~~~~~~~
                                 v8::internal::Arguments
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:134:7: note: 
      'v8::internal::Arguments' declared here
class Arguments;
      ^
../lib/nn.cc:717:15: error: calling a protected constructor of class
      'v8::HandleScope'
  HandleScope scope;
              ^
/Users/Johannes/.node-gyp/2.2.1/deps/v8/include/v8.h:869:13: note: declared
      protected here
  V8_INLINE HandleScope() {}
            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/nn/lib/nn.o] Error 1
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:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Johannes/Documents/Development/holmes/node_modules/neuraln
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install" "neuraln" "--save-dev"
npm ERR! node v2.2.1
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Johannes/Documents/Development/holmes/npm-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions