Cygwin Vim stopped working

205 views
Skip to first unread message

A. S. Budden

unread,
Jun 2, 2009, 8:41:23 AM6/2/09
to Vim ML
Dear all,

I suspect this is more of a cygwin issue than a vim one, but I use a
custom-compiled vim from the CVS version and it seems to have stopped
working in a slightly odd way. I suspect the change that is relevant
is an upgrade of cygwin (I ran setup.exe as I needed to install one
extra application, but it updated everything at the same time).

My configure command is:

./configure --prefix=/usr/local --with-features=huge --enable-cscope
--enable-perlinterp --enable-pythoninterp --enable-tclinterp
--enable-rubyinterp --compiled-by="A. S. Budden" --with-x
--enable-gui

After it appeared to stop working, I assumed it was a problem with
changed libraries, so I re-checked-out the CVS source, reconfigured,
recompiled and reinstalled, but it made no difference. Running
/usr/local/bin/vim does nothing at all, regardless of options:

$ /usr/local/bin/vim --help
$ echo $?
123
$ /usr/local/bin/vim -u NONE -U NONE
$ echo $?
123
$ /usr/bin/vim
# Vim starts correctly (this is the cygwin-provided vim)

Opening a command window (cmd.exe) and entering the following works
fine, so there's presumably nothing wrong with the executable itself:

cd \cygwin\usr\local\bin
.\vim.exe

Can anyone offer any suggestion as to why it's stopped working from
within my xterm? I've also tried it in an rxvt-native window and an
rxvt-x window, but the result is the same.

Many thanks in advance for your help.

Al

vim --version output from /usr/local/bin/vim and /usr/bin/vim:

cd \cygwin\usr\local\bin
.\vim.exe --version

C:\cygwin\usr\local\bin>.\vim --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jun 2 2009 13:27:20)
Included patches: 1-191
Huge 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
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
+multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl +postscript
+printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -DPERL_USE_SAFE_PU
TENV -U__STRICT_ANSI__ -I/usr/local/include -I/usr/lib/perl5/5.10/i686-cygwin/
CORE -I/usr/include/python2.5 -pthread -I/usr/include -I/usr/lib/ruby/1.8/i386
-cygwin
Linking: gcc -L. -L/usr/local/lib -o vim.exe -lncurses -liconv
-Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--ena
ble-auto-image-base -L/usr/local/lib -L/usr/lib/perl5/5.10/i686-cygwin/CORE -lp
erl -L/usr/lib/python2.5/config -lpython2.5 -L/usr/lib -ltcl -lm -lruby

$ /usr/bin/vim --version

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Oct 9 2008 15:23:22)
Compiled by corinna@cathi
Huge 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
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu +mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
+multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript
+printer +profile -python +quickfix +reltime +rightleft -ruby +scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2
Linking:
gcc -L/usr/local/lib -o vim.exe -lm -lncurses -liconv -lintl

A. S. Budden

unread,
Jun 2, 2009, 9:06:57 AM6/2/09
to Vim ML
To add a bit more detail to my previous email, I noticed that the X
libraries weren't in the list, despite my --with-x option. Therefore,
to make sure that this wasn't causing the problem, I went back into
setup.exe and added some of the missing development libraries and
recompiled. It didn't fix the problem, but the resulting version
information is here (again from cmd.exe rather than bash):

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jun 2 2009 13:59:10)
Included patches: 1-191
Compiled by A. S. Budden
Huge version with GTK GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +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 +fork() -gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap

+menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm


-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte

+multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript


+printer +profile +python +quickfix +reltime +rightleft +ruby +scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title

+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset +xim
+xsmp_interact +xterm_clipboard -xterm_save


system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"

system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/g
tk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g -O2 -DPERL_USE_SA
FE_PUTENV -U__STRICT_ANSI__ -I/usr/local/include -I/usr/lib/perl5/5.10/i686-cy
gwin/CORE -I/usr/include/python2.5 -pthread -I/usr/include -I/usr/lib/ruby/1.8
/i386-cygwin
Linking: gcc -L. -L/usr/local/lib -o vim.exe -L/usr/lib -lgtk -lgdk -l
gmodule -lglib -lintl -lXext -lXext -lXt -lX11 -lSM -lICE -lncurses -liconv

Matt Wozniski

unread,
Jun 2, 2009, 1:40:22 PM6/2/09
to vim...@googlegroups.com
On Tue, Jun 2, 2009 at 8:41 AM, A. S. Budden wrote:
>
> Dear all,
>
> I suspect this is more of a cygwin issue than a vim one, but I use a
> custom-compiled vim from the CVS version and it seems to have stopped
> working in a slightly odd way.  I suspect the change that is relevant
> is an upgrade of cygwin (I ran setup.exe as I needed to install one
> extra application, but it updated everything at the same time).
>
> My configure command is:
>
> ./configure --prefix=/usr/local --with-features=huge --enable-cscope
> --enable-perlinterp --enable-pythoninterp --enable-tclinterp
> --enable-rubyinterp --compiled-by="A. S. Budden" --with-x
> --enable-gui
>
> After it appeared to stop working, I assumed it was a problem with
> changed libraries, so I re-checked-out the CVS source, reconfigured,
> recompiled and reinstalled, but it made no difference.  Running
> /usr/local/bin/vim does nothing at all, regardless of options:
>
> $ /usr/local/bin/vim --help
> $ echo $?
> 123
> $ /usr/local/bin/vim -u NONE -U NONE
> $ echo $?
> 123
> $ /usr/bin/vim
> # Vim starts correctly (this is the cygwin-provided vim)

