Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone of this repo fails to build Node 0.12 / 4.2.3, node-gyp 3.2.1, gcc #11

Closed
brianfeister opened this issue Jan 12, 2016 · 2 comments

Comments

@brianfeister
Copy link

➜  node-xpc-connection git:(master) npm install

> xpc-connection@0.1.4 install /Users/brianfeister/dev/temp/node-xpc-connection
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/XpcConnection.o
  SOLINK_MODULE(target) Release/binding.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/binding.node] 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:269: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 Darwin 14.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/brianfeister/dev/temp/node-xpc-connection
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 

npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm  v2.14.0
npm ERR! code ELIFECYCLE
npm ERR! xpc-connection@0.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the xpc-connection@0.1.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the xpc-connection 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 xpc-connection
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/brianfeister/dev/temp/node-xpc-connection/npm-debug.log
➜  node-xpc-connection git:(master) node -v                
v0.12.0
➜  node-xpc-connection git:(master) node-gyp -v            
v3.2.1
➜  node-xpc-connection git:(master) node -v
v4.2.3
➜  node-xpc-connection git:(master) gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
➜  node-xpc-connection git:(master) which gcc
/usr/bin/gcc
➜  node-xpc-connection git:(master) echo $PATH
/Users/brianfeister/.nvm/versions/node/v4.2.3/bin:/usr/local/heroku/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

These config details all seem fine according to other open issues. Any ideas?

@brianfeister
Copy link
Author

Also it fails on node v0.12 which I initially tried with

@brianfeister brianfeister changed the title Clone of this repo fails to build Node 12, node-gyp 3.2.1, gcc Clone of this repo fails to build Node 0.12 / 4.2.3, node-gyp 3.2.1, gcc Jan 12, 2016
@brianfeister
Copy link
Author

The fix for this ended up being fairly involved. I had Yosemite installed (long after release of El Capitain) and Xcode 6. I had installed Node via brew when Xcode 6 was active, but it was necessary to update to Xcode 7, then update my toolchain to use Xcode 7, then brew rm node and re-install brew install node. Before installing Node via Homebrew, I needed an Xcode version 7 or better in clang -v output like this:

➜  clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Here's a more thorough walkthrough of that part:
Homebrew/legacy-homebrew#40653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant