vesteraas / node-pitft

A C++ extension for node.js that gives javascript access to the PiTFT framebuffer
32 stars 15 forks source link

[v12.7.0] Fails to compile #17

Open Turbine1991 opened 5 years ago

Turbine1991 commented 5 years ago

I'm unable to install pitft using node.js v12.7.0 on Armbian - Ubuntu Bionic.

pi@pizero:~/projects/lcd$ npm install pitft

pitft@0.0.17 install /home/pi/projects/lcd/node_modules/pitft node-gyp rebuild

make: Entering directory '/home/pi/projects/lcd/node_modules/pitft/build' CXX(target) Release/obj.target/pitft/src/pitft.o ../src/pitft.cc:11:14: error: variable or field 'InitAll' declared void void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:14: error: 'Handle' was not declared in this scope ../src/pitft.cc:11:14: note: suggested alternative: 'rand_r' void InitAll(Handle exports, Handle module) { ^~ rand_r ../src/pitft.cc:11:27: error: expected primary-expression before '>' token void InitAll(Handle exports, Handle module) { ^ ../src/pitft.cc:11:29: error: 'exports' was not declared in this scope void InitAll(Handle exports, Handle module) { ^~~ ../src/pitft.cc:11:38: error: 'Handle' was not declared in this scope void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:38: note: suggested alternative: 'rand_r' void InitAll(Handle exports, Handle module) { ^~ rand_r ../src/pitft.cc:11:51: error: expected primary-expression before '>' token void InitAll(Handle exports, Handle module) { ^ ../src/pitft.cc:11:53: error: 'module' was not declared in this scope void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:53: note: suggested alternative: 'mode_t' void InitAll(Handle exports, Handle module) { ^~ mode_t In file included from ../../nan/nan.h:54:0, from ../src/pitft.cc:1: ../src/pitft.cc:20:20: error: 'InitAll' was not declared in this scope NODE_MODULE(pitft, InitAll) ^ /home/pi/.cache/node-gyp/12.7.0/include/node/node.h:556:36: note: in definition of macro 'NODE_MODULE_X' (node::addon_register_func) (regfunc), \ ^~~ ../src/pitft.cc:20:1: note: in expansion of macro 'NODE_MODULE' NODE_MODULE(pitft, InitAll) ^~~ pitft.target.mk:118: recipe for target 'Release/obj.target/pitft/src/pitft.o' faile d make: *** [Release/obj.target/pitft/src/pitft.o] Error 1 make: Leaving directory '/home/pi/projects/lcd/node_modules/pitft/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/n ode-gyp/lib/build.js:196:23) gyp ERR! stack at ChildProcess.emit (events.js:203:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.j s:272:12) gyp ERR! System Linux 4.19.62-sunxi gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/b in/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/projects/lcd/node_modules/pitft gyp ERR! node -v v12.7.0 gyp ERR! node-gyp -v v5.0.3 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open '/home/pi/projects/lcd/pack age.json' npm WARN lcd No description npm WARN lcd No repository field. npm WARN lcd No README data npm WARN lcd No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pitft@0.0.17 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pitft@0.0.17 install script. npm ERR! This is probably not a problem with npm. There is likely additional loggin g output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-08-09T03_09_09_402Z-debug.log

fahrsoft commented 3 years ago

Same here on Pi Zero.

npm install pitft

pitft@0.0.17 install /home/pi/.node-red/node_modules/pitft node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node_modules/pitft/build' CXX(target) Release/obj.target/pitft/src/pitft.o ../src/pitft.cc:11:14: error: variable or field ‘InitAll’ declared void void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:14: error: ‘Handle’ was not declared in this scope ../src/pitft.cc:11:14: note: suggested alternative: ‘rand_r’ void InitAll(Handle exports, Handle module) { ^~ rand_r ../src/pitft.cc:11:27: error: expected primary-expression before ‘>’ token void InitAll(Handle exports, Handle module) { ^ ../src/pitft.cc:11:29: error: ‘exports’ was not declared in this scope void InitAll(Handle exports, Handle module) { ^~~ ../src/pitft.cc:11:38: error: ‘Handle’ was not declared in this scope void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:38: note: suggested alternative: ‘rand_r’ void InitAll(Handle exports, Handle module) { ^~ rand_r ../src/pitft.cc:11:51: error: expected primary-expression before ‘>’ token void InitAll(Handle exports, Handle module) { ^ ../src/pitft.cc:11:53: error: ‘module’ was not declared in this scope void InitAll(Handle exports, Handle module) { ^~ ../src/pitft.cc:11:53: note: suggested alternative: ‘node’ void InitAll(Handle exports, Handle module) { ^~ node In file included from ../../nan/nan.h:56, from ../src/pitft.cc:1: ../src/pitft.cc:20:20: error: ‘InitAll’ was not declared in this scope NODE_MODULE(pitft, InitAll) ^~~ /home/pi/.cache/node-gyp/12.20.0/include/node/node.h:737:36: note: in definition of macro ‘NODE_MODULE_X’ (node::addon_register_func) (regfunc), \ ^~~ ../src/pitft.cc:20:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(pitft, InitAll) ^~~ make: *** [pitft.target.mk:124: Release/obj.target/pitft/src/pitft.o] Error 1 make: Leaving directory '/home/pi/.node-red/node_modules/pitft/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:314:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Linux 5.4.79+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/.node-red/node_modules/pitft gyp ERR! node -v v12.20.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pitft@0.0.17 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pitft@0.0.17 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2020-12-31T21_54_44_810Z-debug.log