santigimeno / node-pcsclite

Bindings over pcsclite to access Smart Cards
ISC License
170 stars 127 forks source link

node-gyp cannot build #4

Closed gausie closed 11 years ago

gausie commented 11 years ago

Hi there. I get the following error when I try to npm install pcsclite

> pcsclite@0.0.3 install /home/pi/nodelock/node_modules/pcsclite
> node-gyp rebuild

make: Entering directory `/home/pi/nodelock/node_modules/pcsclite/build'
  CXX(target) Release/obj.target/pcsclite/src/addon.o
  CXX(target) Release/obj.target/pcsclite/src/pcsclite.o
../src/pcsclite.cpp: In static member function ‘static void* PCSCLite::HandlerFunction(void*)’:
../src/pcsclite.cpp:126:47: warning: missing initializer for member ‘SCARD_READERSTATE::pvUserData’ [-Wmissing-field-initializers]
../src/pcsclite.cpp:126:47: warning: missing initializer for member ‘SCARD_READERSTATE::dwCurrentState’ [-Wmissing-field-initializers]
../src/pcsclite.cpp:126:47: warning: missing initializer for member ‘SCARD_READERSTATE::dwEventState’ [-Wmissing-field-initializers]
../src/pcsclite.cpp:126:47: warning: missing initializer for member ‘SCARD_READERSTATE::cbAtr’ [-Wmissing-field-initializers]
../src/pcsclite.cpp:126:47: warning: missing initializer for member ‘SCARD_READERSTATE::rgbAtr’ [-Wmissing-field-initializers]
  CXX(target) Release/obj.target/pcsclite/src/cardreader.o
../src/cardreader.cpp: In static member function ‘static v8::Handle<v8::Value> CardReader::Connect(const v8::Arguments&)’:
../src/cardreader.cpp:110:91: 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.20/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]
../src/cardreader.cpp: In static member function ‘static v8::Handle<v8::Value> CardReader::Disconnect(const v8::Arguments&)’:
../src/cardreader.cpp:136:97: 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.20/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]
../src/cardreader.cpp: In static member function ‘static v8::Handle<v8::Value> CardReader::Transmit(const v8::Arguments&)’:
../src/cardreader.cpp:192:93: 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.20/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]
../src/cardreader.cpp: In static member function ‘static void* CardReader::HandlerFunction(void*)’:
../src/cardreader.cpp:258:47: warning: missing initializer for member ‘SCARD_READERSTATE::pvUserData’ [-Wmissing-field-initializers]
../src/cardreader.cpp:258:47: warning: missing initializer for member ‘SCARD_READERSTATE::dwCurrentState’ [-Wmissing-field-initializers]
../src/cardreader.cpp:258:47: warning: missing initializer for member ‘SCARD_READERSTATE::dwEventState’ [-Wmissing-field-initializers]
../src/cardreader.cpp:258:47: warning: missing initializer for member ‘SCARD_READERSTATE::cbAtr’ [-Wmissing-field-initializers]
../src/cardreader.cpp:258:47: warning: missing initializer for member ‘SCARD_READERSTATE::rgbAtr’ [-Wmissing-field-initializers]
make: *** [Release/obj.target/pcsclite/src/cardreader.o] Error 1
make: Leaving directory `/home/pi/nodelock/node_modules/pcsclite/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:789: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/nodelock/node_modules/pcsclite
gyp ERR! node -v v0.10.20
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

Any ideas?

santigimeno commented 11 years ago

Yes, at the moment the module does not compile in v0.10.x, just in v0.8.x. I'll try to fix it ASAP

santigimeno commented 11 years ago

@gausie , can you please test with master and report how it goes? Thanks!

gausie commented 11 years ago

It built!

santigimeno commented 11 years ago

Fixed by commit 194351d13dc3ee6f506bfc9d4b49244b6b318a12