Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node 0.11 support #29

Closed
redchair123 opened this issue Aug 12, 2013 · 8 comments
Closed

node 0.11 support #29

redchair123 opened this issue Aug 12, 2013 · 8 comments

Comments

@redchair123
Copy link

No description provided.

@TooTallNate
Copy link
Owner

Depending on node-ffi/node-ffi#163 to be merged at this point.

@johnjelinek
Copy link

Also, node 0.12 support:

▶ npm install NodObjC
|
> ref@0.3.5 install /Users/jjelinek/Projects/nodobjc-test/node_modules/NodObjC/node_modules/ref
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/binding/src/binding.o
  SOLINK_MODULE(target) Release/binding.node
  SOLINK_MODULE(target) Release/binding.node: Finished

> ffi@1.2.7 install /Users/jjelinek/Projects/nodobjc-test/node_modules/NodObjC/node_modules/ffi
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin.o
  CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin64.o
  LIBTOOL-STATIC Release/libffi.a
  CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
In file included from ../src/ffi.cc:2:
../src/ffi.h:57:43: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> FFIPrepCif(const Arguments& args);
                                          ^~~~~~~~~
                                          v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/ffi.cc:2:
../src/ffi.h:58:46: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> FFIPrepCifVar(const Arguments& args);
                                             ^~~~~~~~~
                                             v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/ffi.cc:2:
../src/ffi.h:59:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> FFICall(const Arguments& args);
                                       ^~~~~~~~~
                                       v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/ffi.cc:2:
../src/ffi.h:60:45: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> FFICallAsync(const Arguments& args);
                                            ^~~~~~~~~
                                            v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/ffi.cc:2:
../src/ffi.h:64:40: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Strtoul(const Arguments& args);
                                       ^~~~~~~~~
                                       v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/ffi.cc:2:
../src/ffi.h:94:41: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Callback(const Arguments& args);
                                        ^~~~~~~~~
                                        v8::internal::Arguments
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/ffi.cc:19:15: error: calling a protected constructor of class 'v8::HandleScope'
  HandleScope scope;
              ^
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/ffi.cc:21:3: error: unexpected namespace name 'Buffer': expected expression
  Buffer *buf = Buffer::New(ptr, length, wrap_pointer_cb, user_data);
  ^
../src/ffi.cc:21:11: error: use of undeclared identifier 'buf'
  Buffer *buf = Buffer::New(ptr, length, wrap_pointer_cb, user_data);
          ^
../src/ffi.cc:22:16: error: no member named 'Close' in 'v8::HandleScope'
  return scope.Close(buf->handle_);
         ~~~~~ ^
../src/ffi.cc:22:22: error: use of undeclared identifier 'buf'
  return scope.Close(buf->handle_);
                     ^
../src/ffi.cc:28:33: error: too few arguments to function call, single argument 'isolate' was not specified
  Local<Object> o = Object::New();
                    ~~~~~~~~~~~ ^
/Users/jjelinek/.node-gyp/0.12.0/deps/v8/include/v8.h:2388:3: note: 'New' declared here
  static Local<Object> New(Isolate* isolate);
  ^
../src/ffi.cc:31:18: error: no member named 'NewSymbol' in 'v8::String'
  o->Set(String::NewSymbol("dlopen"),  WrapPointer((char *)dlopen));
         ~~~~~~~~^
../src/ffi.cc:32:18: error: no member named 'NewSymbol' in 'v8::String'
  o->Set(String::NewSymbol("dlclose"), WrapPointer((char *)dlclose));
         ~~~~~~~~^
../src/ffi.cc:33:18: error: no member named 'NewSymbol' in 'v8::String'
  o->Set(String::NewSymbol("dlsym"),   WrapPointer((char *)dlsym));
         ~~~~~~~~^
../src/ffi.cc:34:18: error: no member named 'NewSymbol' in 'v8::String'
  o->Set(String::NewSymbol("dlerror"), WrapPointer((char *)dlerror));
         ~~~~~~~~^
../src/ffi.cc:36:23: error: no member named 'NewSymbol' in 'v8::String'
  target->Set(String::NewSymbol("StaticFunctions"), o);
              ~~~~~~~~^
../src/ffi.cc:49:3: error: no matching function for call to 'NODE_SET_METHOD'
  NODE_SET_METHOD(target, "ffi_prep_cif", FFIPrepCif);
  ^~~~~~~~~~~~~~~
/Users/jjelinek/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
                        ^~~~~~~~~~~~~~~~~~~~~
/Users/jjelinek/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handle<v8::Object>] not viable: no known conversion from 'Handle<v8::Value> (const v8::internal::Arguments &)' to
      'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd argument
inline void NODE_SET_METHOD(const TypeName& recv,
            ^
../src/ffi.cc:50:3: error: no matching function for call to 'NODE_SET_METHOD'
  NODE_SET_METHOD(target, "ffi_prep_cif_var", FFIPrepCifVar);
  ^~~~~~~~~~~~~~~
/Users/jjelinek/.node-gyp/0.12.0/src/node.h:240:25: note: expanded from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
                        ^~~~~~~~~~~~~~~~~~~~~
/Users/jjelinek/.node-gyp/0.12.0/src/node.h:228:13: note: candidate function [with TypeName = v8::Handle<v8::Object>] not viable: no known conversion from 'Handle<v8::Value> (const v8::internal::Arguments &)' to
      'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') for 3rd argument
inline void NODE_SET_METHOD(const TypeName& recv,
            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/ffi_bindings/src/ffi.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/jjelinek/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/Users/jjelinek/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jjelinek/Projects/nodobjc-test/node_modules/NodObjC/node_modules/ffi
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/jjelinek/.nvm/versions/node/v0.12.0/bin/node" "/Users/jjelinek/.nvm/versions/node/v0.12.0/bin/npm" "install" "NodObjC"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jjelinek/Projects/nodobjc-test/npm-debug.log

@CamHenlin
Copy link

Any workaround for node 0.12?

@TooTallNate
Copy link
Owner

Give 2.0.0 a try! (Note that the npm package name is lowercase nodobjc now… sorry for the annoyance but that's in the hands on the npm, inc. team at this point…)

@CamHenlin
Copy link

Didn't even notice the other package! Thanks for the pointer :)

@TooTallNate
Copy link
Owner

(I just created it)

@CamHenlin
Copy link

I see -- just ended up having to do the same thing with one of my modules. Also reporting that the new version works great 👍

@TooTallNate
Copy link
Owner

Cool. There's a few dev dependencies that don't build yet (memwatch, libxmljs), but the primary deps necessary to run NodObjC are working, so I'm gonna close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants