2

I'm attempting to install a gem on my new Ubuntu 12.10 (GNU/Linux 3.6.5-x86_64-linode28 x86_64) server, and I'm getting a segfault in timeout.rb . I've installed rvm, and ree, and getting this error when I attempt to use install gems:

bsoule@ainslie:~$ gem update --system
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02
Bee
  • 169
  • 6

1 Answers1

4

My initial google searches were sounding like I'd have to install an older version of gcc and recompile ree using this older gcc. Then I found this blog post

http://deadc.org/blog/2012/10/19/rvm-install-ruby-1-dot-8-7-with-gcc-4-dot-7/

Three lines from Thiago Silva:

deadcow@jazz ~ $ rvm remove ree
deadcow@jazz ~ $ export CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls"
deadcow@jazz ~ $ rvm install ree

And gem now works.

Bee
  • 169
  • 6
  • Nice. Also mentioned here for rbenv: https://github.com/sstephenson/ruby-build/wiki#187-p302-and-lower-segfaults-for-https-requests-on-os-x-107 – Michaël Witrant Nov 29 '13 at 09:34