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

XCode 7: library not found for -lgcc_s.10.5 #2933

Closed
jonathanong opened this Issue Sep 17, 2015 · 34 comments

Comments

Projects
None yet
@jonathanong
Contributor

jonathanong commented Sep 17, 2015

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:

> bcrypt@0.8.5 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! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.5 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.

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Sep 17, 2015

Member

See nodejs/node-gyp#734, you need to install both xcode 7 and the new command line tools. Closing, it's not an issue with node or node-gyp.

Member

bnoordhuis commented Sep 17, 2015

See nodejs/node-gyp#734, you need to install both xcode 7 and the new command line tools. Closing, it's not an issue with node or node-gyp.

@bnoordhuis bnoordhuis closed this Sep 17, 2015

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Sep 17, 2015

Member

Oh, you may also need to run sudo xcode-select -s /path/to/xcode/Contents/Developer.

Member

bnoordhuis commented Sep 17, 2015

Oh, you may also need to run sudo xcode-select -s /path/to/xcode/Contents/Developer.

@jonathanong

This comment has been minimized.

Show comment
Hide comment
@jonathanong

jonathanong Sep 17, 2015

Contributor

oh my god it updated the command line tools w/o updating xcode!? sigh... thanks!!!

Contributor

jonathanong commented Sep 17, 2015

oh my god it updated the command line tools w/o updating xcode!? sigh... thanks!!!

@ChisholmKyle

This comment has been minimized.

Show comment
Hide comment
@ChisholmKyle

ChisholmKyle Sep 20, 2015

I still get this error! I've upgraded both Xcode 7 and Command Line Tools.

> bcrypt@0.8.5 install /Users/Kyle/Documents/Software/mean/mean_scotch/node_modules/bcrypt
> 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
collect2: error: ld returned 1 exit status
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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Kyle/Documents/Software/mean/mean_scotch/node_modules/bcrypt
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! node v4.1.0
npm ERR! npm  v3.3.4
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.5 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:

I tried reinstalling the old command line tools then upgrading again, and i made sure xcode-select had the correct path.

ChisholmKyle commented Sep 20, 2015

I still get this error! I've upgraded both Xcode 7 and Command Line Tools.

> bcrypt@0.8.5 install /Users/Kyle/Documents/Software/mean/mean_scotch/node_modules/bcrypt
> 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
collect2: error: ld returned 1 exit status
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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Kyle/Documents/Software/mean/mean_scotch/node_modules/bcrypt
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! node v4.1.0
npm ERR! npm  v3.3.4
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.5 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:

I tried reinstalling the old command line tools then upgrading again, and i made sure xcode-select had the correct path.

@PhilippKrone

This comment has been minimized.

Show comment
Hide comment
@PhilippKrone

PhilippKrone Sep 21, 2015

I get the same error with both, xcode and command line tools updated.

PhilippKrone commented Sep 21, 2015

I get the same error with both, xcode and command line tools updated.

@JakeRuth

This comment has been minimized.

Show comment
Hide comment
@JakeRuth

JakeRuth Sep 21, 2015

I thought I was getting this error yesterday on xcode 7. However, (I am a new mac user) in the app store there was another update for Yosemite just called 'Software Update' and it seems like that simple title encapsulates updates to the command line tools and other things... if thats there then make sure you have all updates being run. I am on the most recent version of react native and node and npm if that counts for anything... @PhilippKrone

JakeRuth commented Sep 21, 2015

I thought I was getting this error yesterday on xcode 7. However, (I am a new mac user) in the app store there was another update for Yosemite just called 'Software Update' and it seems like that simple title encapsulates updates to the command line tools and other things... if thats there then make sure you have all updates being run. I am on the most recent version of react native and node and npm if that counts for anything... @PhilippKrone

@italoag

This comment has been minimized.

Show comment
Hide comment
@italoag

italoag Sep 21, 2015

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

italoag commented Sep 21, 2015

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

@stringhamc

This comment has been minimized.

Show comment
Hide comment
@stringhamc

stringhamc Sep 22, 2015

Thanks italoag, that works for me on a different issue with install pyfftw

stringhamc commented Sep 22, 2015

Thanks italoag, that works for me on a different issue with install pyfftw

@kwcto

This comment has been minimized.

Show comment
Hide comment
@kwcto

kwcto Sep 22, 2015

Thanks italoag!

kwcto commented Sep 22, 2015

Thanks italoag!

@58bits

This comment has been minimized.

Show comment
Hide comment
@58bits

58bits Sep 23, 2015

I found that installing Xcode 7 - and running Xcode at least once, solved the problem.

58bits commented Sep 23, 2015

I found that installing Xcode 7 - and running Xcode at least once, solved the problem.

@wkerzendorf

This comment has been minimized.

Show comment
Hide comment
@wkerzendorf

wkerzendorf Sep 23, 2015

Had the same problem with compiling C code (in python code) using CC=gcc-mp-4.9 python setup.py develop and missing library not found for -lgcc_s.10.5 (on Xcode 7). What solved the problem was @italoag 's cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

wkerzendorf commented Sep 23, 2015

Had the same problem with compiling C code (in python code) using CC=gcc-mp-4.9 python setup.py develop and missing library not found for -lgcc_s.10.5 (on Xcode 7). What solved the problem was @italoag 's cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

@adityabansod

This comment has been minimized.

Show comment
Hide comment
@adityabansod

adityabansod Sep 23, 2015

👍 for @italoag's suggestion. saves me from having to install 4 gigs of Xcode when all I needed was 170 megs for the command line tools.

