Building Softcover on Mavericks (Soft​co​ver​.io)

TL;DR:

To install soft­co­ver on mave­ricks use the Fol­lo­wing com­mand line string:

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

Long Version:

I stumb­led over soft​co​ver​.io and imme­dia­te­ly tried to install on my machi­ne, which is run­ning OSX 10.9.2 (Mave­ricks).

I used:

$ sudo gem install softcover

to start the soft­co­ver instal­la­ti­on. To my disap­point­ment the instal­la­ti­on pret­ty much cras­hed right from the start:

sudo gem install softcover
Building native extensions. This could take a while...
ERROR: Error installing softcover:
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 generator.c
linking shared-object json/ext/generator.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: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
georgs-imac-2:~ shorshe$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future sudo gem install softcover
Building native extensions. This could take a while...
ERROR: Error installing softcover:
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 generator.c
linking shared-object json/ext/generator.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: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out

Ruby gem installs seem to be bro­cken in mave­ricks … what a shame.

What got me thin­king though was the line:

-Wunused-command-line-argument-hard-error-in-future

»hard error in future…« the­re has to be a way to make it go away.
I found the solu­ti­on on this site:

http://​bru​teforce​.gr/​b​y​p​a​s​s​i​n​g​-​c​l​a​n​g​-​e​r​r​o​r​-​u​n​k​n​o​w​n​-​a​r​g​u​m​e​n​t​.​h​tml

So, if instal­ling gem gives you trou­bles right now use the string »ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future« befo­re the gem com­mand.

Long sto­ry short. To install soft​co​ver​.io on mave­ricks use the fol­lo­wing com­mand line string:

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