0

I am trying to use hombrew to install the metasploit-framework on my Macbook Pro (running OS X 10.10 beta) so I can pen-test my server. However, metasploit has a lot of trouble working with ruby 2 and later (I have spent hours trying to see if I could fix metasploit to get it to work with ruby 2) so I figured I need to install ruby 1.9.3. Thus, opened up terminal and ran:

rvm install ruby-1.9.3

This is the output of the above command. Please ignore the /-\| characters because that is just rvm's spinning animation that appears in the console when installing.

Error running './configure --prefix=/Users/ericmarkmartin/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared',
showing last 15 lines of /Users/ericmarkmartin/.rvm/log/1403754271_ruby-1.9.3-p547/configure.log
[2014-06-25 23:44:47] ./configure
current path: /Users/ericmarkmartin/.rvm/src/ruby-1.9.3-p547
GEM_HOME=/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2
PATH=/Users/ericmarkmartin/.rvm/usr/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2/bin:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2@global/bin:/Users/ericmarkmartin/.rvm/rubies/ruby-2.1.2/bin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/ericmarkmartin/.apportable/SDK/bin:/Users/ericmarkmartin/.apportable/SDK/bin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/ericmarkmartin/.rvm/bin:/Users/ericmarkmartin/.rvm/bin
GEM_PATH=/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2@global
command(7): ./configure --prefix=/Users/ericmarkmartin/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin14.0.0
checking host system type... i386-apple-darwin14.0.0
checking target system type... i386-apple-darwin14.0.0
checking whether the C compiler works... no
configure: error: in `/Users/ericmarkmartin/.rvm/src/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
See `config.log' for more details
There has been an error while running configure. Halting the installation.

After some searching, I found that this was a common problem on OS X, solvable by using the following command.

rvm install ruby-1.9.3 --with-gcc=clang

Here is the output of this command. Again, please ignore the /-\| characters.

Error running '__rvm_make -j 1',
showing last 15 lines of /Users/ericmarkmartin/.rvm/log/1403754087_ruby-1.9.3-p547/make.log
-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6
++ return 2
There has been an error while running make. Halting the installation.

However, this gives an error, saying that make failed to run. Specifically, it says that it encountered a segmentation fault upon linking miniruby. I would greatly appreciate it if someone could help me get 1.9.3 up and running on my Mac, as I have been searching a while for answers and have not found any. I have also already tried installing earlier versions of ruby, which the same lack of success. Below, I am including the make log file associated with the latter of the two commands. Please notify me if you require additional log files, and I will be happy to provide them.

Thank you

make.log

2014-06-25 00:20:42] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/ericmarkmartin/.rvm/src/ruby-1.9.3-p547
GEM_HOME=/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2
PATH=/Users/ericmarkmartin/.rvm/usr/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/ericmarkmartin/.rbenv/shims:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2/bin:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2@global/bin:/Users/ericmarkmartin/.rvm/rubies/ruby-2.1.2/bin:/Users/ericmarkmartin/.rvm/bin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/ericmarkmartin/.apportable/SDK/bin:/Users/ericmarkmartin/.apportable/SDK/bin:/usr/local/opt/ruby193/bin:/usr/local/bin:/usr/local/sbin:/opt/iOSOpenDev/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
GEM_PATH=/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2:/Users/ericmarkmartin/.rvm/gems/ruby-2.1.2@global
command(3): __rvm_make -j 1
++ make -j 1
    CC = clang
    LD = ld
    LDSHARED = clang -dynamiclib
    CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration  -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -I. -I.ext/include/x86_64-darwin14.0.0 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/ericmarkmartin/.rvm/rubies/ruby-1.9.3-p547/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1  -Wl,-u,_objc_msgSend   
    SOLIBS = 
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:897:1: warning: unused function 'next_pow2' [-Wunused-function]
next_pow2(register unsigned long x)
^
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
complex.c:78:1: warning: unused function 'f_cmp' [-Wunused-function]
f_cmp(VALUE x, VALUE y)
^
complex.c:108:1: warning: unused function 'f_lt_p' [-Wunused-function]
f_lt_p(VALUE x, VALUE y)
^
complex.c:115:1: warning: unused function 'f_mod' [-Wunused-function]
binop(mod, '%')
^
complex.c:29:21: note: expanded from macro 'binop'
inline static VALUE \
                    ^
