سؤال

I've tried to make update for Gitlab Installation guide for OS X (https://github.com/CiTroNaK/Installation-guide-for-GitLab-on-OS-X) for the newest version of Gitlab 6.7.

I use OS X 10.9 with xcode command lines tools and I ended with this error for 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

Unfortunately I do not have enough knowledge to fix it. Could someone help me please?

هل كانت مفيدة؟

المحلول

A recent XCode update broke quite a bit of native code compilation, try this:

Add ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future to whatever you were running above. It looks like the Gitlab instructions are installing it using the system Ruby, so try this:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install version_sorter
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top