tuxnsk / nodejs_libmodbus

libmodbus binding for nodejs
41 stars 66 forks source link

cannot cross compile for arm #14

Closed Bzhnja closed 7 years ago

Bzhnja commented 9 years ago

Hi, I want to cross compile nodejs_libmodbus for arm, and I have done follows:

export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc export CXX=arm-linux-gnueabihf-g++ export LINK=arm-linux-gnueabihf-g++ export npm_config_arch=arm export npm_config_nodedir=/home/sitara/node-v0.10.29/ npm install modbus

but it reports errors that:

configure: error: in /home/sitara/abc/node_modules/modbus/libmodbus': configure: error: cannot run C compiled programs. If you meant to cross compile, use--host'. See `config.log' for more details

modbus@0.0.13 preuninstall /home/sitara/abc/node_modules/modbus rm -rf libmodbus build

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. 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.

npm ERR! System Linux 3.13.0-24-generic npm ERR! command "node" "/usr/bin/npm" "install" "modbus" npm ERR! cwd /home/sitara/abc npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/sitara/abc/npm-debug.log npm ERR! not ok code 0

Can you give me a solution, thank you very much!

aik8 commented 9 years ago

Does your target device have npm?