<scratch space>:14:1: note: expanded from here
f_mod
^
complex.c:154:1: warning: unused function 'f_abs2' [-Wunused-function]
fun1(abs2)
^
complex.c:36:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:17:1: note: expanded from here
f_abs2
^
complex.c:156:1: warning: unused function 'f_conj' [-Wunused-function]
fun1(conj)
^
complex.c:36:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:21:1: note: expanded from here
f_conj
^
complex.c:158:1: warning: unused function 'f_floor' [-Wunused-function]
fun1(floor)
^
complex.c:36:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:25:1: note: expanded from here
f_floor
^
complex.c:159:1: warning: unused function 'f_imag' [-Wunused-function]
fun1(imag)
^
complex.c:36:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:27:1: note: expanded from here
f_imag
^
complex.c:163:1: warning: unused function 'f_real' [-Wunused-function]
fun1(real)
^
complex.c:36:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:35:1: note: expanded from here
f_real
^
complex.c:184:1: warning: unused function 'f_divmod' [-Wunused-function]
fun2(divmod)
^
complex.c:43:21: note: expanded from macro 'fun2'
inline static VALUE \
                    ^
<scratch space>:43:1: note: expanded from here
f_divmod
^
complex.c:196:1: warning: unused function 'f_idiv' [-Wunused-function]
fun2(idiv)
^
complex.c:43:21: note: expanded from macro 'fun2'
inline static VALUE \
                    ^
<scratch space>:49:1: note: expanded from here
f_idiv
^
complex.c:262:1: warning: unused function 'k_integer_p' [-Wunused-function]
k_integer_p(VALUE x)
^
complex.c:463:1: warning: unused function 'f_complex_new1' [-Wunused-function]
f_complex_new1(VALUE klass, VALUE x)
^
complex.c:518:1: warning: unused function 'm_sqrt_bang' [-Wunused-function]
imp1(sqrt)
^
complex.c:489:21: note: expanded from macro 'imp1'
inline static VALUE \
                    ^
<scratch space>:75:1: note: expanded from here
m_sqrt_bang
^
13 warnings generated.
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
numeric.c:1409:10: warning: 'finite' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
    if (!finite(value))
         ^
/usr/include/math.h:718:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
           ^
1 warning generated.
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
rational.c:86:1: warning: unused function 'f_gt_p' [-Wunused-function]
f_gt_p(VALUE x, VALUE y)
^
rational.c:136:1: warning: unused function 'f_floor' [-Wunused-function]
fun1(floor)
^
rational.c:40:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:18:1: note: expanded from here
f_floor
^
rational.c:157:1: warning: unused function 'f_truncate' [-Wunused-function]
fun1(truncate)
^
rational.c:40:21: note: expanded from macro 'fun1'
inline static VALUE \
                    ^
<scratch space>:28:1: note: expanded from here
f_truncate
^
rational.c:409:1: warning: unused function 'f_rational_new_bang2' [-Wunused-function]
f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
^
rational.c:518:1: warning: unused function 'f_rational_new1' [-Wunused-function]
f_rational_new1(VALUE klass, VALUE x)
^
rational.c:533:1: warning: unused function 'f_rational_new_no_reduce1' [-Wunused-function]
f_rational_new_no_reduce1(VALUE klass, VALUE x)
^
6 warnings generated.
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling time.c
compiling transcode.c
compiling util.c
compiling variable.c
compiling compile.c
compiling debug.c
compiling iseq.c
compiling vm.c
compiling vm_dump.c
compiling thread.c
thread.c:2565:34: warning: variable 'orig_read' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_read);
                                 ^~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
thread.c:2566:34: warning: variable 'orig_write' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_write);
                                 ^~~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
thread.c:2567:34: warning: variable 'orig_except' is uninitialized when used within its own initialization [-Wuninitialized]
    rb_fdset_t UNINITIALIZED_VAR(orig_except);
                                 ^~~~~~~~~~~
./vm_core.h:115:34: note: expanded from macro 'UNINITIALIZED_VAR'
#define UNINITIALIZED_VAR(x) x = x
                                 ^
3 warnings generated.
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/us_ascii.c
compiling ./enc/unicode.c
compiling ./enc/utf_8.c
compiling newline.c
compiling ./missing/setproctitle.c
compiling dmyext.c
linking miniruby
./miniruby: [BUG] Segmentation fault
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin14.0.0]

-- Control frame information -----------------------------------------------
c:0002 p:---- s:0005 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000ae8 d:000ae8 TOP   


-- C level backtrace information -------------------------------------------

   See Crash Report log file under ~/Library/Logs/CrashReporter or
   /Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6
++ return 2
7
  • Would it be possible for you to cut only the relevant parts out of those pastebin links?
    – user1131435
    Jun 26, 2014 at 4:24
  • Sure. Thanks for the quick response. I have just cut the unnecessary parts out of the pastes. Jun 26, 2014 at 4:28
  • Oh, I'm sorry, I should have been clearer. I meant cut them out and put them in your post, sorry!
    – user1131435
    Jun 26, 2014 at 4:30
  • No problem, I'll do it write now. Jun 26, 2014 at 4:31
  • Ok, I finished with the link removal. Jun 26, 2014 at 4:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.