node-gyp rebuild Fails on Mac OS X 10.9.4
Terminal output
[email protected]
[email protected]
[email protected]
[email protected]
which libtool
/usr/bin/libtool
$ npm install -g hiredis
npm http GET https://registry.npmjs.org/hiredis
npm http 304 https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
> [email protected] install /usr/local/lib/node_modules/hiredis
> node-gyp rebuild
CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
LIBTOOL-STATIC Release/hiredis.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/hiredis.a] Error 1
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.EventEmitter.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1046: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 /usr/local/lib/node_modules/hiredis
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
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 hiredis 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 hiredis
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.3.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "hiredis"
npm ERR! cwd /Users/ashokafinley
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/ashokafinley/npm-debug.log
npm ERR! not ok code 0
I get similar issue on Ubuntu 12.04.5 LTS. when I try to install nodetime. Some suggest that python needs to be installed (which I have) so just posting this to hope that it helps you in case you do not have python installed.
@joemanfoo and installing python works? because I have python but that doesn't make this rebuild correctly.
when i install node-gyp manually npm install node-gyp it installs just fine. so it leads me to believe the weak module which has node-gyp as dependency just uses it wrong. i made a ticket over there as well.
https://github.com/TooTallNate/node-weak/issues/30
on darwin (MacOS)
xcode-select --install did the job
@jfroffice, xcode-select --install did not works for me, on Yosemite.
Downgrading node.js to the 0.10.x branch seems to fix the thing.
@kamisama, I am also on node.js 0.10.x.
this binding.gyp file is the biggest pain in the ass
Any solution for node 0.11.x yet? Getting the same error on Mac OSX 10.10. Works with node 0.10.x though.
If you are using Homebrew, this link was very usefull for me: http://flummox-engineering.blogspot.com.au/2014/04/libtool-unrecognized-option-static.html
brew unlink libtool
They was a conflict between usr/bin/libtool (Xcode) and usr/local/bin/libtool (HomeBrew)
Ditto what @Globegitter said: I've given up trying to get around this failed build on Mac OSX and Node v0.12 (I'm trying to npm install canvas which requires node-gyp) but once I removed Node and installed version 0.10.9 instead (directly from nodejs.org, rather than via Homebrew), canvas and node-gyp install fine.
My issue sounds more similar to https://github.com/Homebrew/homebrew/issues/14123 in that the error message when rebuilding node-gyp was Package 'xcb-shm', required by 'cairo', not found, but the only solution that's worked for me so far was the Node version downgrade mentioned above.
http://stackoverflow.com/questions/22100213/package-cairo-was-not-found-in-the-pkg-config-search-path-node-j-s-install-canv This worked for me (answer by Piyush Dholariya)
@Arkantas Many Thanks for the link, It really helped me out :)
Same problem here. But I found my libtool is actully /opt/chefdk/embedded/bin/libtool, so sudo rm -rf /opt/chefdk can solve my problem.
I raised this issue https://github.com/redis/hiredis-node/issues/94
gyp: binding.gyp not found ... big pain
I'm on El Capitan (10.11) and @veacks suggestion of brew unlink libtool did the trick for me.
Just solved same problem.
In my case, Mac OS X automatic updates downloaded and installed a new version of XCode.
As you may know, you have to accept the license agreement in order to use both XCode and its command line tools.
libtool is one of these command line tools. libtool is used by node-gyp.
I run libtool and accepted license agreement via terminal.
Everything worked soon after.
@adriano-di-giovanni, I've tried running libtool to accept the agreement and got this output -
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
Could you help me solve this please?
Running libtool is just a shortcut to accept license agreement. I don't know why it fails on your machine but you can always open XCode and accept the license agreement.
Try and please, let me know 😉
Inviato da iPhone
Il giorno 02 nov 2015, alle ore 15:44, Yaron Idan [email protected] ha scritto:
@adriano-di-giovanni, I've tried running libtool to accept the agreement and got this output - error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols] Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table ] [-seg_addr_table_filename ] [-all_load] [-noall_load]
Could you help me solve this please?
— Reply to this email directly or view it on GitHub.
True enough, XCode license wasn't my problem, and the license agreement was already accepted (as I found out through opening XCode like you advised) The problem ended up being node not upgraded to suit El-Capitan, after I upgraded it everything went pretty smooth...
Thank you for the support!
You're welcome 😉
Inviato da iPhone
Il giorno 03 nov 2015, alle ore 09:31, Yaron Idan [email protected] ha scritto:
True enough, XCode license wasn't my problem, and the license agreement was already accepted (as I found out through opening XCode like you advised) The problem ended up being node not upgraded to suit El-Capitan, after I upgraded it everything went pretty smooth...
Thank you for the support!
— Reply to this email directly or view it on GitHub.