adityabansod commented Sep 23, 2015

👍 for @italoag's suggestion. saves me from having to install 4 gigs of Xcode when all I needed was 170 megs for the command line tools.

@ChisholmKyle

This comment has been minimized.

Show comment
Hide comment
@ChisholmKyle

ChisholmKyle Sep 24, 2015

I'm using macports and still had problems compiling until I changed the python version with the command

sudo port select --set python python27-apple

Then it installed successfully

ChisholmKyle commented Sep 24, 2015

I'm using macports and still had problems compiling until I changed the python version with the command

sudo port select --set python python27-apple

Then it installed successfully

@chris1248

This comment has been minimized.

Show comment
Hide comment
@chris1248

chris1248 commented Sep 30, 2015

I had this error, which I solved by updating version for node and npm.
http://stackoverflow.com/questions/6237295/how-can-i-update-node-js-and-npm-to-the-next-versions

@huseyinbabal

This comment has been minimized.

Show comment
Hide comment
@huseyinbabal

huseyinbabal Nov 5, 2015

Thanks @58bits my problem solved by XCode 7 update.

huseyinbabal commented Nov 5, 2015

Thanks @58bits my problem solved by XCode 7 update.

@xudafeng

This comment has been minimized.

Show comment
Hide comment
@xudafeng

xudafeng Nov 5, 2015

Member

Thx @italoag, work for me.

Member

xudafeng commented Nov 5, 2015

Thx @italoag, work for me.

@cs150bf cs150bf referenced this issue Nov 9, 2015

Open

Install error #20

@bgerd

This comment has been minimized.

Show comment
Hide comment
@bgerd

bgerd Nov 23, 2015

Was getting the error trying to install node-inspector. Avoided upgrading to Xcode 7 (stayed at 6.1) by using @italoag's sym link workaround.

Thanks @italoag !!

bgerd commented Nov 23, 2015

Was getting the error trying to install node-inspector. Avoided upgrading to Xcode 7 (stayed at 6.1) by using @italoag's sym link workaround.

Thanks @italoag !!

@dgmike

This comment has been minimized.

Show comment
Hide comment
@dgmike

dgmike Nov 24, 2015

Tanks to @italoag works for me too.

dgmike commented Nov 24, 2015

Tanks to @italoag works for me too.

@ielgnaw

This comment has been minimized.

Show comment
Hide comment
@ielgnaw

ielgnaw Nov 28, 2015

Thanks to @italoag works for me too ~

ielgnaw commented Nov 28, 2015

Thanks to @italoag works for me too ~

@wushaobo

This comment has been minimized.

Show comment
Hide comment
@wushaobo

wushaobo Dec 8, 2015

Thanks to @italoag works for me too..

wushaobo commented Dec 8, 2015

Thanks to @italoag works for me too..

@kiralikbeyin

This comment has been minimized.

Show comment
Hide comment
@kiralikbeyin

kiralikbeyin Dec 11, 2015

Thanks to @italoag works for me too..

kiralikbeyin commented Dec 11, 2015

Thanks to @italoag works for me too..

@shokohara

This comment has been minimized.

Show comment
Hide comment
@shokohara

shokohara Dec 19, 2015

Thanks to @italoag works for me too.

shokohara commented Dec 19, 2015

Thanks to @italoag works for me too.

@mark-meyer

This comment has been minimized.

Show comment
Hide comment
@mark-meyer

mark-meyer Jan 3, 2016

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

mark-meyer commented Jan 3, 2016

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

@jule64

This comment has been minimized.

Show comment
Hide comment
@jule64

jule64 Jan 17, 2016

@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 commented Jan 17, 2016

@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!

@MFQ

This comment has been minimized.

Show comment
Hide comment
@MFQ

MFQ Jan 17, 2016

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

MFQ commented Jan 17, 2016

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

@Aldekein

This comment has been minimized.

Show comment
Hide comment
@Aldekein

Aldekein commented Jan 25, 2016

@italoag, thanks!

@DanDvoracek

This comment has been minimized.

Show comment
Hide comment
@DanDvoracek

DanDvoracek Jan 27, 2016

@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 commented Jan 27, 2016

@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!

@aravindbaskaran

This comment has been minimized.

Show comment
Hide comment
@aravindbaskaran

aravindbaskaran commented Feb 5, 2016

@italoag Thanks!

@kendagriff

This comment has been minimized.

Show comment
Hide comment
@kendagriff

kendagriff commented Mar 9, 2016

Thank you, @italoag

@jennabelle

This comment has been minimized.

Show comment
Hide comment
@jennabelle

jennabelle Mar 25, 2016

Contributor

@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

Contributor

jennabelle commented Mar 25, 2016

@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

@dandehavilland

This comment has been minimized.

Show comment
Hide comment
@dandehavilland

dandehavilland Mar 31, 2016

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

dandehavilland commented Mar 31, 2016

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

@jennabelle

This comment has been minimized.

Show comment
Hide comment
@jennabelle

jennabelle Mar 31, 2016

Contributor

@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.

Contributor

jennabelle commented Mar 31, 2016

@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.

@abhishekam

This comment has been minimized.

Show comment
Hide comment
@abhishekam

abhishekam Aug 9, 2016

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

abhishekam commented Aug 9, 2016

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

@Micha0

This comment has been minimized.

Show comment
Hide comment
@Micha0

Micha0 Aug 23, 2016

Thanks to @italoag works for me too..

Micha0 commented Aug 23, 2016

Thanks to @italoag works for me too..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment