Having trouble installing on OSX: perhaps I need a specific gcc version?

Support Ticket

 

Hello, 

I am trying to follow the steps and get `gem install decko` to work, but I get strange errors. I google them and it suggests I need to symlink gcc to another command that I cannot figure out. Below is the terminal and log output: What can I do to circumvent this issue and get my local server up and running?
--------------------------------------------------------------------------------------------

sudo gem install decko

Password:

Fetching: cardname-0.6.4.gem (100%)

Successfully installed cardname-0.6.4

Building native extensions.  This could take a while...

ERROR:  Error installing decko:

ERROR: Failed to build gem native extension.

 

    current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.25/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181112-28750-z5jnjt.rb extconf.rb

checking for ffi.h... *** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers.  Check the mkmf.log file for more details.  You may

need configuration options.

 

Provided configuration options:

--with-opt-dir

--without-opt-dir

--with-opt-include

--without-opt-include=${opt-dir}/include

--with-opt-lib

--without-opt-lib=${opt-dir}/lib

--with-make-prog

--without-make-prog

--srcdir=.

--curdir

--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)

--with-ffi_c-dir

--without-ffi_c-dir

--with-ffi_c-include

--without-ffi_c-include=${ffi_c-dir}/include

--with-ffi_c-lib

--without-ffi_c-lib=${ffi_c-dir}/lib

--with-libffi-config

--without-libffi-config

--with-pkg-config

--without-pkg-config

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)

You have to install development tools first.

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:571:in `block in try_compile'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:524:in `with_werror'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:571:in `try_compile'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:1091:in `block in have_header'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'

from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:1090:in `have_header'

from extconf.rb:16:in `<main>'

 

To see why this extension failed to compile, please check the mkmf.log which can be found here:

 

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.9.25/mkmf.log

 

 

 

extconf failed, exit code 1

 

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.25 for inspection.

 

Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.9.25/gem_make.out

 

 

-------------------------------------------------------
And the log output: 

"pkg-config --exists libffi"
package configuration for libffi is not found
"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -lruby.2.3.0 -lpthread -ldl -lobjc "
In file included from conftest.c:1:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */