I am trying to build Vim from the source packages, under Cygwin, to enable Python support. I am following the instructions given here, but I’m hitting this error when I run the configure script:
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -lncurses... no
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.
The Vim source package gets downloaded as /usr/src/vim-7.3.tar.gz, which I extract and then attempt to build using:
./configure --prefix=/usr/local --enable-multibyte --without-x --enable-gui=no --enable-pythoninterp
The prefix option was suggested in this SO post, where the OP is having the exact same problem. However, I installed the ncurses Cygwin package (and also ncursesw), as well as their library equivalents, so I’m not sure what’s going wrong for me (i.e., why the configure script can’t find them). I’ve tried explicitly setting the --with-tlib argument (e.g., --with-tlib=/bin/cygncurses-10.dll, ncurses, libncurses10 and libncurses), but it fails in the same place with something like:
checking for linking with libncurses10 library... configure: error: FAILED
The ncurses packages I have installed are:
- libncursesw10 (5.7-18)
- libncurses10 (5.7-18)
- libncurses9 (5.7-16)
- libncurses8 (5.5-10)
- ncurses (5.7-18)
- ncursesw (5.7-18)
All suggestions welcome!!
I think you’re missing a required package. Lengthy explanation follows; jump to the end for the answer.
I ran the exact same
./configure ...command on my own system (Windows 7, Cygwin). Part of its output was:which indicates that I don’t have the same problem you have.
The
configurescript writes a more verbose log tosrc/auto/config.log. On my system, that shows:The
-lncursesoption tells the linker to look at/usr/lib/libncurses.foo, where .foo can be.a, or.so, or.dll, depending on the system and whether you’re doing dynamic linking. On Cygwin, thecygcheckcommand can tell you which package owns a specified file or files. On my system:I believe that installing
libncurses-devel(via the Cygwinsetup.exe) should fix your problem.