0

I am currently trying to install Rails on a new Mac.

I have an error when I try to install the gem "atomic".

I already tried every solutions I found on the net: installing xcode, trying changing the versions of ruby, etc. but it never works.

My config: OS X 10.9.2

xcode 5.1

ruby 2.0.0p247 gem 2.2.2

when I enter "xcode-select -p", I get: /Applications/Xcode.app/Contents/Developer

during atomic install, the error is the following:

"ERROR:  Error installing atomic:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
                                                          ^~~~~~~~~~~~~~~
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue );
                                                                                            ^
1 warning generated.
linking shared-object atomic_reference.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: *** [atomic_reference.bundle] Error 1

make failed, exit code 2"

Don't hesitate to ask for more infos, Thanks a lot

  • I have seen similar questions in SO before. Have searched SO already? – Raj Mar 24 '14 at 16:32
  • possible duplicate of [Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply\_definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul) – Nakilon Apr 20 '14 at 01:24

1 Answers1

0

I would recommend following steps:

  • Uninstall atomic gem

    gem uninstall atomic

  • Re-Install atomic gem

    gem install atomic

  • Install rails

    gem install rails

Kirti Thorat
  • 52,578
  • 9
  • 101
  • 108