简体   繁体   中英

sudo gem install jekyll — failure — clang error unknown argument

Jekyll won't install via gem install below is the error. Even further below is some versions of things and locations.

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

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

make "DESTDIR=" clean

make "DESTDIR="
compiling porter.c
porter.c:359:27: warning: '&&' within '||' [-Wlogical-op-parentheses]
  if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
            ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~
porter.c:359:27: note: place parentheses around the '&&' expression to silence this warning
  if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                      ^
               (                          )
1 warning generated.
compiling porter_wrap.c
linking shared-object stemmer.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: *** [stemmer.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for  inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/fast-stemmer-1.0.2/gem_make.out

Direct outputs from terminal of commands:

[~]$ which ruby
/usr/bin/ruby

[~]$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

[~]$ which gem 
/usr/bin/gem
[~]$ gem --version
2.2.2

[~]$ which clang
/usr/bin/clang

[~]$ clang --version
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

OSX 10.9.2, Xcode version 5.1

Same issue encountered in Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'

I found the comments in this issue for the jekyll repo helpful: https://github.com/jekyll/jekyll/issues/2125

If you're using rvm or rbenv you can checkout Ruby 2.1.1 and it should install smoothly.

Otherwise you can install with ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM