Does any one know how to build a msys+mintty compatible vim (like vim in GitBash) ?

442 views
Skip to first unread message

skywind3000

unread,
Sep 22, 2016, 3:46:48 PM9/22/16
to vim_dev
Yesterday, I started vim in GitBash (msys+mintty) by chance on windows.
and found that vim worked very well in mintty, and mintty is far more better than cmd.exe.

Trying to build vim from msys, and only find a cmd.exe compatible version which can not run properly under mintty.

Does any body know how can GitBash/msys developers build it ?
what building parameters did they use ?


Ken Takata

unread,
Sep 22, 2016, 7:29:42 PM9/22/16
to vim_dev
Hi,

Git for Windows (a.k.a. GitBash) uses msys2 and msys2 is a fork of Cygwin.
So, basically you can build Vim as the same way with Cygwin. However GitBash
doesn't have GCC by default. You need to install "Git for Windows SDK" to build
a program for GitBash.

Regards,
Ken Takata

skywind3000

unread,
Sep 23, 2016, 12:00:40 AM9/23/16
to vim_dev

Thanks, is there any instructions to build on msys2 ?
this one (https://gist.github.com/rpuntaie/8510218) seems out of date

I tried to build from msys2, and get an error when I try to execute it .

Linwei@weilin0 MINGW32 ~/software/vim/src
$ ./vim
Vim: Error: This version of Vim does not run in a Cygwin terminal

Ken Takata

unread,
Sep 23, 2016, 1:12:21 AM9/23/16
to vim_dev
Hi,

The instruction cannot be applied to your case.
You built Win32 (native) vim.exe using MSYS2/MinGW, but actually you need is
MSYS2 version of vim.exe which is linked with msys-2.0.dll. They are totally
different things.

If you use the official version of MSYS2, you should open "MSYS2 Shell" shortcut,
then install necessary packages using pacman. (gcc, make, ncurses-devel,
gettext-devel, libiconv-devel, etc.)
If you use GitBash, you should install "Git for Windows SDK". (I haven't tried
this though.)
Then you should build Vim as normal Unix (or Cygwin).
E.g.:
cd src
./configure; make

Regards,
Ken Takata

skywind3000

unread,
Sep 23, 2016, 3:12:34 AM9/23/16
to vim_dev
Thanks to figure out the difference between mingw-w64 and msys2
Following your tutorials, I got these:

checking for tgetent in -ltinfo... (cached) no
checking for tgetent in -lncurses... (cached) yes
ncurses library is not usable
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.

-----
I have install both ncurses-devel and ncurses.
What's wrong with that ?

Ken Takata

unread,
Sep 23, 2016, 5:58:03 AM9/23/16
to vim_dev
Hi,
Not sure. How about installing pkg-config?
You can find the detail log in src/auto/config.log.

Regards,
Ken Takata

skywind3000

unread,
Oct 9, 2016, 10:08:06 AM10/9/16
to vim_dev
Ken Takata wrote:
> Not sure. How about installing pkg-config?
> You can find the detail log in src/auto/config.log.

I can manage to build vim in the msys2 now by clone a refresh vim repository.

Reply all
Reply to author
Forward
0 new messages