Issues building ruby 1.8.7 or installing the bundler gem with GCC 4.7 on linux (Fedora 17, Arch, etc.). This issue occurred for me using RVM. I was able to install 1.8.7, but unable to install the bundler gem. I would receive the following error:
$ gem install bundler
~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
this issue is described in a number of locations, including:
The description of the problem in the links in the original question suggest installing older versions of gcc to build 1.8.7, this is not necessary.
$ rvm remove 1.8.7
$ CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" rvm install 1.8.7
$ rvm use 1.8.7
$ gem install bundler
Solution derived from the following:
Bug #6383: Segfault in Timeout module when compiled with GCC 4.7
Also, I would ensure that you have the stable release that was released as of today, May 30, 2012 which is 4.7.0 and NOT one of the previous 4.7 releases which were not stable releases. RVM has a policy of not supporting non-stable-releases (aka development versions) of GCC for the reason that, well we're not compiler guys hehe.
Then, in addition, please uninstall and reinstall your original version of 1.8.7. Another option is to 'rvm reinstall 1.8.7' though not all previous configure options may be regenerated to include acceptance of the changed CFLAGS variable, as written to the config. @mpapis, do we need to advocate use of the --autoconf --force here?
(mpapis and I are devs on the RVM Project so this is as good a place as any to discuss flags and monitor to see which should be done so we can push the info to anyone else that comes to us about this)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With