在Cygwin中从Source构建Vim [英] Building Vim from Source in Cygwin
问题描述
我试图在Cygwin下从源代码包构建Vim,以启用Python支持。我按照此处提供的说明操作,但我遇到此错误当我运行 configure
脚本时:
检查--with-tlib argument ... empty:自动终端库选择
在-lncurses中检查tgetent ... no
在-ltermlib中检查tgetent ... no
在-ltermcap中检查tgetent 。no
检查-lcurses中的tgetent ... no
没有找到终端库
检查tgetent()... configure:error:NOT FOUND!
您需要安装终端库;例如ncurses。
或者使用--with-tlib指定库的名称。
Vim源包下载为 /usr/src/vim-7.3 .tar.gz
,我提取然后尝试构建使用:
./ configure - -prefix = / usr / local --enable-multibyte --without-x --enable-gui = no --enable-pythoninterp
在此前缀选项-could-be-used-in-cygwin> SO post ,其中OP具有完全相同的问题。但是,我安装了 ncurses
Cygwin软件包(以及 ncursesw
),不确定我的错误(即,为什么 configure
脚本无法找到它们)。我尝试显式设置 - with-tlib
参数(例如, - with-tlib = / bin / cygncurses-10.dll
, ncurses
, libncurses10
和 libncurses
),但它在同一个地方失败,如:
检查与libncurses10库的链接... configure:error :FAILED
我已安装的 ncurses
是:
- libncursesw10(5.7-18)
- libncurses10 >
- ncurses(5.7-18) libncurses8(5.7-10) li>
- ncursesw(5.7-18)
欢迎所有建议!
我想你缺少一个必需的包。长解释如下;
我对我运行完全相同的 ./ configure ...
命令自己的系统(Windows 7,Cygwin)。它的部分输出是:
检查-lncurses中的tgetent是...
这表示我没有相同的问题。
code> configure 脚本将更详细的日志写入
src / auto / config.log
。在我的系统上,它显示:配置:9777:检查-lncurses中的tgetent
配置:9802:gcc -o conftest.exe -g -O2 -L / usr / local / lib conftest.c -lncurses -lelf>& 5
configure:9802:$? = 0
configure:9812:result:yes
lncurses
选项告诉链接器查看/ usr / lib / libncurses。
foo ,其中< 可以是.a
或.so
或.dll
,取决于系统和是否正在进行动态链接。在Cygwin上,
cygcheck
命令可以告诉你哪个包拥有一个或多个指定的文件。在我的系统上:$ ls /usr/lib/libncurses.*
/usr/lib/libncurses.a /usr/lib/libncurses.dll.a/usr/lib/libncurses.la
$ cygcheck -f /usr/lib/libncurses.*
libncurses-devel-5.7-18
libncurses -devel-5.7-18
libncurses-devel-5.7-18
libncurses-devel
(通过Cygwin设置.exe
)应该可以解决您的问题。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 thencurses
Cygwin package (and alsoncursesw
), as well as their library equivalents, so I'm not sure what's going wrong for me (i.e., why theconfigure
script can't find them). I've tried explicitly setting the--with-tlib
argument (e.g.,--with-tlib=/bin/cygncurses-10.dll
,ncurses
,libncurses10
andlibncurses
), 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:
checking for tgetent in -lncurses... yes
which indicates that I don't have the same problem you have.
The configure
script writes a more verbose log to src/auto/config.log
. On my system, that shows:
configure:9777: checking for tgetent in -lncurses
configure:9802: gcc -o conftest.exe -g -O2 -L/usr/local/lib conftest.c -lncurses -lelf >&5
configure:9802: $? = 0
configure:9812: result: yes
The -lncurses
option 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, the cygcheck
command can tell you which package owns a specified file or files. On my system:
$ ls /usr/lib/libncurses.*
/usr/lib/libncurses.a /usr/lib/libncurses.dll.a /usr/lib/libncurses.la
$ cygcheck -f /usr/lib/libncurses.*
libncurses-devel-5.7-18
libncurses-devel-5.7-18
libncurses-devel-5.7-18
I believe that installing libncurses-devel
(via the Cygwin setup.exe
) should fix your problem.
这篇关于在Cygwin中从Source构建Vim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!