Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update bindings to compile under multiple node versions#3

Open
davidcroda wants to merge 4 commits into
pingjiang:master from
davidcroda:master
Open

Update bindings to compile under multiple node versions #3
davidcroda wants to merge 4 commits into
pingjiang:master from
davidcroda:master

Conversation

@davidcroda

@davidcroda davidcroda commented Jun 28, 2015

Copy link
Copy Markdown

v8 0.12 has a number of breaking changes, and this module can no longer be installed on many systems which default to node 0.12+

I updated it to the current API. It compiles on Node v0.12.5. All tests pass.

Fixes #2

Copy link
Copy Markdown
Author

Hmm. Since this completely breaks the build on Node < 0.12 (which I should have probably anticipated) I am going to close this for now. Going to take a crack at updating it to use nan instead which I believe should handle the differences between versions.

Copy link
Copy Markdown
Author

Ok, redid this using nan. All tests are green on my build, hoping this fares better on Node < 0.12

@davidcroda davidcroda changed the title (削除) Update bindings to compile under v8 0.12 (削除ここまで) (追記) Update bindings to compile under multiple node versions (追記ここまで) Jun 28, 2015

ismell commented Nov 3, 2015

Copy link
Copy Markdown

+1 merge this in!

ismell commented Nov 3, 2015

Copy link
Copy Markdown

I actually just got an error

In file included from ../src/binding.cc:5:
 ../node_modules/nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'
 return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
 ~~~~~~~~~~~~~~^
 In file included from ../src/binding.cc:1:
 In file included from /Users/me/.node-gyp/5.0.0/include/node/node.h:42:
 /Users/me/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
 TYPE_CHECK(T, S);
 ^~~~~~~~~~~~~~~~
 /Users/me/.node-gyp/5.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:501:12: note: in instantiation of function template specialization
 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
 return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
 ^
 ../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
 # define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
 ^
 In file included from ../src/binding.cc:1:
 In file included from /Users/me/.node-gyp/5.0.0/include/node/node.h:42:
 /Users/me/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
 TYPE_CHECK(T, S);
 ^~~~~~~~~~~~~~~~
 /Users/me/.node-gyp/5.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:511:12: note: in instantiation of function template specialization
 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
 return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
 ^
 ../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
 # define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
 ^
 In file included from ../src/binding.cc:1:
 In file included from /Users/me/.node-gyp/5.0.0/include/node/node.h:42:
 /Users/me/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
 TYPE_CHECK(T, S);
 ^~~~~~~~~~~~~~~~
 /Users/me/.node-gyp/5.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:1645:12: note: in instantiation of function template specialization
 'v8::Local<v8::Function>::Local<v8::Value>' requested here
 return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
 ^
 ../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
 # define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
 ^
 In file included from ../src/binding.cc:1:
 In file included from /Users/me/.node-gyp/5.0.0/include/node/node.h:42:
 /Users/me/.node-gyp/5.0.0/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
 TYPE_CHECK(T, S);
 ^~~~~~~~~~~~~~~~
 /Users/me/.node-gyp/5.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:1776:12: note: in instantiation of function template specialization
 'v8::Local<v8::Object>::Local<v8::Value>' requested here
 return NanEscapeScope(
 ^
 ../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
 # define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
 ^
 10 errors generated.
 make: *** [Release/obj.target/unrar/src/binding.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:270: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:200:12)
 gyp ERR! System Darwin 15.0.0
 gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
 gyp ERR! cwd /Users/me/Projects/altBinariesNab/node_modules/node-rar-updated
 gyp ERR! node -v v5.0.0
 gyp ERR! node-gyp -v v3.0.3
 gyp ERR! not ok
 npm ERR! Darwin 15.0.0
 npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "node-rar-updated"
 npm ERR! node v5.0.0
 npm ERR! npm v3.3.9
 npm ERR! code ELIFECYCLE
 npm ERR! node-rar-updated@0.0.1 install: `node-gyp rebuild`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the node-rar-updated@0.0.1 install script 'node-gyp rebuild'.
 npm ERR! This is most likely a problem with the node-rar-updated 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 node-rar-updated
 npm ERR! There is likely additional logging output above.
 npm ERR! Please include the following file with any support request:
 npm ERR! /Users/me/Projects/altBinariesNab/npm-debug.log

Copy link
Copy Markdown
Author

This PR is to support Node v0.12 . You are building on Node v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /