0

I'm new to Ruby and tried installing the oj gem with the following command:

sudo gem install oj -v '2.1.6'

Unfortunately I have received the following error. Is this due to using Ruby 2.0? Are there any workarounds?

ERROR:  Error installing oj:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on universal.x86_64-darwin13 <<<<<
creating Makefile

make "DESTDIR="
compiling cache8.c
compiling circarray.c
compiling compat.c
compiling dump.c
dump.c:165:1: warning: unused function 'ulong2str' [-Wunused-function]
ulong2str(uint32_t num, char *end) {
^
1 warning generated.
compiling err.c
compiling fast.c
fast.c:151:1: warning: unused function 'next_white' [-Wunused-function]
next_white(ParseInfo pi) {
^
1 warning generated.
compiling hash.c
compiling hash_test.c
compiling object.c
compiling odd.c
compiling oj.c
compiling parse.c
compiling resolve.c
compiling saj.c
saj.c:130:1: warning: unused function 'next_white' [-Wunused-function]
next_white(ParseInfo pi) {
^
1 warning generated.
compiling scp.c
compiling strict.c
compiling val_stack.c
linking shared-object oj.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: *** [oj.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/oj-2.1.6 for inspection.
arami
  • 593
  • 2
  • 6
  • 19
  • that version is probably not compatible with Mavericks. Can you use latest 2.6.0 version or closer to it and see if you have the problem? – Iuri G. Mar 13 '14 at 21:20
  • 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:13

1 Answers1

0

This issue is due to Xcode 5.1 - its already reported as a bug to Ruby.

https://bugs.ruby-lang.org/issues/9624#change-45736

There is some more additional discussion here: Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'

Community
  • 1
  • 1
Shahar Hadas
  • 2,641
  • 1
  • 27
  • 29