How do I bundle eventmachine in ree on Yosemite?

627 views Asked by At

We are trying to bundle version 1.0.3 of the eventmachine using ree-1.8.7-2012.02 on Yosemite, but we're getting the following error.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/purinkle/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... yes
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... no
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile

make
c++  -I. -I/opt/local/include -I. -I/Users/purinkle/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/i686-darwin14.0.0 -I. -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_RB_TRAP_IMMEDIATE -DHAVE_RBTRAP -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_SYS_EVENT_H -DHAVE_SYS_QUEUE_H -DHAVE_KQUEUE  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -g -O2 -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common     -c binder.cpp
clang: error: unknown argument: '-fno-tree-dce'
make: *** [binder.o] Error 1


Gem files will remain installed in /Users/purinkle/.rvm/gems/ree-1.8.7-2012.02/gems/eventmachine-1.0.3 for inspection.
Results logged to /Users/purinkle/.rvm/gems/ree-1.8.7-2012.02/gems/eventmachine-1.0.3/ext/gem_make.out

We get the same error when we execute gem install eventmachine -v '1.0.3'

Any ideas on how to get our development machines up and running?

1

There are 1 answers

0
Ancor Cruz On BEST ANSWER

You have to install Xcode and the command line tools with:

xcode-select --install

Also, you have to open Xcode and accept the licence terms.

Update: If you have upgraded your system from an earlier OSX you should try to remove your ree installation and reinstall it.

$ rvm remove ree-1.8.7-2012.02

You'll have to install the gcc compiler 4.2 version.

$ brew install homebrew/dupes/apple-gcc42

after install the compiler you should be able to install ruby and eventmachine.

$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=/usr/local/bin/gcc-4.2 rvm install ree