Failed to set self-test fsevent using Xcode 4.3

I was unable to install git autotest-fsevent after upgrading to Xcode 4.3 (old versions of Xcode were removed). The command line tools were installed on the Settings tab> Downloads> Components.

osx 10.7.3, rvm 1.10.2, ruby ​​1.9.3-rc1, bundler 1.0.22

$ bundle Installing autotest-fsevent (0.2.7) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/doc/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb extconf.rb:36:in `<main>': Xcode not found - see README for assistance (RuntimeError) Gem files will remain installed in /Users/doc/.rvm/gems/ ruby-1.9.3-rc1@global /gems/autotest-fsevent-0.2.7 for inspection. Results logged to /Users/doc/.rvm/gems/ ruby-1.9.3-rc1@global /gems/autotest-fsevent-0.2.7/ext/fsevent/gem_make.out An error occured while installing autotest-fsevent (0.2.7), and Bundler cannot continue. Make sure that `gem install autotest-fsevent -v '0.2.7'` succeeds before bundling. 

README simply indicates that Xcode is required.

It seems I have selected the correct Xcode.app:

 $ xcode-select -print-path /Applications/Xcode.app/Contents/Developer 

Does anyone else have this problem? Any ideas how to get around this?

+4
source share
1 answer

It turns out the Xcode path is hardcoded in the gem file:

ext /fsevent/extconf.rb:

 ... elsif File.exists?('/Developer/Applications/Xcode.app') `CFLAGS='-isysroot /Developer/SDKs/MacOSX#{SDK_VERSION}.sdk -mmacosx-version-min=#{SDK_VERSION}' /usr/bin/gcc -framework CoreServices -o "#{GEM_ROOT}/bin/fsevent_sleep" fsevent_sleep.c` raise "\e[1;31mCompilation of fsevent_sleep binary failed - see README for assistance\e[0m" unless File.executable?("#{GEM_ROOT}/bin/fsevent_sleep") ... 

Xcode 4.3 is now installed as an application in / Applications. Another github user ( fxposter ) found the same problem and released pull request a few hours before mine. The proposed changes were merged into a gem and v0.2.8 was released.

+7
source

Source: https://habr.com/ru/post/1397468/


All Articles