I need some help with trying to install Calabash-Android. After installing rvm, home-brew, when I install Calabash i get a strange error:
sudo gem install calabash-android
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR="
compiling gherkin_lexer_ar.c
ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [- Wreturn-type]
}
^
ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable]
static const int lexer_en_main = 1;
^
2 warnings generated.
linking shared-object gherkin_lexer_ar.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line- argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [gherkin_lexer_ar.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin- 2.12.2/ext/gherkin_lexer_ar/gem_make.out
doronkatz@Dorons-MacBook-Air ~ $ mkdir ~/android
doronkatz@Dorons-MacBook-Air ~ $ mkdir ~/android
mkdir: /Users/doronkatz/android: File exists
doronkatz@Dorons-MacBook-Air ~ $ sudo gem install calabash-android Password: Building native extensions. This could take a while... ERROR: Error installing calabash-android: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes creating Makefile
make "DESTDIR="
compiling gherkin_lexer_ar.c ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable] static const int lexer_en_main = 1; ^ 2 warnings generated. linking shared-object gherkin_lexer_ar.bundle clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line- argument-hard-error-in-future] clang: note: this will be a hard error (cannot be downgraded to a warning) in the future make: *** [gherkin_lexer_ar.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin- 2.12.2/ext/gherkin_lexer_ar/gem_make.out
Not sure what the error means, I have installed Xcode tools for mavericks as well. Any thoughts out there?
I had the same problem and I just found out a solution for this.
I found one related problem here:
http://techespanto.wordpress.com/2013/03/29/upgrade-ruby-version-on-mac-osx/
and it suggested I had to upgrade the ruby version on my machine. The first two commands in that link are not working, so I leave you here what I did:
Install the command line tools for mac with:
xcode-select --install
Install homebrew in your mac with:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Install rvm with:
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
List the latest ruby versions with:
rvm list known
Install the latest ruby version with:
rvm install ruby-<version>
(for me it was ruby-2.1-head
)
And that's all. Hope it works for you as well!