In recently released Xcode CLI tools 5.1, Apple has changed clang not to accept unknown CLI options. This causes gem installation failures for gems with C extensions when using Chef Client Mac OSX Omnibus Packages.
The reason of this issue is that during the build process, ruby is configured with compiler options that are incompatible with the latest version of clang. When installing rubygems with C extensions this leads to errors like:
clang: error: unknown argument: '-R/opt/chef/embedded/lib' [-Wunused-command-line-argument-hard-error-in-future]