tuxnsk / nodejs_libmodbus

libmodbus binding for nodejs
41 stars 66 forks source link

Error during "make" libmodbus #8

Closed piemme closed 7 years ago

piemme commented 9 years ago

Hi, I'm tryng to install npm modbus module. After $ sudo npm install modbus

I obtain this log:

make all-recursive make[1]: Entering directory /home/paolo/node_modules/modbus/libmodbus' Making all in src make[2]: Entering directory/home/paolo/node_modules/modbus/libmodbus/src' CC modbus.lo CC modbus-data.lo CC modbus-rtu.lo modbus-rtu.c: In function '_modbus_rtu_close_mt': modbus-rtu.c:945:7: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result] write(ctx_mt->mtp_w, "q", 1); ^ cc1: all warnings being treated as errors make[2]: * [modbus-rtu.lo] Error 1 make[2]: Leaving directory `/home/paolo/node_modules/modbus/libmodbus/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory`/home/paolo/node_modules/modbus/libmodbus' make: *\ [all] Error 2

I'm using Ubuntu 14.04 LTS, I have installed libmodbus-dev libmodbus5 python-pymodbus dh-autoreconf autoconf

What can I do?

Thanks for support.

tuxnsk commented 9 years ago

fixed

piemme commented 9 years ago

Thanks Denis, now it works.

ptorrent commented 9 years ago

Hi

Same problem...

make: Entering directory /var/nodejs/node_modules/modbus/build' CXX(target) Release/obj.target/modbus_binding/src/main.o ../src/main.cpp:22:32: error: 'Arguments' does not name a type ../src/main.cpp:22:43: error: ISO C++ forbids declaration of 'args' with no type [-fpermissive] ../src/main.cpp: In function 'v8::Handle<v8::Value> js_new_rtu(const int&)': ../src/main.cpp:23:33: error: invalid types 'const int[int]' for array subscript .... make: Leaving directory/var/nodejs/node_modules/modbus/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/root/.nvm/v0.11.16/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.14.12-voyage gyp ERR! command "node" "/root/.nvm/v0.11.16/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" gyp ERR! cwd /var/nodejs/node_modules/modbus gyp ERR! node -v v0.11.16 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 3.14.12-voyage npm ERR! argv "/root/.nvm/v0.11.16/bin/node" "/root/.nvm/v0.11.16/bin/npm" "install" "modbus" npm ERR! node v0.11.16 npm ERR! npm v2.3.0 npm ERR! code ELIFECYCLE

npm ERR! modbus@0.0.13 install: ./make_libmodbus.sh && node-gyp configure --python=python2 && node-gyp build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the modbus@0.0.13 install script './make_libmodbus.sh && node-gyp configure --python=python2 && node-gyp build'. npm ERR! This is most likely a problem with the modbus package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./make_libmodbus.sh && node-gyp configure --python=python2 && node-gyp build npm ERR! You can get their info via: npm ERR! npm owner ls modbus npm ERR! There is likely additional logging output above.

modbus@0.0.13 preuninstall /var/nodejs/node_modules/modbus rm -rf libmodbus build

npm ERR! Please include the following file with any support request: npm ERR! /var/nodejs/npm-debug.log

ptorrent commented 9 years ago

I've no error when I install libmodbus without nodejs.

Any idea?

Thanks for your support!