Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast-stemmer installation problems

Tags:

ruby

rvm

gem

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!

like image 737
scoob Avatar asked Mar 26 '14 20:03

scoob


1 Answers

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
like image 61
scoob Avatar answered Nov 13 '22 22:11

scoob