-
Notifications
You must be signed in to change notification settings - Fork 3
Update bindings to compile under multiple node versions#3
Open
davidcroda wants to merge 4 commits into
Open
Conversation
davidcroda
commented
Jun 28, 2015
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.
davidcroda
commented
Jun 28, 2015
Author
Ok, redid this using nan. All tests are green on my build, hoping this fares better on Node < 0.12
@davidcroda
davidcroda
force-pushed
the
master
branch
from
June 28, 2015 16:33
054416b to
50072a9
Compare
@davidcroda
davidcroda
changed the title
(削除) Update bindings to compile under v8 0.12 (削除ここまで)
(追記) Update bindings to compile under multiple node versions (追記ここまで)
Jun 28, 2015
@davidcroda
davidcroda
force-pushed
the
master
branch
from
August 28, 2015 23:00
cdabfb6 to
ee545b2
Compare
ismell
commented
Nov 3, 2015
+1 merge this in!
ismell
commented
Nov 3, 2015
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
davidcroda
commented
Nov 3, 2015
Author
This PR is to support Node v0.12 . You are building on Node v5.0.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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