Opened 13 years ago
Closed 13 years ago
#30275 closed defect (fixed)
ruby: ruby gem installation causes segfaults
Reported by: | dj_mook@… | Owned by: | kimuraw (kimura wataru) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.99 |
Keywords: | lion haspatch | Cc: | nerdling (Jeremy Lavergne) |
Port: | ruby |
Description
If you install the ruby macport on lion and then install rubygems from source, any attempt to install a gem results in a segfault.
sudo gem install sinatra ruby-1.8.7-p352/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.0.0]
According to http://www.frymanet.com/2011/07/rvm-ruby-1-8-7-and-osx-lion/ ruby does not work well with the default llvm compiler in lion.
Using the solution from the article I patched the Portfile to set CC=/usr/bin/gcc-4.2 as a configure argument.
After rebuilding ruby with the new portfile and then installing rubygems from source, I can now install gems without problem.
Macports version 2.0 rc1.
Attachments (2)
Change History (11)
Changed 13 years ago by dj_mook@…
Attachment: | Portfile.ruby.patch added |
---|
comment:1 Changed 13 years ago by mf2k (Frank Schima)
Keywords: | haspatch added |
---|---|
Owner: | changed from macports-tickets@… to kimuraw@… |
comment:2 Changed 13 years ago by jmroot (Joshua Root)
comment:3 Changed 13 years ago by nerdling (Jeremy Lavergne)
Cc: | snc@… added |
---|
I'm seeing this problem in snow leopard with llvm-gcc as well.
comment:4 Changed 13 years ago by nerdling (Jeremy Lavergne)
Using the configure.compiler clang
macro suffices: ./configure correctly switches to clang.
comment:5 Changed 13 years ago by nerdling (Jeremy Lavergne)
Clang continues to result in segfaults.
comment:6 Changed 13 years ago by nerdling (Jeremy Lavergne)
This port builds successfully with configure.compilter gcc-4.2
.
Should we test for the OS version to decide between gcc-4.2 and gcc-4.0? or just detect llvm/clang and switch it back if set?
comment:7 Changed 13 years ago by nerdling (Jeremy Lavergne)
Behold the hierarchy for picking default compilers.
Changed 13 years ago by nerdling (Jeremy Lavergne)
Attachment: | ruby-snc.diff added |
---|
change configure.compiler to gcc-4.2 when defaulted to llvm-gcc-4.2 or clang
comment:8 Changed 13 years ago by nerdling (Jeremy Lavergne)
I've attached a patch to detect default compilers of llvm-gcc-4.2 or clang, and change it to gcc-4.2.
comment:9 Changed 13 years ago by kimuraw (kimura wataru)
Resolution: | → fixed |
---|---|
Status: | new → closed |
this problem was fixed at r81110. thanks!
Does it work with clang? It's probably better to use it if it does.