Closed golgobot closed 8 years ago
Sorry forgot to preinstall nan
and bindings
, but it still fails
Jonathans-MacBook-Pro-2:node-glfw jonathan$ npm install --save bindings nan
bindings@1.2.1 node_modules/bindings
nan@2.1.0 node_modules/nan
Jonathans-MacBook-Pro-2:node-glfw jonathan$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.2.1
gyp info using node@4.2.1 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/jonathan/github/node-glfw/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jonathan/.node-gyp/4.2.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/jonathan/.node-gyp/4.2.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/jonathan/github/node-glfw',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config --libs glfw3 glew' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/jonathan/github/node-glfw
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
Seems like you forgot to install glfw3 and glew with homebrew. And you probably didn't install pkg-config, which usually is installed if you use homebrew for development ie gcc, automake etc...
Just go to homebrew Web page, install homebrew then do: brew update brew upgrade brew install glfw glew AntTweakBar pkg-config
--mike
On Thu, Dec 3, 2015 at 7:18 PM -0800, "Jonathan Ross" notifications@github.com<mailto:notifications@github.com> wrote:
Sorry forgot to preinstall nan and bindings, but it still fails
Jonathans-MacBook-Pro-2:node-glfw jonathan$ npm install --save bindings nan bindings@1.2.1 node_modules/bindings
nan@2.1.0 node_modules/nan
Jonathans-MacBook-Pro-2:node-glfw jonathan$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.2.1
gyp info using node@4.2.1 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/jonathan/github/node-glfw/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jonathan/.node-gyp/4.2.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/jonathan/.node-gyp/4.2.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/jonathan/github/node-glfw',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config --libs glfw3 glew' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/jonathan/github/node-glfw
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
Reply to this email directly or view it on GitHubhttps://github.com/mikeseven/node-glfw/issues/23#issuecomment-161861007.
So I already ran the command brew install glfw3 anttweakbar glew
like in the README.md and had those dependencies successfully installed on my system.
I did not have pkg-config
installed, since I don't use brew
for development and it wasn't in the README.md.
In any case, I installed pkg-config
and tried again. But the build couldn't find AntTweakBar.h
. I double checked and it was definitely in /usr/local/include
. I went into atb.h
and changed #include <AntTweakBar.h>
to #inlcude "/usr/local/lib/AntTweakBar.h"
and everything compiled fine. Not sure if it's a binding.gyp configuration issue, but this worked.
AntTweakBar doesn't have a pkg-config script but it should pick up the .h as a symlink into /udr/local/include. I'll double check if this is a brew install issue.
I just did everything from scratch on OS X 10.11, no issue at all. For me, homebrew did install AntTweakBar correctly with a link in /usr/local/include. My guess is that your system may not be installed correctly for HomeBrew. In particular, check that /usr/local/include is writable. Then reinstall homebrew packages and you should see /usr/local/include/AntTweakBar.h -> ../Cellar/anttweakbar/1.16/include/AntTweakBar.h
Here are version for
npm
,node
, andnode-gyp
Installed prerequisites
Then
npm install
Here is
npm-debug.log
npm-debug.log