【问题标题】:Install Calabash-Android causes error on OS X Mavericks在 OS X Mavericks 上安装 Calabash-Android 会导致错误
【发布时间】:2014-05-08 13:45:06
【问题描述】:

我在尝试安装 Calabash-Android 时需要一些帮助。安装 rvm, home-brew 后,当我安装 Calabash 时出现一个奇怪的错误:

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 密码: 构建原生扩展。这可能需要一段时间... 错误:安装 calabash-android 时出错: 错误:无法构建 gem 原生扩展。

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

检查 -lc 中的 main()... 是 创建 Makefile

make "DESTDIR="

编译 gherkin_lexer_ar.c ragel/i18n/ar.c.rl:440:1:警告:控制可能到达非空函数的结尾 [-Wreturn-type] } ^ ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18:警告:未使用的变量 'lexer_en_main' [-Wunused-const-variable] 静态常量 int lexer_en_main = 1; ^ 生成 2 个警告。 链接共享对象 gherkin_lexer_ar.bundle clang:错误:未知参数:'-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future] clang:注意:这将是未来的硬错误(不能降级为警告) make: *** [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 工具。有什么想法吗?

【问题讨论】:

标签: android ruby cucumber osx-mavericks calabash


【解决方案1】:

我遇到了同样的问题,我刚刚找到了解决方案。

我在这里发现了一个相关的问题:

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

它建议我必须升级我机器上的 ruby​​ 版本。该链接中的前两个命令不起作用,所以我把我所做的留在这里:

为 mac 安装命令行工具:

xcode-select --install

在你的 Mac 上安装自制软件:

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

安装 rvm:

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

列出最新的 ruby​​ 版本:

rvm list known

安装最新的 ruby​​ 版本:

rvm install ruby-<version>

(对我来说是ruby-2.1-head

仅此而已。希望它也适用于您!

【讨论】:

    【解决方案2】:

    你也可以试试https://stackoverflow.com/a/22787223/1165581的解决方案


    我为你查看了 calabash-ios google 组,我想我有适合你的解决方案

    试试这样安装

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

    如果失败,您可以尝试将 xcode 从 5.1 降级到以前的版本之一(Preferences->Locations)。

    还有参考链接


    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-26
      • 2016-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-01
      • 1970-01-01
      • 2014-09-14
      相关资源
      最近更新 更多