shemanaev / node-lpt

High-level bindings to parallel port for node.js
MIT License
9 stars 3 forks source link

npm fails to install package -- error: ‘close’ was not declared in this scope #2

Closed humblewizard closed 9 years ago

humblewizard commented 9 years ago

Here is what I'm getting:

lpt@0.2.0 install /home/bob/node_modules/lpt node-gyp rebuild

make: Entering directory /home/bob/node_modules/lpt/build' CXX(target) Release/obj.target/lpt/src/binding.o CXX(target) Release/obj.target/lpt/src/port.o ../src/port.cc: In constructor ‘Port::Port(int)’: ../src/port.cc:25:18: error: ‘close’ was not declared in this scope close(handle_); ^ ../src/port.cc:30:18: error: ‘close’ was not declared in this scope close(handle_); ^ ../src/port.cc: In destructor ‘virtual Port::~Port()’: ../src/port.cc:37:16: error: ‘close’ was not declared in this scope close(handle_); ^ make: *** [Release/obj.target/lpt/src/port.o] Error 1 make: Leaving directory/home/bob/node_modules/lpt/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/share/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:797:12) gyp ERR! System Linux 3.13.0-40-generic gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/bob/node_modules/lpt gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v0.10.10 gyp ERR! not ok npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1

shemanaev commented 9 years ago

Try to install from master branch (npm i git+https://github.com/DeniSix/node-lpt.git), it should be working now.

humblewizard commented 9 years ago

Did that and it seems to have worked but I did get a warning:

 npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/DeniSix/node-lpt.git)
shemanaev commented 9 years ago

Well, that's related to npm, some people has that problem with git versions handling. I've just pushed new version to npm, so just update from there.

humblewizard commented 9 years ago

All good thanks. When reading from the data port I assume that any output written on those port pins needs to be tristated first. How do you handle changing from input to output on D0-D7 in your code?

shemanaev commented 9 years ago

I'm not really sure if data in/out works right, since i've used this code a long time ago mostly for control/status pins and don't have access to LPT ports now. AFAIR there might be used wrong parallel port mode and it acts as uni-directional. If it so it could be fixed pretty easily.

2015-02-23 20:57 GMT+03:00 Humblewizard notifications@github.com:

All good thanks. When reading from the data port I assume that any output written on those port pins needs to be tristated first. How do you handle changing from input to output on D0-D7 in your code?

— Reply to this email directly or view it on GitHub https://github.com/DeniSix/node-lpt/issues/2#issuecomment-75595327.