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

can not compiler node v4.2.2 #14

Closed
xhsiung opened this issue Dec 4, 2015 · 2 comments
Closed

can not compiler node v4.2.2 #14

xhsiung opened this issue Dec 4, 2015 · 2 comments
Labels

Comments

@xhsiung
Copy link

xhsiung commented Dec 4, 2015

enviroment:
node -v v4.2.2
node-gyp -v v3.2.1

$node-gpy configure && node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.2.1
gyp info using node@4.2.2 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from ../src/binding.cc:4:0:
../src/py_object_wrapper.h:15:49: error: expected class-name before ‘{’ token
class PyObjectWrapper : public node::ObjectWrap {
^
../src/py_object_wrapper.h:28:40: error: ‘Arguments’ does not name a type
static Handle New(const Arguments& args);
^
../src/py_object_wrapper.h:28:51: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
static Handle New(const Arguments& args);
^
../src/py_object_wrapper.h:30:59: error: ‘AccessorInfo’ does not name a type
static Handle Get(Local key, const AccessorInfo& info);
^
../src/py_object_wrapper.h:30:73: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
static Handle Get(Local key, const AccessorInfo& info);
^
../src/py_object_wrapper.h:31:79: error: ‘AccessorInfo’ does not name a type
static Handle Set(Local key, Local value, const AccessorInfo& info);
^
../src/py_object_wrapper.h:31:93: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
static Handle Set(Local key, Local value, const AccessorInfo& info);
^
../src/py_object_wrapper.h:33:73: error: ‘AccessorInfo’ does not name a type
static Handle CallAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:33:87: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
static Handle CallAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:35:77: error: ‘AccessorInfo’ does not name a type
static Handle ToStringAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:35:91: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
static Handle ToStringAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:37:76: error: ‘AccessorInfo’ does not name a type
static Handle ValueOfAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:37:90: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
static Handle ValueOfAccessor(Local property, const AccessorInfo& info);
^
../src/py_object_wrapper.h:39:41: error: ‘Arguments’ does not name a type
static Handle Call(const Arguments& args);
^
../src/py_object_wrapper.h:39:52: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
static Handle Call(const Arguments& args);
^
../src/py_object_wrapper.h:41:45: error: ‘Arguments’ does not name a type
static Handle ToString(const Arguments& args);
^
../src/py_object_wrapper.h:41:56: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
static Handle ToString(const Arguments& args);
^
../src/py_object_wrapper.h:43:44: error: ‘Arguments’ does not name a type
static Handle ValueOf(const Arguments& args);
^
../src/py_object_wrapper.h:43:55: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
static Handle ValueOf(const Arguments& args);
^
../src/py_object_wrapper.h:53:42: error: ‘Arguments’ does not name a type
Handle InstanceCall(const Arguments& args);
^
../src/py_object_wrapper.h:53:53: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
Handle InstanceCall(const Arguments& args);
^
../src/py_object_wrapper.h:55:39: error: ‘Arguments’ does not name a type
string InstanceToString(const Arguments& args);
^
../src/py_object_wrapper.h:55:50: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
string InstanceToString(const Arguments& args);
^
../src/py_object_wrapper.h: In constructor ‘PyObjectWrapper::PyObjectWrapper(PyObject_)’:
../src/py_object_wrapper.h:19:58: error: expected class-name before ‘(’ token
PyObjectWrapper(PyObject_ obj) : node::ObjectWrap(), mPyObject(obj) {};
^
../src/py_object_wrapper.h:19:58: error: expected ‘{’ before ‘(’ token
../src/binding.cc: At global scope:
../src/binding.cc:12:26: error: ‘Arguments’ does not name a type
Handle eval(const Arguments& args) {
^
../src/binding.cc:12:37: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
Handle eval(const Arguments& args) {
^
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h: In function ‘v8::Handlev8::Value eval(const int&)’:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/binding.cc:13:17: error: within this context
HandleScope scope;
^
../src/binding.cc:14:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
if (args.Length() < 1 || !args[0]->IsString()) {
^
../src/binding.cc:14:37: error: invalid types ‘const int[int]’ for array subscript
if (args.Length() < 1 || !args[0]->IsString()) {
^
../src/binding.cc:16:30: error: ‘New’ is not a member of ‘v8::String’
Exception::Error(String::New("A string expression must be provided."))
^
../src/binding.cc:17:9: error: ‘ThrowException’ was not declared in this scope
);
^
In file included from /usr/include/python2.7/Python.h:127:0,
from ../src/binding.cc:2:
../src/binding.cc:20:84: error: invalid types ‘const int[int]’ for array subscript
PyCodeObject* code = (PyCodeObject_) Py_CompileString(String::Utf8Value(args[0]->ToString()), "eval", Py_eval_input);
^
/usr/include/python2.7/pythonrun.h:65:59: note: in definition of macro ‘Py_CompileString’
#define Py_CompileString(str, p, s) Py_CompileStringFlags(str, p, s, NULL)
^
../src/binding.cc:32:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(PyObjectWrapper::New(result));
^
../src/binding.cc: At global scope:
../src/binding.cc:35:30: error: ‘Arguments’ does not name a type
Handle finalize(const Arguments& args) {
^
../src/binding.cc:35:41: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
Handle finalize(const Arguments& args) {
^
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h: In function ‘v8::Handlev8::Value finalize(const int&)’:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/binding.cc:36:14: error: within this context
HandleScope scope;
^
../src/binding.cc:38:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(Undefined());
^
../src/binding.cc:38:34: error: too few arguments to function ‘v8::Localv8::Primitive v8::Undefined(v8::Isolate
)’
return scope.Close(Undefined());
^
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:315:27: note: declared here
friend Local Undefined(Isolate_ isolate);
^
../src/binding.cc: At global scope:
../src/binding.cc:41:28: error: ‘Arguments’ does not name a type
Handle import(const Arguments& args) {
^
../src/binding.cc:41:39: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
Handle import(const Arguments& args) {
^
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h: In function ‘v8::Handlev8::Value import(const int&)’:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/binding.cc:42:17: error: within this context
HandleScope scope;
^
../src/binding.cc:43:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
if (args.Length() < 1 || !args[0]->IsString()) {
^
../src/binding.cc:43:37: error: invalid types ‘const int[int]’ for array subscript
if (args.Length() < 1 || !args[0]->IsString()) {
^
../src/binding.cc:45:30: error: ‘New’ is not a member of ‘v8::String’
Exception::Error(String::New("I don't know how to import that."))
^
../src/binding.cc:46:9: error: ‘ThrowException’ was not declared in this scope
);
^
../src/binding.cc:52:65: error: invalid types ‘const int[int]’ for array subscript
module_name = PyUnicode_FromString(String::Utf8Value(args[0]->ToString()));
^
../src/binding.cc:64:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
return scope.Close(PyObjectWrapper::New(module));
^
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h: In function ‘void init(v8::Handlev8::Object)’:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:885:13: error: ‘v8::HandleScope::HandleScope()’ is protected
V8_INLINE HandleScope() {}
^
../src/binding.cc:68:17: error: within this context
HandleScope scope;
^
../src/binding.cc:77:9: error: ‘NewSymbol’ is not a member of ‘v8::String’
String::NewSymbol("eval"),
^
../src/binding.cc:78:35: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
FunctionTemplate::New(eval)->GetFunction()
^
../src/binding.cc:78:35: note: candidate is:
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate
, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int)
static Local New(
^
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&) {aka v8::Localv8::Value(const int&)}’ to ‘v8::Isolate_’
../src/binding.cc:83:9: error: ‘NewSymbol’ is not a member of ‘v8::String’
String::NewSymbol("finalize"),
^
../src/binding.cc:84:39: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
FunctionTemplate::New(finalize)->GetFunction()
^
../src/binding.cc:84:39: note: candidate is:
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int)
static Local New(
^
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&) {aka v8::Localv8::Value(const int&)}’ to ‘v8::Isolate_’
../src/binding.cc:89:9: error: ‘NewSymbol’ is not a member of ‘v8::String’
String::NewSymbol("import"),
^
../src/binding.cc:90:37: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handlev8::Value (&)(const int&))’
FunctionTemplate::New(import)->GetFunction()
^
../src/binding.cc:90:37: note: candidate is:
In file included from /home/xdna/.node-gyp/4.2.2/include/node/node.h:42:0,
from ../src/binding.cc:1:
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Localv8::Value, v8::Localv8::Signature, int)
static Local New(
^
/home/xdna/.node-gyp/4.2.2/include/node/v8.h:4349:34: note: no known conversion for argument 1 from ‘v8::Handlev8::Value(const int&) {aka v8::Localv8::Value(const int&)}’ to ‘v8::Isolate_’
../src/binding.cc:95:9: error: ‘NewSymbol’ is not a member of ‘v8::String’
String::NewSymbol("PyObject"),
^
../src/binding.cc:96:46: error: base operand of ‘->’ has non-pointer type ‘v8::Persistentv8::FunctionTemplate’
PyObjectWrapper::py_function_template->GetFunction()
^
../src/binding.cc: In function ‘v8::Handlev8::Value eval(const int&)’:
../src/binding.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
../src/binding.cc: In function ‘v8::Handlev8::Value finalize(const int&)’:
../src/binding.cc:39:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
../src/binding.cc: In function ‘v8::Handlev8::Value import(const int&)’:
../src/binding.cc:65:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from ../src/binding.cc:3:0:
/usr/include/python2.7/datetime.h: At global scope:
/usr/include/python2.7/datetime.h:188:25: warning: ‘PyDateTimeAPI’ defined but not used [-Wunused-variable]
static PyDateTime_CAPI *PyDateTimeAPI = NULL;
^
make: *_* [Release/obj.target/binding/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/node-gyp/lib/build.js:276: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 Linux 3.19.0-25-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "build"
gyp ERR! cwd /home/xdna/tmp/node-python
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok

@JeanSebTr
Copy link
Owner

Wow node v4.2.2!

I've originally fixed the lib for node 0.8 and 0.10.
I suppose a lot of things have changed with all the V8 updates.

I'm sorry but I don't have time to check that right now.
You can give a try at fixing it for node v4 if you want but you'll have to dive in C++ and V8 bindings :)

@xhsiung
Copy link
Author

xhsiung commented Dec 4, 2015

That is all right . i will try to fix it .
may i success . i hope .

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

No branches or pull requests

2 participants