Skip to content
This repository has been archived by the owner. It is now read-only.

Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress' #528

Closed
henry74 opened this issue Mar 12, 2014 · 12 comments

Comments

@henry74
Copy link

@henry74 henry74 commented Mar 12, 2014

Getting this error when trying to run boxen on Maverick and latest developer tools - same as this stackoverflow question (http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul) which at this time is 3 hours old:

Gem::Ext::BuildError: 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 /opt/boxen/repo/.bundle/ruby/2.0.0/gems/json-1.8.0 for inspection.
Results logged to /opt/boxen/repo/.bundle/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.0/gem_make.out
@doctyper
Copy link

@doctyper doctyper commented Mar 12, 2014

Same error here, using a fresh Mavericks install + XCode 5.1.

Loading

@henry74
Copy link
Author

@henry74 henry74 commented Mar 12, 2014

FWIW this doesn't seem to be a boxen specific issue, but rather an Apple f*cked up and released a developer code tools update which pretty much screws over alot of existing rubygems which require native compilation and use flags which used to raise a warning but now cause the compilation to fail outright. (Sorry for the run on sentence)

It's not just the json gem which fails - stackoverflow is littered with gem compilation issues after upgrading to XCode 5.1.

Don't upgrade if you haven't yet.

Loading

@doctyper
Copy link

@doctyper doctyper commented Mar 14, 2014

Here's the workaround I'm using while we wait for Apple to fix the bug:

cd /opt/boxen/repo
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./script/boxen

Loading

@Nkzn
Copy link

@Nkzn Nkzn commented Mar 17, 2014

It works in our environment. Thanks doctyper!

Loading

tfnico added a commit to tfnico/my-boxen that referenced this issue Mar 20, 2014
Boxen isn't so good at building native-using gems on latest OSX/Xcode:

See boxen/our-boxen#528
@jameynakama
Copy link

@jameynakama jameynakama commented Mar 20, 2014

@doctyper It doesn't sound like Apple is going to fix the "bug", unfortunately.

Loading

@henry74
Copy link
Author

@henry74 henry74 commented Mar 20, 2014

Need a better way to pass permanent flags to boxen then...

On Thu, Mar 20, 2014 at 11:48 AM, Jamey DeOrio notifications@github.comwrote:

@doctyper https://github.com/doctyper It doesn't sound like Apple is
going to fix the "bug", unfortunately.


Reply to this email directly or view it on GitHubhttps://github.com//issues/528#issuecomment-38191331
.

Loading

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Mar 30, 2014

Could you try to change script/boostrap file to set this environment variable?

Loading

@deyviatens
Copy link

@deyviatens deyviatens commented Apr 16, 2014

al igual que ustedes trate dei nstalar rails 4.0.0.4 y me sale el mismo error ya intente con $ ARCHFLAGS =-Wno-error = línea al mando no utilizado-argumento-duro-error-en-futuro. / Script / boxen

Loading

@skottler
Copy link

@skottler skottler commented Apr 17, 2014

@deyviatens you need to run gem install with the flag set.

Loading

@seanknox
Copy link
Contributor

@seanknox seanknox commented Sep 26, 2014

@henry74 is this still an issue or can this be closed?

Loading

petems added a commit to petems/our-boxen that referenced this issue Jan 21, 2015
Apple said they aren't gonna fix this, this is an easy way to catch it for now! 👍
@petems
Copy link
Member

@petems petems commented Jan 21, 2015

This issue still exists (only on older machines, on my OSX VM it happens)

PR to fix it: #712

Loading

@seanknox
Copy link
Contributor

@seanknox seanknox commented Mar 26, 2015

This was fixed in be29883 and later improved in 056ca87.

Loading

@seanknox seanknox closed this Mar 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants