-
-
Save huynguyen/1329273 to your computer and use it in GitHub Desktop.
#Need the latest version so it knows where to get ruby-1.9.3 | |
rvm get head | |
curl -O https://github.com/ruby/ruby/pull/56.diff | |
rvm install ruby-1.9.3-p0 --patch 56.diff | |
cd ~/.rvm/src/ruby-1.9.3-p0 | |
# Need to recompile because rvm doesn't force autoconf? | |
autoconf -f && ./configure --prefix="$HOME/.rvm/rubies/ruby-1.9.3-p0" && make -j3 && make install | |
Nop, the first command prints nothing and the second errors out:
○ nm ~/.rvm/rubies/ruby-1.9.3-p0/bin/ruby | grep current_thread
millisami at sachin in ~1 ↵
○ ruby -v -r rubygems -r ruby-debug -e 'Debugger.start and puts Debugger.current_context'
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
/Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle, 9): Symbol not found: _ruby_threadptr_data_type (LoadError)
Referenced from: /Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
Expected in: flat namespace
in /Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle - /Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>'
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/millisami/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /Users/millisami/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
millisami at sachin in ~1 ↵
So is it not installed properly?
Why the rvm installation logs that Running autoreconf
? or is it mean something else?
Yea it's not installed properly, ruby-debug is bombing looking for symbols in the binary.
I ran into the same thing the first time I wrote the gist. I did a quick look through the rvm source and there is an autoconf function defined
scripts/functions/pkg
, but it's not used or is called implicitly somewhere. Maybe it's not doing the -f (force) flag?
Yea so to make it work I guess you do need to run the manual process.
I just have updated RVM, you should try:
rvm get head && rvm reload
rvm reinstall 1.9.3 --force-autoconf --patch debug -j 3
@mpapis Worked like a charm, thank you sir!
There is a new version of ruby-debug which fixes 1.9.3, no recompilation needed: http://rubyforge.org/frs/?group_id=8883
For me I still needed to run autoreconf because when I checked for the symbol needed it wasn't there.
Would you try the following:
$ nm ~/.rvm/rubies/ruby-1.9.3-p0/bin/ruby | grep current_thread
if it returns something like
00000001002249d0 D _ruby_current_thread
then maybe I just did it wrong...Another way to check is to simply try to fire up the debugger.
$ ruby -v -r rubygems -r ruby-debug -e 'Debugger.start and puts Debugger.current_context'
If it works for you let me know, I'll change it up so it's not an ugly two step process.