bengfarrell / nuimotion

Node.js wrapper for OpenNI/NiTE offering skeletal joint tracking and gestures
http://www.sweatintotheweb.com/nuimotion-for-node-js/
MIT License
74 stars 19 forks source link

nw-gyp rebuild fail #17

Closed gustavojordan closed 4 years ago

gustavojordan commented 10 years ago

I am not able build with node-webkit nw-gyp rebuild --target=0.10.3


 SOLINK_MODULE(target) Release/copy-files.node
  SOLINK_MODULE(target) Release/copy-files.node: Finished
  CXX(target) Release/obj.target/nuimotion-depth/src/Depth.o
In file included from ../src/Depth.cpp:13:
../src/Depth.h:62:32: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> initialize(const Arguments& args);
                               ^~~~~~~~~
                               v8::internal::Arguments
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Depth.cpp:13:
../src/Depth.h:63:27: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> close(const Arguments& args);
                          ^~~~~~~~~
                          v8::internal::Arguments
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Depth.cpp:13:
../src/Depth.h:64:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> getDepthFrame(const Arguments& args);
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/Depth.cpp:13:
../src/Depth.h:65:33: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> getRGBFrame(const Arguments& args);
                                ^~~~~~~~~
                                v8::internal::Arguments
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/Depth.cpp:26:25: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(String::NewSymbol("init"),
                ~~~~~~~~^
../src/Depth.cpp:28:25: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(String::NewSymbol("close"),
                ~~~~~~~~^
../src/Depth.cpp:30:25: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(String::NewSymbol("getDepthFrame"),
                ~~~~~~~~^
../src/Depth.cpp:32:25: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(String::NewSymbol("getRGBFrame"),
                ~~~~~~~~^
../src/Depth.cpp:34:39: error: 'New' is a private member of 'v8::PersistentBase<v8::Object>'
    context_obj = Persistent<Object>::New(Object::New());
                                      ^
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:594:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../src/Depth.cpp:34:55: error: too few arguments to function call, single argument 'isolate' was not specified
    context_obj = Persistent<Object>::New(Object::New());
                                          ~~~~~~~~~~~ ^
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:2461:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
../src/Depth.cpp:35:25: error: no member named 'New' in 'v8::String'
    target->Set(String::New("context"), context_obj);
                ~~~~~~~~^
../src/Depth.cpp:43:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> getDepthFrame(const Arguments& args) {
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/Depth.cpp:44:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/Depth.cpp:46:37: error: too few arguments to function call, single argument 'isolate' was not specified
    Local<Object> obj = Object::New();
                        ~~~~~~~~~~~ ^
/Users/gustavo/.nw-gyp/0.10.3/deps/v8/include/v8.h:2461:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
../src/Depth.cpp:47:22: error: no member named 'NewSymbol' in 'v8::String'
    obj->Set(String::NewSymbol("type"), String::NewSymbol("depth"));
             ~~~~~~~~^
../src/Depth.cpp:48:22: error: no member named 'NewSymbol' in 'v8::String'
    obj->Set(String::NewSymbol("width"), Number::New( dFrameWidth ));
             ~~~~~~~~^
../src/Depth.cpp:49:22: error: no member named 'NewSymbol' in 'v8::String'
    obj->Set(String::NewSymbol("height"), Number::New( dFrameHeight ));
             ~~~~~~~~^
../src/Depth.cpp:53:11: error: unexpected namespace name 'Buffer': expected expression
    node::Buffer *slowBuffer = node::Buffer::New(dFrameDataSize);
          ^
../src/Depth.cpp:53:19: error: use of undeclared identifier 'slowBuffer'
    node::Buffer *slowBuffer = node::Buffer::New(dFrameDataSize);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/nuimotion-depth/src/Depth.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/nw-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/bin/nw-gyp" "rebuild" "--target=0.10.3"
gyp ERR! cwd /Users/gustavo/teste/node_modules/nuimotion
gyp ERR! node -v v0.10.31
gyp ERR! nw-gyp -v v0.12.2
gyp ERR! not ok 
bengfarrell commented 10 years ago

Sigh, I've been over in the node-opencv repo lately trying to get that building in Atom-Shell. It's a similar situation here. Atom-Shell and Node Webkit ship with Node.js 0.11.x these days. The API for dealing with the Javascript bridge completely changed, so it will take a rewrite.

I'm pretty busy, but I'm doing a talk soon on this stuff, so I'm hoping to give this an update over the next month.

In the meantime, I'm fairly sure I've tested this on older versions of Node Webkit (one that uses Node.js <= 0.10.x)

mscreenie commented 9 years ago

Any updates @bengfarrell ? Thanks for your tremendous work so far!

bengfarrell commented 9 years ago

Sorry no, this project has completely fallen off my radar in favor of other things. I would like to revisit, but just haven't had the time. If anyone wants to give it a shot - it should be a matter of using NAN to abstract the differences between old Node and new Node. I'm not sure if it's super easy or not so much.