darrylhodgins / piface-node

Node.js addon for Raspberry Pi & Piface
MIT License
24 stars 11 forks source link

npm install fails during gyp build #10

Open bobwirka opened 9 years ago

bobwirka commented 9 years ago

Following instructions per https://www.npmjs.com/package/piface-node. Have installed nodejs v0.12.2, and have compiled and installed the piface C libraries. Failure occurs with "sudo npm install -g piface-node" during gyp build. Lots of compile errors starting with:

CXX(target) Release/obj.target/pfio/pfio.o ../pfio.cc:7:30: error: ‘Arguments’ does not name a type

All errors relate to pfio.cc, lots of "v8::" references.

Ends with:

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: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 Linux 3.18.7+ gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/piface-node gyp ERR! node -v v0.12.1 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 3.18.7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "piface-node" npm ERR! node v0.12.1 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request: npm ERR! /usr/local/lib/npm-debug.log

Has anyone seen this before?

Thanks,

Bob Wirka

bobwirka commented 9 years ago

PS: The Python PiFace module is also installed, and works fine.

ALSO: Found a tarball of v0.0.6 at https://www.versioneye.com/nodejs/piface-node/0.0.6.

Upacked the tarball and ran "g++ pfio.cc"; got the same error messages that appeared when trying to install the package. Note: compiling from command line required that "node/" be prepended to the first two #includes.

bobwirka commented 9 years ago

UPDATE: Seem to have solved this. It only requires a complete rewrite of the pfio.cc file.

Check out : https://strongloop.com/strongblog/node-js-v0-12-c-apis-breaking

Looks like the V8 api has broken everything...

If anyone wants the new file, let me know.

Best,

Bob Wirka

Nikolaibibo commented 9 years ago

Hey! I ran into that error today but left the pi in the office... Maybe I'll catch up to you on the new file tomorrow. thx for sharing that!

Nikolaibibo commented 9 years ago

@bobwirka indeed the same error!

due to my bad linux experience, could you send the file over?

henryabra commented 9 years ago

@bobwirka Could you share the new file?

bobwirka commented 9 years ago

Gentlemen, I have a tarball of the modified v0.0.6 code, but am unable to attach it here. I'll insert the pfio.cc file inline below. Best, Bob Wirka

include

include <v8.h>

include <libpiface-1.0/pfio.h>

using namespace v8;

void PfioInit(const v8::FunctionCallbackInfov8::Value& args) { pfio_init(); }

void PfioDeinit(const v8::FunctionCallbackInfov8::Value& args) { pfio_deinit(); }

void PfioDigitalRead(const v8::FunctionCallbackInfov8::Value& args) { v8::Isolate* isolate = args.GetIsolate(); uint8_t pin = Integer::New(isolate , args[0]->IntegerValue())->Value(); uint8_t result = pfio_digital_read(pin); args.GetReturnValue().Set(static_cast(result)); }

void PfioDigitalWrite(const v8::FunctionCallbackInfov8::Value& args) { v8::Isolate* isolate = args.GetIsolate(); uint8_t pin = Integer::New(isolate , args[0]->IntegerValue())->Value(); uint8_t val = Integer::New(isolate , args[1]->IntegerValue())->Value(); pfio_digital_write(pin, val); }

void PfioReadInput(const v8::FunctionCallbackInfov8::Value& args) { uint8_t val = pfio_read_input(); args.GetReturnValue().Set(static_cast(val)); }

void PfioReadOutput(const v8::FunctionCallbackInfov8::Value& args) { uint8_t val = pfio_read_output(); args.GetReturnValue().Set(static_cast(val)); }

void PfioWriteOutput(const v8::FunctionCallbackInfov8::Value& args) { v8::Isolate* isolate = args.GetIsolate(); uint8_t val = Integer::New(isolate , args[0]->IntegerValue())->Value(); pfio_write_output(val); }

void init(Handle exports) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); exports->Set(String::NewFromUtf8(isolate , "init"), FunctionTemplate::New(isolate , PfioInit)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "deinit"), FunctionTemplate::New(isolate , PfioDeinit)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "digital_read"), FunctionTemplate::New(isolate , PfioDigitalRead)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "digital_write"), FunctionTemplate::New(isolate , PfioDigitalWrite)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "read_input"), FunctionTemplate::New(isolate , PfioReadInput)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "read_output"), FunctionTemplate::New(isolate , PfioReadOutput)->GetFunction()); exports->Set(String::NewFromUtf8(isolate , "write_output"), FunctionTemplate::New(isolate , PfioWriteOutput)->GetFunction()); }

NODE_MODULE(pfio, init);

bobwirka commented 9 years ago

