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

Linker error when rebuilding addon #675

Closed
gerhardberger opened this issue Jul 27, 2015 · 5 comments
Closed

Linker error when rebuilding addon #675

gerhardberger opened this issue Jul 27, 2015 · 5 comments

Comments

@gerhardberger
Copy link

hi

I made an example that used the Hello World example and it worked fine, but after some time it started throwing a linker error when I wanted to rebuild the addon. I can't say it surely but I think it started to throw the error after I updated to El Capitan beta 4 from beta 3.
after I rebuild with:

node-gyp rebuild

I get this error:

...
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/binding/addon.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/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:1074:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/gerhard/Desktop/examples/gyptest
gyp ERR! node -v v0.12.5
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 

I checked and I have a libgcc_s.10.5.tbd file in my /usr/lib folder and I reinstalled node-gyp too.

thanks

@gerhardberger
Copy link
Author

The issue might be on the OS side, because in El Capitan there is a .tbd extension for dynamic libraries and that might cause the problem. I haven't been able to solve it yet though.

@gerhardberger
Copy link
Author

The problem was that I didn't used the Command Line Tools of Xcode 7.
With that it's working fine!

@YComputer
Copy link

I changed to use iTerm but still doesn't work.

@jason-fer
Copy link

I have the same issue.

@MartijnR
Copy link

MartijnR commented Feb 4, 2016

seems relevant: 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

4 participants