mark-moseley / linecache

GNU General Public License v2.0
29 stars 20 forks source link

linecache failed to compile with ruby 1.9.2 #3

Closed runlevel5 closed 14 years ago

runlevel5 commented 14 years ago

vm_core.h, version.h and other include files are missing in include folder because the ruby core-team consider those header file should be ONLY used internally within Ruby. Issue filed: http://redmine.ruby-lang.org/issues/show/1857

mark-moseley commented 14 years ago

I am aware of what you say, but I am unsure of what it is that you want. Is this a request to make linecache compileable without requiring any of the Ruby core headers?

runlevel5 commented 14 years ago

Yes, in fact I would love to see linecache, ruby-debug can be pushed into the core as default debugger.

mark-moseley commented 14 years ago

That is beyond my control. I suggest you post a feature request on redmine.

runlevel5 commented 14 years ago

I will. But now I failed to compile linecache, I suspect that the ruby_source_code gem is not for 1.9.2.

mark-moseley commented 14 years ago

Actually, ruby_core_source works fine with the 1.9.2preview1 release, and has for several months. If you built Ruby from sources you pulled from the archives, then you will need to pass the "--with-ruby-include" option to the gem install, as described in the ruby-debug wiki.

runlevel5 commented 14 years ago

Well, that way doesn't work on me. Here is my step by step: $ cd /tmp $ svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby $ cd ruby $ autoconf $ ./configure --prefix=/usr $ make $ sudo make install $ sudo gem install ruby-debug19 -- --with-ruby-include=/tmp/ruby/

Makefile creation failed due to linecache

$ less -R /usr/lib/ruby/gems/1.9.1/gems/linecache19-0.5.11/ext/trace_nums/mkmf.log

have_header: checking for vm_core.h... -------------------- no

"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/tmp/ruby/ -D_FILE_OFFSETBITS=64 -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers conftest.c -L. -L/usr/lib -Wl,-R/usr/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby-static -lpthread -lrt -ldl -lcrypt -lm -lc" checked program was: /* begin / 1: #include "ruby.h" 2: 3: int main() {return 0;} /_ end */

"gcc -E -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/tmp/ruby/ -D_FILE_OFFSET_BITS=64 -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers conftest.c -o conftest.i" In file included from conftest.c:3: /usr/include/ruby-1.9.1/ruby/backward/vmcore.h:23:16: error: id.h: No such file or directory checked program was: /* begin / 1: #include "ruby.h" 2: 3: #include /_ end */


mark-moseley commented 14 years ago

I think that you're running an old version of ruby for the gem install; try "which ruby" - it should be /usr/bin/ruby. If that's correct, then you are overwriting an old version. Try to install it all to another directory name, and make sure your path is correct when you do the gem install.

runlevel5 commented 14 years ago

Thanks alot. Mark as FIXED.

merbjedi commented 14 years ago

I'm now seeing this exact same issue on the latest Ruby 1.9.2 (head).

http://gist.github.com/309798

merbjedi commented 14 years ago

nevermind, this is a different issue. sorry

devn commented 12 years ago

merbjedi, could you please link to the issue?