node icon indicating copy to clipboard operation
node copied to clipboard

XCode 7: library not found for -lgcc_s.10.5

Open jonathanong opened this issue 11 years ago • 35 comments

my coworkers and i are running into this issue after updating to XCode 7 automatically today on 10.10.5. not sure what to do.

just running npm i bcrypt gets the following:

> [email protected] install /Users/jong/Workspace/jonathanong/node.bcrypt.js
> node-gyp rebuild

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/bcrypt_lib.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/bcrypt_lib.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/jong/.nvm/versions/io.js/v2.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
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.5.0
gyp ERR! command "/Users/jong/.nvm/versions/io.js/v2.5.0/bin/iojs" "/Users/jong/.nvm/versions/io.js/v2.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jong/Workspace/jonathanong/node.bcrypt.js
gyp ERR! node -v v2.5.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/jong/.nvm/versions/io.js/v2.5.0/bin/iojs" "/Users/jong/.nvm/versions/io.js/v2.5.0/bin/npm" "i"
npm ERR! node v2.5.0
npm ERR! npm  v2.13.2
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 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jong/Workspace/jonathanong/node.bcrypt.js/npm-debug.log

specifically:

ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)

i've been looking for solutions online but none really work. this happens on node v2 and v4 for me. this happens for any package i have that requires compilation.

jonathanong avatar Sep 17 '15 18:09 jonathanong

Thanks to @italoag works for me too..

kiralikbeyin avatar Dec 11 '15 19:12 kiralikbeyin

Thanks to @italoag works for me too.

shokohara avatar Dec 19 '15 02:12 shokohara

Thanks @58bits - I had current Xcode installed, but never ran it. When I did, it updated some tools and fixed this problem.

mark-meyer avatar Jan 03 '16 02:01 mark-meyer

@italoag 's symlink solution worked for me. I was having the same missing lib error as others described when I was executing npm install zmq on OSX Yosemite. All good now, thanks so much!

jule64 avatar Jan 17 '16 02:01 jule64

@italoag Thanks for the solution, it worked for me to.

MFQ avatar Jan 17 '16 20:01 MFQ

@italoag, thanks!

Aldekein avatar Jan 25 '16 17:01 Aldekein

@italoag many thanks! This was just starting to annoy me ;) @58bits, opening xCode was necessary in my case to agree the T&C. Good shout!

DanDvoracek avatar Jan 27 '16 14:01 DanDvoracek

@italoag Thanks!

aravindbaskaran avatar Feb 05 '16 19:02 aravindbaskaran

Thank you, @italoag

kendagriff avatar Mar 09 '16 02:03 kendagriff

@italoag Hello, I have same error and tried entering your command below, but it does nothing except change directory to /usr/local/lib. Can you please clarify the steps on how to use the command to remedy?

cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

jennabelle avatar Mar 25 '16 07:03 jennabelle

@jennabelle try: cd /usr/local/lib && sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

dandehavilland avatar Mar 31 '16 08:03 dandehavilland

@dandehavilland Thank you but I ended up manually uninstalling my 3 versions of Node.js and reinstalling. In process I removed .node-gyp which I believe was causing errors, so the issue is fixed now.

jennabelle avatar Mar 31 '16 17:03 jennabelle

Had the same error - @italoag Your suggestion worked. Thank you so much!

abhishekam avatar Aug 09 '16 04:08 abhishekam

Thanks to @italoag works for me too..

Micha0 avatar Aug 23 '16 23:08 Micha0

I got the same error here, a possible error after upgrading xcode version. I fix it with a temp solution: cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

still the best solution in 2019.

swuecho avatar May 30 '19 04:05 swuecho