2014-03-28 69 views
5

Hi guys/ruby​​ists out there,在Mac OS X上安裝Calabash-Android會導致錯誤

我需要一些幫助來嘗試安裝Calabash-Android。安裝RVM,家庭沖泡後,當我安裝我葫蘆得到一個奇怪的錯誤:

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 
[email protected] ~ $ mkdir ~/android 
[email protected] ~ $ mkdir ~/android 
mkdir: /Users/doronkatz/android: File exists 

doronkatz @ Dorons-的MacBook空中〜$ sudo的創業板安裝葫蘆,機器人 密碼: 大廈原生擴展。這可能需要一段時間... 錯誤:安裝calabash-android錯誤: 錯誤:無法構建gem原生擴展。

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 

檢查的main()在-lc ...是 創建的Makefile

make "DESTDIR=" 

編譯gherkin_lexer_ar.c ragel /國際化/ ar.c.rl:440:1:警告:控制可能會達到非void函數的結束[-Wreturn-type] } ^ ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18:警告:未使用的變量'lexer_en_main'[-Wunused-const-variable] static const int lexer_en_main = 1; ^ 2生成警告。 鏈接共享對象gongkin_lexer_ar.bundle 鐺:錯誤:未知參數:'-multiply_definedsuppress'[-Wunused-command-line-argument-hard-error-in-future] 鐺:注意:這將是一個硬錯誤不能在未來 化妝降級爲警告):* [gherkin_lexer_ar.bundle]錯誤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 

不知道是什麼錯誤意味着,我已經安裝的Xcode工具,小牛隊也是如此。有什麼想法嗎?

+0

我降級爲紅寶石1.8和它的工作。有趣。 – Doz

+0

[Ruby Gem install Json可能在Mavericks和Xcode 5.1上失敗 - 未知參數:'-multiply \ _definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on -mavericks-和Xcode的-5-1-未知參數,MUL) – Nakilon

回答

3

我有同樣的問題,我剛剛找到了解決方案。

我發現這裏一個相關問題:

http://techespanto.wordpress.com/2013/03/29/upgrade-ruby-version-on-mac-osx/

,並建議我升級我的機器上的紅寶石版本。在該鏈接前兩個命令不工作,所以我離開你這裏我所做的:

安裝命令行工具爲Mac搭配:

xcode-select --install 

在你的Mac上安裝自制軟件

\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable 

列表與最新的Ruby版本:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 

與安裝RVM

rvm list known 

與安裝最新版本的紅寶石:

rvm install ruby-<version> 

(對我來說是ruby-2.1-head

而這一切。希望它也適合你!

2

您也可以嘗試從https://stackoverflow.com/a/22787223/1165581


我看着葫蘆,IOS谷歌組爲您的解決方案,我想我有你的

解決方案嘗試這樣

安裝它
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install calabash-cucumber 

如果失敗,您可以嘗試將xcode從5.1降級到之前的一個(首選項 - >位置)。

和參考鏈接