1

I'm trying to install rubinius via rbenv and this error came out. I'm not sure what's wrong here.

Here is the (successful) result of installing jruby:

[app@onepiece-web02 log]$ rbenv install jruby-1.7.25 
Downloading jruby-bin-1.7.25.tar.gz... 
-> https://dqw8nmjcqpjn7.cloudfront.net/03a26ace9be8b7f7a4fce3e0dfd106dfe2d7f48c750c3b1dc74046663e5b57a1 
Installing jruby-1.7.25... 
Installed jruby-1.7.25 to /home/app/.rbenv/versions/jruby-1.7.25 

And here is the (failed) result of installing rubinius:

[app@onepiece-web02 log]$ rbenv install rbx-3.42 
Downloading rubinius-3.42.tar.bz2... 
-> https://dqw8nmjcqpjn7.cloudfront.net/4fc4413101100f6393894632eef522c2667a821856ac32eb99ccecab2aeeae85 
Installing rubinius-3.42... 

BUILD FAILED (Amazon Linux AMI 2016.03 using ruby-build 20160913-7-gaa1a7a3) 

Inspect or clean up the working tree at /tmp/ruby-build.20160921192313.24426 
Results logged to /tmp/ruby-build.20160921192313.24426.log 

Last 10 log lines: 
rake aborted! 
Error compiling 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:68:in `command' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:234:in `cxx_compile' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:221:in `compile' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:433:in `build' 
/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/bundle/ruby/2.3.0/gems/daedalus-core-0.5.0/lib/daedalus.rb:895:in `block (2 levels) in perform_tasks' 
Tasks: TOP => install => build:build => machine/vm 
(See full trace by running task with --trace) 
Error: g++ -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/include -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/builtin -I. -Imachine/test/cxxtest -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libsodium/src/libsodium/include -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/udis86 -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libffi/include -Ivendor/double-conversion/src -DHAVE_CONFIG_H -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/machine/include/capi -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/oniguruma -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/libtommath -pipe -Wall -fno-omit-frame-pointer -g -fPIC  -O2 -DHAS_EXECINFO -DHAVE_SPT_REUSEARGV -DHAVE_CLOCK_GETTIME -DHAVE_NL_LANGINFO -DHAVE_POSIX_FADVISE -DHAVE_STRNLEN -DHAVE_TIMERFD -DHAVE_INOTIFY -DHAVE_STRUCT_STAT_ST_ATIM -DHAVE_STRUCT_STAT_ST_MTIM -DHAVE_STRUCT_STAT_ST_CTIM -DHAVE_TM_GMTOFF -DHAVE_TM_ZONE -DHAVE_TIMEZONE -DHAVE_TZNAME -DHAVE_DAYLIGHT -DHAVE_ALLOCA_H -DHAVE_STRING_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TIMES_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_STDARG_H -DSTRERROR_R_CHAR_P -I/tmp/ruby-build.20160921192313.24426/rubinius-3.42/vendor/rapidjson -I/usr/include -I/usr/include -D_GNU_SOURCE -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -DENABLE_LLVM -Wno-unused-function -Werror -DRBX_PROFILER -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-rtti -fvisibility-inlines-hidden    -std=c++11 -c -o machine/artifacts/logger.cpp.o machine/logger.cpp
Tom Lord
  • 27,404
  • 4
  • 50
  • 77
Cụt Cánh
  • 375
  • 2
  • 10
  • Looks like there's a compilation error; possibly because of missing libraries on your machine. The full error log is in `/tmp/ruby-build.20160921192313.24426.log` - there will hopefully be a better clue in there, above the bottom 10 lines which have been displayed. Can you please include (the key lines of?) this file in your post? – Tom Lord Sep 21 '16 at 10:55

1 Answers1

0

Without a full look at log file it's hard to know exactly what the problem is. I was able to install on OSX 10.9.4 with latest version of ruby-build installed with homebrew. I had to brew install llvm first however.

I suggest have a look at https://github.com/rbenv/ruby-build which rbenv install uses under the hood. In my experience with using rbenv install the issue is usually using the wrong c compiler, or missing libraries.

Some useful commands to check what your system defaults are:

which cc
which g++
cc --version
g++ --version

Check your $PATH settings echo $PATH

lacostenycoder
  • 10,623
  • 4
  • 31
  • 48