Issue #9624 has been updated by Mika Mannermaa.


Nobuyoshi Nakada wrote:
> Mika Mannermaa wrote:
> > Please note that the ruby is the system ruby compiled and installed by Apple before the clang version was updated.
> > 
> >     $ ruby -v
> >     ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
> 
> Thank you, I could confirm it, but when configured from the p247 source:
> 
>     $ grep -w -e GCC -e DLDFLAGS config.status
>     S["DLDFLAGS"]="-Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress"
>     S["GCC"]="yes"
> 
> > Would I need to compile the ruby from source to verify if this issue is detecting the clang version?
> 
> Seems that Apple did something wrong again.

Yup, installed rbenv and compiled ruby 2.1.1 from source.

    $ ruby -e 'p RbConfig::CONFIG.values_at(*%w[GCC DLDFLAGS])'
    ["yes", "-Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress"]
    $ ruby -v
    ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior
    ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

So Apple has somehow managed to remove the comma in their version, so this bug should be reported to them instead of upstream, now I wonder how to do that...


----------------------------------------
Bug #9624: Unrecognized command-line option (CLANG/Xcode 5.1) "-multiply_definedsuppress" prevents installation of gems / ruby on OS X
https://bugs.ruby-lang.org/issues/9624#change-45819

* Author: Mika Mannermaa
* Status: Third Party's Issue
* Priority: Normal
* Assignee: cruby-mac
* Category: build
* Target version: 
* ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
* Backport: 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
Currently there is a single unrecognized command-line option [configure.in:L2707](https://github.com/ruby/ruby/blob/trunk/configure.in#L2707) that should be removed in order for the ruby/gems native extensions to compile on OS X with XCode 5.1 onwards (new CLANG version). The release went live on 11th March 2014, and broke all ruby gems with native extensions.

From [Apple XCode Release Notes](https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Introduction/Introduction.html):

> The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
> Projects using invalid compiler options will need to be changed to remove those options. To help ease that transition, the compiler will temporarily accept an option to downgrade the error to a warning:
>
> -Wno-error=unused-command-line-argument-hard-error-in-future
>
> Note: This option will not be supported in the future.
> To workaround this issue, set the ARCHFLAGS environment variable to downgrade the error to a warning. For example, you can install a Python native extension with:
> $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName
> 
> Similarly, you can install a Ruby Gem with:
> 
> $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName 16214764 updated
>





-- 
http://bugs.ruby-lang.org/