Error launching make when installing Ruby through RVM on OS X Mountain Lion

This is my first time using Ruby. I realized that I did not use sudo to install Gems, so I followed this tutotrial ( http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac ) to install RVM so that I can update my version of Ruby, and then install Middleman ( http://middlemanapp.com/ ).

RVM worked, but when installing Ruby 1.9.3 at the #compiling stage, I get the following error:

Error starting 'make', please read /Users/Mark/.rvm/log/ruby-1.9.3-p385/make.log An error occurred while make was running. Complete installation.

I opened the log file, and unlike many other problems that I saw, the file does not contain links to the "readline", but to the "compilation", which, I assume, refers to the "# comppiling" Ruby install stage. Below is the output of make.log:

[2013-02-12 09:04:26] make CC = clang LD = ld LDSHARED = clang -dynamic -bundle CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/Mark/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I. DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace 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:2732:26: warning: while loop has empty body [-Wempty-body] while (--ny && !zds[ny]); ++ny; ^ bignum.c:2732:26: note: put the semicolon on a separate line to silence this warning 1 warning generated. compiling class.c compiling compar.c compiling complex.c 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 gc.c:3060:1: warning: unused function 'chain_finalized_object' [-Wunused-function] chain_finalized_object(st_data_t key, st_data_t val, st_data_t arg) ^ 1 warning generated. compiling hash.c compiling inits.c compiling io.c compiling marshal.c compiling math.c compiling node.c compiling numeric.c compiling object.c compiling pack.c compiling parse.c compiling process.c compiling random.c compiling range.c compiling rational.c compiling re.c compiling regcomp.c compiling regenc.c compiling regerror.c compiling regexec.c compiling regparse.c regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] return t->num_entries; ~~~~~~ ~~~^~~~~~~~~~~ 1 error generated. make: *** [regparse.o] Error 1 

If I run make -version, I get the following output:

GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see source of copy conditions. There is no guarantee; even for COMMERCIAL VALUE or SUITABILITY FOR A PARTICULAR PURPOSE.

This program was created for i386-apple-darwin11.3.0

I am struggling to find the exact match question, so if someone can help, it will be great.

Greetings

Mark.

+4
source share
2 answers

I followed some tips here and in other posts related to Googled, but in the end, updating GCC via Homebrew is what finally allowed the Ruby installation to complicate and complete.

The specific link I used to update GCC: Installing Ruby on Mac OS X 10.8.2

So thanks for all the help, I can't be sure that this is a combination of all updates and cleanup, as well as GCC or just GCC, but I'm up and running.

+3
source

Although you do not see the error, it is actually caused by readline. As atmosx mentioned, I would remove the default installation of MAC OS X and run it from the very beginning.

Or after that https://rvm.io/packages/readline/ to help enable readline. Also, for reference, look at this previous question: Error on startup when installing Ruby 1.8.7-p302 through RVM on Mac OS 10.5.8

So the following steps:

 rvm pkg install readline rvm remove 1.8.7 rvm cleanup all rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr 

Thanks to Andrew for http://anlek.com/2011/01/rvm-install-1-8-7-p330-fails/ for the pointer.

+1
source

All Articles