1
votes

I was trying to install it this way:

brew install autoconf brew install automake brew install libyaml rvm install ruby-head

I was trying to install ruby2 with rvm but I got this error:

ruby-head - #compiling Error running 'make ', please read /Users/boti/.rvm/log/ruby-head/make.log There has been an error while running make. Halting the installation. Ruby 'ruby-head' was build using clang - but it's not (fully) supported, expect errors.

This is my compiling log:

compiling ./missing/setproctitle.c compiling dmyext.c linking miniruby /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111: [BUG] Stack consistency error (sp: 38, bp: 36) ruby 2.0.0dev (2013-02-25) [x86_64-darwin12.2.0]

-- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports the more detail of.

-- Control frame information ----------------------------------------------- c:0006 p:0038 s:0038 e:000037 CLASS /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111 c:0005 p:0035 s:0034 e:000033 CLASS /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:107 c:0004 p:0009 s:0032 e:000031 TOP
/Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:85 [FINISH] c:0003 p:---- s:0030 e:000029 CFUNC :require c:0002 p:0098 s:0026 E:000f88 EVAL ./tool/mkconfig.rb:11 [FINISH] c:0001 p:0000 s:0002 E:0017a8 TOP [FINISH]

./tool/mkconfig.rb:11:in <main>' ./tool/mkconfig.rb:11:inrequire' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:85:in <top (required)>' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:107:in ' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111:in `'

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

  • Loaded script: ./tool/mkconfig.rb

  • 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

This is the beginning of my compiling log:

[2013-02-24 20:58:47] make CC = /usr/bin/gcc-4.2 LD = ld LDSHARED = /usr/bin/gcc-4.2 -dynamiclib CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I. DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /Users/boti/.rvm/rubies/ruby-head/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0 -fstack-protector -Wl,-u,_objc_msgSend -fstack-protector -Wl,-u,_objc_msgSend SOLIBS =

I would appreciate any help...

3
Have you installed the latest version of Xcode and the latest version of the command line tools?michaelmichael
Uff... no I am doing it right now. Thanks...Boti
NP, just the first thing I'd look at if I were getting compiler errors. Also, please update the question with results. The answer below from @mpapis (an RVM release manager) indicates RVM is aware of the issue.michaelmichael
I reinstalled XCode and command line tools. And I got the same results...Boti

3 Answers

6
votes

try this:

CC=clang rvm reinstall 2.0.0-p0

it will compile but might result in other errors later (I'm working on finding what causes the original issue).

0
votes

I am running into build errors around miniruby as well on Mac OS X 10.8.2 with XCode 4.6 and brew.

When just trying to run "rvm install 2.0.0" the result looks like this:

https://gist.github.com/polarapfel/5080946

When trying to set CC to /usr/bin/clang, the result looks like this:

https://gist.github.com/polarapfel/5081054

Either way, the result is the same for me.

Here's the funny thing about it: I can build head without a problem. I think 2.0.0p0 is not a clean build on Mac OS X and needs some more work to iron out the kinks.

--

OK, this did it for me: simply running "rvm get stable" got rid of the build problems.

0
votes

Make sure you're using clang 3.0 with clang -v.
Otherwise, if you're using an older clang version, compile 2.0.0-p0 with gcc 4.2 using:

rvm install ruby --with-gcc=gcc-4.2

I would first remove old ruby attempt:

rvm remove 2.0.0-p0

Also make sure you've got rvm head (not stable):

rvm get head  --autolibs=3

If this should solve the miniruby / enc compile problems, then 2.0.0-p0 is a clean build, but you're using outdated compiler. Installing the latest Xcode doesn't necessarily include the lastest clang version.