libtool error "no option: -static" while installing/compiling openzwave

539 views Asked by At

npm install openzwave fails - compilation fails. libtool error: no option "-static"

Darwin 13.3.0 Darwin Kernel Version 13.3.0, MacBookPro11,2 Darwin

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/git/node-zwaveTest/node_modules/openzwave
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Darwin 13.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "instal" "openzwave"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the openzwave 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 openzwave
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/me/git/node-zwaveTest/npm-debug.log
3

There are 3 answers

0
Brad Hein On

Problem: multiple libtools installed on system. Need to use the one in /usr/bin/. Change path, or change build file depending on install mathod.

npm method

$ export PATH=/usr/local/bin:$PATH
$ npm instal openzwave

From source:

$ svn checkout http://open-zwave.googlecode.com/svn/trunk/ open-zwave-read-only 
$ make (fails, but creates build directory we need)
$ vi ./cpp/build/support.mk
(Find AR := line and change libtool to /usr/bin/libtool, save, quit)
$ make
fun and profit.
0
rocky On
$ which libtool              
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool

but /usr/local/bin/libtool

modify /usr/local/bin/libtool to libtool

0
ekarak On

Although this question is more than 18 months old now, I think you should try installing the latest OpenZWave and then try installing openzwave-shared (npm install openzwave-shared). This is a node addon (that began as a fork of the node package you're trying to install) which decouples the compilation of the underlying OpenZWave C++ library as it links to it dynamically.