Comments
-
Greg Hurrell
So you say, "otherwise it did not run properly". Do you mean to say that it does run properly after recompiling?
-
anonymous
I mean, that Command-T compiled for Vim 7.2 does not run in Vim 7.3 (problem with loading C-extension), so it should be recompiled. I think, this is because Vim 7.3 uses Ruby 1.9.1.
-- Dmitry Maksimov
-
Greg Hurrell
Ok, thanks for clarifying that. What you describe is actually expected behavior; Command-T must always be compiled and linked against the same version of Ruby that Vim itself is linked against.
I try to cover this in the documentation, particularly the "TROUBLE-SHOOTING" section, although I am going to update it now that 7.3 is officially out, and at least on Windows, it is now linked against Ruby 1.9.1.
-
Greg Hurrell
Ok, I've updated the docs.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
-
anonymous
Wincent, I reported bug not about command-t compilation issues with Vim 7.3. Sorry, if I was unclear. The bug is about Vim 7.3 crash on pressing Esc button after calling :CommandT.
-
Greg Hurrell
Sounds like you've miscompiled Command-T.
What was the output when you ran
ruby exconf.rb
andmake
?What is the output of
vim --version
?What is the output of
ruby --version
?What version of Vim are you running? Is this a binary download from www.vim.org is it a build that you've compiled yourself from source?
-
anonymous
ruby --version
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]
vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 15:06:59) MS-Windows 32-bit console version Compiled by Bram@KIBAALE Big version without GUI. Features included (+) or not (-): +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape +multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +persistent_undo -postscript +printer -profile -python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save -xpm_w32 system vimrc file: "$VIM\vimrc" user vimrc file: "$HOME\_vimrc" 2nd user vimrc file: "$VIM\_vimrc" user exrc file: "$HOME\_exrc" 2nd user exrc file: "$VIM\_exrc" Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DWINVER=0x0400 -D_WIN32_WINNT= 0x0400 /Fo.\ObjC/ /Ox /GL -DNDEBUG /Zl /MT -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_BIG /Fd.\ObjC/ /Zi Linking: link /RELEASE /nologo /subsystem:console /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32. lib comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib libcmt.lib user32.lib /PDB:vim.pdb -debug
ruby extconf.rb
checking for ruby.h... yes creating Makefile
make
gcc -I. -Id:/bin/ruby191/include/ruby-1.9.1/i386-mingw32 -I/d/bin/ruby191/include/ruby-1.9.1/ruby/backward -I/d/bin/ruby 191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o ext.o -c ext.c gcc -I. -Id:/bin/ruby191/include/ruby-1.9.1/i386-mingw32 -I/d/bin/ruby191/include/ruby-1.9.1/ruby/backward -I/d/bin/ruby 191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o match.o -c match.c gcc -I. -Id:/bin/ruby191/include/ruby-1.9.1/i386-mingw32 -I/d/bin/ruby191/include/ruby-1.9.1/ruby/backward -I/d/bin/ruby 191/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wall -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o matcher.o -c matcher.c gcc -shared -s -o ext.so ext.o match.o matcher.o -L. -Ld:/bin/ruby191/lib -L. -Wl,--enable-auto-image-base,--enable-aut o-import -lmsvcrt-ruby191 -lshell32 -lws2_32
-
Greg Hurrell
According the the output you pasted in from
vim --version
, your Vim wasn't compiled with Ruby support (note the-ruby
in the output, and the lack of Ruby-related flags in the compilation and linking output. -
Alva
I suffered the same problem too.
I am using win7, Chinese Simple Pro Edition. the following is about my environment:
--> ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-mingw32] VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 15 2010 15:14:24) +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole -osfiletype +path_extra +perl/dyn +persistent_undo -postscript +printer -profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32 Compiled : cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\ObjGOLYHTR/ /Ox /GL -DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl83.dll\" -DDYNAMIC_TCL_VER=\"8.3\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python31.dll\" -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl512.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=191 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby191.dll\" -DFEAT_BIG /Fd.\ObjGOLYHTR/ /Zi Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:i386 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:python27.lib /nodefaultlib:python31.lib e:\tcl\lib\tclstub83.lib WSock32.lib e:\xpm\lib\libXpm.lib /PDB:gvim.pdb -debug
make:
gcc -I. -IC:/Ruby19/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby19/include/ruby-1.9 .1/ruby/backward -I/C/Ruby19/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wal l -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o ext.o -c ex t.c gcc -I. -IC:/Ruby19/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby19/include/ruby-1.9 .1/ruby/backward -I/C/Ruby19/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wal l -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o match.o -c match.c gcc -I. -IC:/Ruby19/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby19/include/ruby-1.9 .1/ruby/backward -I/C/Ruby19/include/ruby-1.9.1 -I. -DHAVE_RUBY_H -O2 -g -Wal l -Wno-parentheses -std=c99 -Wall -Wextra -Wno-unused-parameter -o matcher.o - c matcher.c gcc -shared -s -o ext.so ext.o match.o matcher.o -L. -LC:/Ruby19/lib -L. -Wl,-- enable-auto-image-base,--enable-auto-import -lmsvcrt-ruby191 -lshell32 -lws2_ 32
-
Greg Hurrell
I'm on a Mac here so I don't know too much about the nuances of compiling this on Windows.
At least at a glance things look ok (ie. Vim seems to want
msvcrt-ruby191.dll
and Command-T was linked againstmsvcrt-ruby191
during themake
, so they seem to match).I see you're using MinGW. Never used it myself, but did you use it to compile your own Ruby? Did you compile your own Vim? You could try doing that, although it may be opening a can of worms.
-
Alva
thanks for your reply.
I download vim 7.3 from official site
ant MinGw is shipped with ruby dev-kit
I have googled this problem for the whole afternoon, I noticed that someone encounter problem with c extensions on ruby 1.9.1. here is the test module.
// Demonstrating what's presumed to be a Ruby 1.9 bug // Where test.rb contains: // require 'rubygems' // The error raised is that Mutex can't find the method 'synchronize' [/tags/include #include] <ruby.h> static char ** s_argv; static int s_argc = 1; int main() { s_argv = (char **) calloc(2, sizeof(char *)); s_argv[0] = "Embedded Ruby"; s_argv[1] = NULL; ruby_sysinit(&s_argc, &s_argv); { RUBY_INIT_STACK; ruby_init(); ruby_script("BrowserPlus Embedded Ruby"); ruby_init_loadpath(); rb_require("test.rb"); } }
-
Greg Hurrell
As an alternative then you could try using the Vim 7.3 build from the Cream project, which links against 1.8.7, not 1.9.
http://sourceforge.net/projects/cream/files/Vim
This is just normal Vim without any of the Cream stuff added.
-
Alva
for a project I want to use Python 2.7 and official Vim7.3 support this python version, but the cream version doesn't.
command-t is one of my favorite vim plugins, I just want it became better, so I reported this issue. if you have time, please try to fix this, it would be good, if it get fixed before vim7.3 get popular. best regards.
-
Greg Hurrell
Yes, I'd like to fix it. But from what you're suggesting, it looks to be a bug in Ruby 1.9. It might be possible to work around it inside Vim itself, or perhaps in Command-T, but I'm not sure about it.
If you're forced to use Ruby 1.8 but also need Python 2.7, then I guess compiling your own Vim might be the only option, and I imagine that might be difficult on Windows.
-
Alva
I did a little research into command-t last night. I don't think the problem is ruby's fault now. I tested the phrase of crash and read command-t source code The C extension is only used for quick match, am I right? but the matcher works! the result lines can be selected. the highlight line can be moved
I think the problem is on closing the matcher/prompt window, I am not familiar with VIM script nor Ruby so I cann't do more about this. If you have time, you can take some time to test this issue. thanks.
-
Greg Hurrell
So, what actually happens when you try to open the selection? Is anything printed?
It may be related to ticket #1617, "$curbuf.number always returns 0 (zero) instead of actual buffer number on some platforms/Vim versions", so take a look at that one. Does
:ruby puts $curbuf.number
ouput 0 for you? -
Alva
$curbuf.number is not zero for me.
BTW, vim7.3's with ruby 191 is really buggy, not only just with command-t, when you open a ruby file, some errors like prompt, sometimes when vim crashs when you use aotocomplete of ruby. Have you notice that? or just I am using windows platform?
BTW, I compiled vim7.3.3 with Python 2.7 and Ruby 187 on windows, it was not so hard as imagine, vim works well now! And I noticed command-t ruby extension cann't be compiled with MS VS compiler, because MS VS doesn't support c99, and command-t doesn't always declare variable at begining lines of a function.
-
Greg Hurrell
Have you notice that?
No I haven't noticed it as I am not using Ruby 1.9, nor in Vim nor anywhere. (In fact, I only have it installed under RVM so that I can test different versions of my software against it.) I've always been a bit puzzled by people's desire to start using 1.9 everywhere and as soon as possible; for me Vim is a tool for getting jobs done, and Ruby too, so there's no reason why I would ever use anything other than the system Ruby (which for me right now means 1.8.7).
-
Alva
I totally agree with you. But in open source ecosystem, many things (software) are linked together just like food chain.
For me, I am not using Ruby, instead, I use python everywhere ruby may be used, but I like command-t, so I have to install ruby :), I even thought about to learn the spirits of your code and rewrite command-t in Python!. Just because I want to use Python 2.7 and utilize some new features, vim 7.3 involved and then ruby 19, the food chain has been established. After the struggling, I think I will just stay on Ruby 1.8.7 as Long as possible, as my present requirement is just make command-t work, and it works well in Ruby 1.8.7.
-
anonymous
I had the same problems with gvim 7.3 and Ruby 1.9.1 as mentioned above. After investigating this a little bit, I realized it has something to do with the Ruby binding itself. For example, VIM crashed after accessing a global variable in Ruby plugin code.
However, I found a solution in installing "Vim without Cream" from the Cream website, together with Ruby 1.8.7. This combo works like a charm with command-t and other Ruby plugins, like LustyJuggler for example.
-
anonymous
This issue was recently patched in vim - [http://ftp.vim.org/vim/patches/7.3/7.3.088].
I have uploaded a patched gvim binary [https://github.com/downloads/codito/vim-config/gvim.win32.7.3.89.zip|here]. It has vim 7.3 + Ruby 1.9.2. Works great for me on Windows 7 :)
-
anonymous
Above drop of gvim.exe doesn't work. Here's another patched drop which works - http://wyw.dcweb.cn/vim/gvim73.zip
-
anonymous
Created
,
edited
Above drop of gvim.exe doesn't work. Here's another patched drop which works - http://wyw.dcweb.cn/vim/gvim73.zip
It works smoothly on XP with vim version 7.3.138
cheers
-
anonymous
I couldn't download the file from dcweb.cn for some reason. But I grabbed the one from https://github.com/downloads/codito/vim-config/gvim.win32.7.3.89.zip and it worked for me once I put libstdc++-6.dll and libgcc_s_sjlj-1.dll from the RubyDevKit in to the vim73 directory.
You guys should put a link to this issue on the front page. I put up without Command-T on Windows for a whole year :) But the fix is actually pretty simple.
Add a comment
Comments are now closed for this issue.