Is 123 the error code that goes with a missing DLL? What does
"cygcheck /usr/local/bin/vim" show you in bash? Any missing DLLs?

> Opening a command window (cmd.exe) and entering the following works
> fine, so there's presumably nothing wrong with the executable itself:
>
> cd \cygwin\usr\local\bin
> .\vim.exe
>
> Can anyone offer any suggestion as to why it's stopped working from
> within my xterm?  I've also tried it in an rxvt-native window and an
> rxvt-x window, but the result is the same.

Could just be a PATH difference between cmd.exe and bash, so that one
can find a needed DLL and the other can't.

~Matt

A. S. Budden

unread,
Jun 3, 2009, 3:22:53 AM6/3/09
to vim...@googlegroups.com
Hi Matt,

Thanks for the help,

2009/6/2 Matt Wozniski <m...@drexel.edu>:

Output as follows; all listed files are present on the file system as
far as I can tell.

C:\cygwin\usr/local/bin/vim.exe
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\cygwin\bin\cygICE-6.dll
C:\cygwin\usr/local/bin\cygwin1.dll
C:\WINDOWS\system32\ADVAPI32.DLL
C:\WINDOWS\system32\RPCRT4.dll
C:\WINDOWS\system32\Secur32.dll
C:\cygwin\bin\cygSM-6.dll
C:\cygwin\bin\cygX11-6.dll
C:\cygwin\bin\cygxcb-xlib-0.dll
C:\cygwin\bin\cygxcb-1.dll
C:\cygwin\bin\cygXau-6.dll
C:\cygwin\bin\cygXdmcp-6.dll
C:\cygwin\bin\cygXt-6.dll
C:\cygwin\bin\cyggdk-1-2-0.dll
C:\cygwin\bin\cygXext-6.dll
C:\cygwin\bin\cygglib-1-2-0.dll
C:\cygwin\bin\cyggtk-1-2-0.dll
C:\cygwin\bin\cyggmodule-1-2-0.dll
C:\cygwin\bin\cygintl-8.dll
C:\cygwin\bin\cygiconv-2.dll
C:\cygwin\bin\cygncurses-9.dll
C:\cygwin\bin\cygruby18.dll
C:\cygwin\bin\cygcrypt-0.dll
C:\WINDOWS\system32\USER32.dll
C:\WINDOWS\system32\GDI32.dll
C:\cygwin\bin\tcl84.dll
C:\cygwin\bin\cygperl5_10.dll
C:\cygwin\bin\libpython2.5.dll

>> Opening a command window (cmd.exe) and entering the following works
>> fine, so there's presumably nothing wrong with the executable itself:
>>
>> cd \cygwin\usr\local\bin
>> .\vim.exe
>>
>> Can anyone offer any suggestion as to why it's stopped working from
>> within my xterm?  I've also tried it in an rxvt-native window and an
>> rxvt-x window, but the result is the same.
>
> Could just be a PATH difference between cmd.exe and bash, so that one
> can find a needed DLL and the other can't.

I've compared %path% and $PATH, but the only differences are a few
extra directories in the bash path. There's nothing in %path% that
isn't in $PATH.

Thanks anyway.

Al

Matt Wozniski

unread,
Jun 15, 2009, 1:51:22 PM6/15/09
to vim...@googlegroups.com
On Tue, Jun 2, 2009 at 8:41 AM, A. S. Budden wrote:
>

Did you ever manage to resolve this problem? I set this message aside
and I'm just getting back to responding to it. If you're still having
a problem, perhaps try strace? The cygwin strace is new, and very
useful for pinning down things like this - it tends to be able to
translate them directly to error codes and messages from the windows
API.

~Matt

A. S. Budden

unread,
Jun 16, 2009, 3:14:21 AM6/16/09
to vim...@googlegroups.com
2009/6/15 Matt Wozniski <m...@drexel.edu>:
[snip]

> Did you ever manage to resolve this problem?  I set this message aside
> and I'm just getting back to responding to it.  If you're still having
> a problem, perhaps try strace?  The cygwin strace is new, and very
> useful for pinning down things like this - it tends to be able to
> translate them directly to error codes and messages from the windows
> API.

Unfortunately, I've still not resolved this problem. Thanks for
suggesting strace. I'm not really sure what I'm doing with it, but I
tried running "strace /usr/local/bin/vim" and it popped up an
(Windows) error window saying "The application failed to initialize
properly (0xc000007b). Click on OK to terminate the application."
The strace output was:

--- Process 3712, exception C000007B at 7C964ED1

If I run simply "/usr/local/bin/vim", there is no output (or windows
error window). Similarly if I run simply 'vim', the same result
occurs. "which vim" reports "/usr/local/bin/vim", "alias vim"
reports:

alias vim='vim --cmd '\''set background=dark'\'''

All of which would imply that running "vim" would run
/usr/local/bin/vim (as also implied by running "vim"). However, if I
run "strace vim", vim seems to run (albeit covered by lots of strace
output). I guess this might be because strace is in /usr/bin/vim and
it is running the version of vim in it's own directory rather than the
one in /usr/bin.

Am I missing any obvious command line switches for strace to get a bit
more useful information than the exception code above?

Thanks for the continued help.

Al

Reply all
Reply to author
Forward
0 new messages