OS X 10.9上的Ruby gem version_sorter

时间:2014-03-21 19:34:49

标签: ruby macos gitlab

我已尝试为最新版本的Gitlab 6.7更新OS X的Gitlab安装指南(https://github.com/CiTroNaK/Installation-guide-for-GitLab-on-OS-X)。

我使用OS X 10.9和xcode命令行工具,我以version_sorter gem的错误结束:

Building native extensions.  This could take a while...
ERROR:  Error installing version_sorter:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for pcre_compile() in -lpcre... yes
creating Makefile

make "DESTDIR="
compiling rb_version_sorter.c
compiling version_sorter.c
version_sorter.c:49:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (cur = vsi->head) {
       ~~~~^~~~~~~~~~~
version_sorter.c:49:16: note: place parentheses around the assignment to silence this warning
while (cur = vsi->head) {
           ^
       (              )
version_sorter.c:49:16: note: use '==' to turn this assignment into an equality comparison
while (cur = vsi->head) {
           ^
           ==
1 warning generated.
linking shared-object version_sorter.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: *** [version_sorter.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/version_sorter-1.1.0 for  inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/version_sorter-1.1.0/ext/version_sorter/gem_make.out

不幸的是,我没有足够的知识来修复它。有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

最近的XCode更新打破了相当多的本机代码编译,试试这个:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future添加到上面运行的任何内容中。看起来Gitlab指令正在使用系统Ruby安装它,所以试试这个:

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