快速安装问题 [英] Fast-stemmer installation problems

查看:106
本文介绍了快速安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 fast-stemmer 的问题,我很难安装任何我想要的ruby宝石。我已将错误信息放在下面。

 构建原生扩展。这可能需要一段时间... 
错误:安装fast-stemmer时出错:
错误:无法构建gem本机扩展。

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

makeDESTDIR = clean'

make'DESTDIR =
编译porter.c
porter.c:359:27:警告:'&'在'||'内[-Wlogical (a> 1 || a == 1&&!cvc(z,z-> k-1))z-> k_;
~~ ~~~~~~~ ^ ~~~~~~~~~~~~ $ b $ porter.c:359:27:注意:放置圆括号(a> 1 || a == 1&&!cvc(z,z-> k-1))z->'& K--;
^
()
1生成警告。
编译porter_wrap.c
链接共享对象stemmer.bundle
铿锵声:错误:未知参数:'-multiply_definedsuppress'[-Wunused-command-line-argument-hard-error-in-未来]
铛:注意:这将是一个硬错误(不能降级为警告)在未来
make:*** [stemmer.bundle]错误1

失败,退出代码2

Gem文件将保留安装在/Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2中进行检查。
结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/fast-stemmer-1.0.2/gem_make.out


如果有人能帮助我,那将会非常感谢!

所以,看起来我所遇到的问题是由于更新了最后一个xCode而导致的,后者又将clang更新为5.1,从而打破了许多尚未更新的ruby宝石以反映叮当中的重大变化5.1。我发现这一切都在 Cloudspace博客



他们的解决方案(目前 - 错误表示他们会变成硬性错误)将下面的标志放到你的编译器忽略这个问题:
$ b $ pre $ ARCHFLAGS = -Wno-error = unused-command-line-argument-hard-error-in-future

例如:

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

或捆绑:

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


I'm having a hard time installing any of the ruby gems I want to because of a problem with fast-stemmer. I've put the error I'm getting below.

Building native extensions.  This could take a while...
ERROR:  Error installing fast-stemmer:
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

Some things I've tried to resolve the problem include: updating ruby gems, updating rvm, using ruby 2.1.1, re-installing command line tools. I'm on Mavericks.

If anyone could help me out it'd be much appreciated!

解决方案

So, it appears that the problem I was having was caused by updating the last xCode, which in turn updated clang to 5.1, which in turn has broken a lot of ruby gems that haven't updated to reflect breaking changes in clang 5.1. I found this all on the Cloudspace blog.

Their solution (for the moment -- the error says they will become hard errors in the future) is to put the following flag to get your compiler to ignore the issue:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

For example:

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

or to bundle:

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

这篇关于快速安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