5

env => Mac. OS Yosemite.

I got a project use ruby 2.1.3 . But when I bundle install, there's an error I can't fix. the gem unf_ext have problem

here's my terminal message:

$ gem install unf_ext -v '0.0.6'
Building native extensions.  This could take a while...
ERROR:  Error installing unf_ext:
ERROR: Failed to build gem native extension.

/Users/vincent/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling unf.cc
In file included from unf.cc:1:
In file included from ./unf/normalizer.hh:4:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
     ^
1 error generated.
make: *** [unf.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/vincent/.rvm/gems/ruby-2.1.3/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/vincent/.rvm/gems/ruby-2.1.3/extensions/x86_64-darwin-14/2.1.0-static/unf_ext-0.0.6/gem_make.out 

I try brew update and xcode select install but still not work. Any suggestion?

March Hare
  • 53
  • 1
  • 5
  • Seems to be an open issue at the moment on github: https://github.com/knu/ruby-unf/issues/11 – karlingen Apr 13 '15 at 09:56
  • also check http://stackoverflow.com/questions/29550738/error-installing-bundling-gem-unf-ext-v-0-0-6 – karlingen Apr 13 '15 at 09:57
  • Thanks a lot ! Same as the link. I've fixed this issue by simply reinstalling the Command-Line-Tools commandlinetoolsosx10.10forxcode6.2.dmg for Xcode 6.2 for OS X 10.10 from Apples Developer Download Page. – March Hare Apr 13 '15 at 10:08
  • I'm glad it solved your issue. I'm posting it as an answer as well. – karlingen Apr 13 '15 at 15:23

1 Answers1

3

It's a bug in the new xcode tools. It broke eventmachine in my case. See Missing C++ header <__debug> after updating OSX Command Line Tools 6.3 for answers with dummy files and reinstallation links. I downgraded to 6.2 and the problem went away.

Source: Error installing/bundling gem unf_ext -v '0.0.6'

Community
  • 1
  • 1
karlingen
  • 13,800
  • 5
  • 43
  • 74