Must apologize for that inline code, "less than" symbols screwed up the #includes, and much formatting was lost. If anyone can tell me how to add attachment here, I'd appreciate it. Best, Bob Wirka

bobwirka commented 9 years ago

You should check out the latest version from Darryl Hodgins. It looks like he's modified it to use "nan" (Don't know what that is yet). He may have fixed this issue in a simpler way. UPDATE: "nan" is a package that apparently wraps operations so they work for old & new versions of V8. Looks as if you'd spend some time figuring out how to use it... Best, Bob Wirka

dneykov commented 8 years ago

Hi everybody, I'm getting same errors, following the instructions. Can somebody help with? Thanks in advance.

LazyDave76 commented 8 years ago

I just hit the same problem using : npm install piface-node

Got it installed without error using: npm install https://github.com/darrylhodgins/piface-node

maurizma commented 8 years ago

HI everyone, I am trying to install with npm install https://github.com/darrylhodgins/piface-node on node v4.2.1 npm v2.14.7 and I get errors when node-gyp tries to rebuild...

make: Entering directory '/home/pi/node_modules/piface-node/build' CXX(target) Release/obj.target/pfio/pfio.o In file included from ../pfio.cc:2:0: ../node_modules/nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’ NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) { ^ ../node_modules/nan/nan.h:319:17: note: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) { ^ ../node_modules/nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’ NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) { ^ ../node_modules/nan/nan.h:334:27: note: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) { ^ ../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback

Any suggestions and help is very appreciated!! Thanks!

dneykov commented 8 years ago

With node v5.9.1 and npm v3.7.3 I have following error.

make: Entering directory '/home/pi/parkzz_core/node_modules/piface-node/build' CXX(target) Release/obj.target/pfio/pfio.o ../pfio.cc:7:30: error: ‘Arguments’ does not name a type Handle<Value> PfioInit(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioInit(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:8:14: error: within this context HandleScope scope; ^ ../pfio.cc:10:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Undefined()); ^ ../pfio.cc:10:31: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’ return scope.Close(Undefined()); ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:315:27: note: declared here friend Local<Primitive> Undefined(Isolate* isolate); ^ ../pfio.cc: At global scope: ../pfio.cc:13:32: error: ‘Arguments’ does not name a type Handle<Value> PfioDeinit(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioDeinit(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:14:14: error: within this context HandleScope scope; ^ ../pfio.cc:16:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Undefined()); ^ ../pfio.cc:16:31: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’ return scope.Close(Undefined()); ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:315:27: note: declared here friend Local<Primitive> Undefined(Isolate* isolate); ^ ../pfio.cc: At global scope: ../pfio.cc:19:37: error: ‘Arguments’ does not name a type Handle<Value> PfioDigitalRead(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioDigitalRead(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:20:14: error: within this context HandleScope scope; ^ ../pfio.cc:21:35: error: invalid types ‘const int[int]’ for array subscript uint8_t pin = Integer::New(args[0]->IntegerValue())->Value(); ^ ../pfio.cc:23:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Integer::New(result)); ^ ../pfio.cc:23:40: error: no matching function for call to ‘v8::Integer::New(uint8_t&)’ return scope.Close(Integer::New(result)); ^ ../pfio.cc:23:40: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t) static Local<Integer> New(Isolate* isolate, int32_t value); ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: candidate expects 2 arguments, 1 provided ../pfio.cc: At global scope: ../pfio.cc:26:38: error: ‘Arguments’ does not name a type Handle<Value> PfioDigitalWrite(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioDigitalWrite(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:27:14: error: within this context HandleScope scope; ^ ../pfio.cc:28:35: error: invalid types ‘const int[int]’ for array subscript uint8_t pin = Integer::New(args[0]->IntegerValue())->Value(); ^ ../pfio.cc:29:35: error: invalid types ‘const int[int]’ for array subscript uint8_t val = Integer::New(args[1]->IntegerValue())->Value(); ^ ../pfio.cc:31:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Undefined()); ^ ../pfio.cc:31:31: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’ return scope.Close(Undefined()); ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:315:27: note: declared here friend Local<Primitive> Undefined(Isolate* isolate); ^ ../pfio.cc: At global scope: ../pfio.cc:34:35: error: ‘Arguments’ does not name a type Handle<Value> PfioReadInput(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioReadInput(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:35:14: error: within this context HandleScope scope; ^ ../pfio.cc:37:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Integer::New(val)); ^ ../pfio.cc:37:37: error: no matching function for call to ‘v8::Integer::New(uint8_t&)’ return scope.Close(Integer::New(val)); ^ ../pfio.cc:37:37: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t) static Local<Integer> New(Isolate* isolate, int32_t value); ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: candidate expects 2 arguments, 1 provided ../pfio.cc: At global scope: ../pfio.cc:40:36: error: ‘Arguments’ does not name a type Handle<Value> PfioReadOutput(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioReadOutput(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:41:14: error: within this context HandleScope scope; ^ ../pfio.cc:43:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Integer::New(val)); ^ ../pfio.cc:43:37: error: no matching function for call to ‘v8::Integer::New(uint8_t&)’ return scope.Close(Integer::New(val)); ^ ../pfio.cc:43:37: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t) static Local<Integer> New(Isolate* isolate, int32_t value); ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:2496:25: note: candidate expects 2 arguments, 1 provided ../pfio.cc: At global scope: ../pfio.cc:46:37: error: ‘Arguments’ does not name a type Handle<Value> PfioWriteOutput(const Arguments& args) { ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h: In function ‘v8::Handle<v8::Value> PfioWriteOutput(const int&)’: /home/pi/.node-gyp/5.9.1/include/node/v8.h:889:13: error: ‘v8::HandleScope::HandleScope()’ is protected V8_INLINE HandleScope() {} ^ ../pfio.cc:47:14: error: within this context HandleScope scope; ^ ../pfio.cc:48:35: error: invalid types ‘const int[int]’ for array subscript uint8_t val = Integer::New(args[0]->IntegerValue())->Value(); ^ ../pfio.cc:50:15: error: ‘class v8::HandleScope’ has no member named ‘Close’ return scope.Close(Undefined()); ^ ../pfio.cc:50:31: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’ return scope.Close(Undefined()); ^ In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:315:27: note: declared here friend Local<Primitive> Undefined(Isolate* isolate); ^ ../pfio.cc: In function ‘void init(v8::Handle<v8::Object>)’: ../pfio.cc:54:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("init"), ^ ../pfio.cc:55:33: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioInit)->GetFunction()); ^ ../pfio.cc:55:33: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:56:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("deinit"), ^ ../pfio.cc:57:35: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioDeinit)->GetFunction()); ^ ../pfio.cc:57:35: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:58:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("digital_read"), ^ ../pfio.cc:59:40: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioDigitalRead)->GetFunction()); ^ ../pfio.cc:59:40: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:60:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("digital_write"), ^ ../pfio.cc:61:41: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioDigitalWrite)->GetFunction()); ^ ../pfio.cc:61:41: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:62:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("read_input"), ^ ../pfio.cc:63:38: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioReadInput)->GetFunction()); ^ ../pfio.cc:63:38: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:64:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("read_output"), ^ ../pfio.cc:65:39: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioReadOutput)->GetFunction()); ^ ../pfio.cc:65:39: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc:66:15: error: ‘NewSymbol’ is not a member of ‘v8::String’ exports->Set(String::NewSymbol("write_output"), ^ ../pfio.cc:67:40: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’ FunctionTemplate::New(PfioWriteOutput)->GetFunction()); ^ ../pfio.cc:67:40: note: candidate is: In file included from /home/pi/.node-gyp/5.9.1/include/node/node.h:42:0, from ../pfio.cc:1: /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int) static Local<FunctionTemplate> New( ^ /home/pi/.node-gyp/5.9.1/include/node/v8.h:4348:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioInit(const int&)’: ../pfio.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioDeinit(const int&)’: ../pfio.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioDigitalRead(const int&)’: ../pfio.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioDigitalWrite(const int&)’: ../pfio.cc:32:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioReadInput(const int&)’: ../pfio.cc:38:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioReadOutput(const int&)’: ../pfio.cc:44:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../pfio.cc: In function ‘v8::Handle<v8::Value> PfioWriteOutput(const int&)’: ../pfio.cc:51:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ pfio.target.mk:88: recipe for target 'Release/obj.target/pfio/pfio.o' failed make: *** [Release/obj.target/pfio/pfio.o] Error 1 make: Leaving directory '/home/pi/parkzz_core/node_modules/piface-node/build'

The errors above are if I try to install it via npm install piface-node. If I try npm install https://github.com/darrylhodgins/piface-node Getting same error as @maurizma above

Anyone can help? Thanks in advance.

mhelskya commented 8 years ago

I had similar problems with piface-module (probably the same as piface-node). Anyway, the gyp didn't work and npm insisted, that there's something wrong with the module to be installed.

Finally after all updates, upgrades, etc. I was pretty sure, that the problem must be with gcc itself. I had 4.6.x, I upgraded it to 4.9.2 and did npm install again -> it worked !!

I followed these steps to upgrade gcc: https://community.thinger.io/t/starting-with-the-raspberry-pi/36

Cheers ! Marko