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

installation problem #1

Open
glued opened this issue Apr 21, 2013 · 1 comment
Open

installation problem #1

glued opened this issue Apr 21, 2013 · 1 comment

Comments

@glued
Copy link

glued commented Apr 21, 2013

Hi, i'm getting the following errors when attempting to install the package any ideas?

pi-led@1.0.0 install /home/pi/app/node_modules/pi-led
node-gyp rebuild

make: Entering directory /home/pi/app/node_modules/pi-led/build' CXX(target) Release/obj.target/bit_array/bit_array.o AR(target) Release/obj.target/bit_array.a COPY Release/bit_array.a CC(target) Release/obj.target/wiringPi/wiringPi.o ../wiringPi.c: In function ‘wiringPiSetup’: ../wiringPi.c:1119:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ../wiringPi.c:1138:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ../wiringPi.c:1157:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ../wiringPi.c:1176:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ../wiringPi.c:1200:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] AR(target) Release/obj.target/wiringPi.a COPY Release/wiringPi.a CC(target) Release/obj.target/wiringPiSPI/wiringPiSPI.o AR(target) Release/obj.target/wiringPiSPI.a COPY Release/wiringPiSPI.a CXX(target) Release/obj.target/PiLed/pi-led.o ../pi-led.cpp:1:23: fatal error: node/node.h: No such file or directory compilation terminated. make: *** [Release/obj.target/PiLed/pi-led.o] Error 1 make: Leaving directory/home/pi/app/node_modules/pi-led/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Linux 3.6.11+
gyp ERR! command "node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/app/node_modules/pi-led
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.3
gyp ERR! not ok
npm ERR! pi-led@1.0.0 install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the pi-led@1.0.0 install script.
npm ERR! This is most likely a problem with the pi-led 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 pi-led
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.6.11+
npm ERR! command "/opt/node/bin/node" "/opt/node/bin/npm" "install" "pi-led"
npm ERR! cwd /home/pi/app
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/app/npm-debug.log
npm ERR! not ok code 0

@ptitb
Copy link

ptitb commented Sep 27, 2013

I found that the includes:

#include < node/node.h >
#include < node/node_object_wrap.h >

Should become:

#include < node.h >
#include < node_object_wrap.h >

After this it creates another error which I can't seem to fix.

../pi-led.cpp: In static member function ‘static v8::Handlev8::Value {anonymous}::PiLed::WriteMessage(const v8::Arguments&)’:
../pi-led.cpp:509:77: error: invalid conversion from ‘void ()(uv_work_t) {aka void ()(uv_work_s)}’ to ‘uv_after_work_cb {aka void ()(uv_work_s, int)}’ [-fpermissive]
/home/pi/.node-gyp/0.10.17/deps/uv/include/uv.h:1432:15: error: initializing argument 4 of ‘int uv_queue_work(uv_loop_t_, uv_work_t_, uv_work_cb, uv_after_work_cb)’ [-fpermissive]

Maybe the author knows more?

EDIT

To fix installing with node 0.10 change line 509 in pi-led.cpp to:
int status = uv_queue_work(uv_default_loop(), req, AsyncWork, (uv_after_work_cb)AsyncAfter);

vramdal pushed a commit to vramdal/pi-led that referenced this issue Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants