Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ruby 1.9 can't install ruby-debug19 gem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pstar
Apprentice
Apprentice


Joined: 22 Nov 2007
Posts: 189

PostPosted: Sat Apr 14, 2012 9:26 am    Post subject: Ruby 1.9 can't install ruby-debug19 gem Reply with quote

Quote:
gem install ruby-debug19
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug19:
ERROR: Failed to build gem native extension.

/usr/bin/ruby19 extconf.rb
checking for vm_core.h... no
/usr/local/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
checking for vm_core.h... yes
checking for version.h... yes
creating Makefile

make
compiling trace_nums.c
linking shared-object trace_nums19.so
trace_nums.o: In function `lnums_for_str':
trace_nums.c:(.text+0x22): undefined reference to `ruby_current_thread'
collect2: ld returned 1 exit status
make: *** [trace_nums19.so] Error 1


Gem files will remain installed in /usr/local/lib64/ruby/gems/1.9.1/gems/linecache19-0.5.12 for inspection.
Results logged to /usr/local/lib64/ruby/gems/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out


I've tried ruby with USE=threads and install ruby-threads, both still not working.

Quote:
emerge -pv dev-lang/ruby

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ~] dev-lang/ruby-1.9.3_p125 USE="berkdb debug doc examples gdbm ipv6 ncurses rdoc readline rubytests ssl yaml -socks5 -tk -xemacs" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB



Quote:

emerge -av rubygems

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ~] dev-ruby/rubygems-1.8.15 USE="-server -test" RUBY_TARGETS="ruby18 ruby19 -jruby -ree18" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Tue Apr 17, 2012 12:35 pm    Post subject: Reply with quote

I'm having the same problem with linechache19. Have you solved it?
Back to top
View user's profile Send private message
pstar
Apprentice
Apprentice


Joined: 22 Nov 2007
Posts: 189

PostPosted: Tue Apr 17, 2012 5:12 pm    Post subject: Reply with quote

Unfortunately, no.

I think I am going to use RVM instead of let Gentoo manage my Ruby installation.
Back to top
View user's profile Send private message
.yankee
Apprentice
Apprentice


Joined: 24 Feb 2008
Posts: 194
Location: Polska

PostPosted: Wed Apr 18, 2012 12:13 pm    Post subject: Reply with quote

I've tried some things yesterday, still with no luck: But I suspect this might be related to Ruby slotting. @pstar, do you have ruby and rubygems installed in multiple slots?
I believe that 'bundler' might be the culprit - it seems that it uses Ruby 1.8, regardless of the system-wide slot selection.
Back to top
View user's profile Send private message
oelmekki
n00b
n00b


Joined: 11 May 2011
Posts: 3

PostPosted: Thu Feb 28, 2013 8:24 am    Post subject: Reply with quote

Hello,

I know this post is old, but it's still the first result when you google for "gentoo vm_core.h", with no other relevant result.

TL;DR : ensure raw ruby sources are in /usr/include/ruby-1.9.1/

Something seems to have change in the dev-lang/ruby package. Previously, here is what looked like a typical install :

Code:

$ ls -1 /usr/include/ruby-1.9.1/
ruby/
ruby-1.9.2-p0/
ruby-1.9.3-p0/
ruby-1.9.3-rc1/
ruby.h
x86_64-linux/


Now, it's more like this :

Code:

$ ls -1 /usr/include/ruby-1.9.1/
ruby/
ruby.h
x86_64-linux/


The ruby-1.9.2-p0, ruby-1.9.3-p0 and ruby-1.9.3-rc1 were actually ruby sources, and it seems not to be installed anymore. Sadly, it's what compiled gem expect to find. I think this is OP problem, since its configure log clearly indicate vm_core.h was not found.

So, the solution is to untar your ruby sources from /usr/portage/distfiles and to put the source root directory (eg: ruby-1.9.3-p392) into /usr/include/ruby-1.9.1/ as is. Gem compilation needing ruby sources will then work as expected.

A cleaner solution may be to put it into /usr/local/include/ruby-1.9.1/, but I didn't test that.

EDIT : btw, OP, you should really give a try to pry-debugger, it has all the fancy look of pry with basic flow control, all of that without the typical segfault and compilation problems of ruby-debug ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum