【发布时间】:2016-01-21 05:03:46
【问题描述】:
我尝试在 IBM AIX 6.1 中构建 Vim 7.4。当我运行配置脚本./configure 时出现以下错误
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... no
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.
检查config.info我能够看到以下错误
| int
| main ()
| {
| char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
| ;
| return 0;
| }
configure:10492: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.
但是 curses 库 (libcurses.a) 存在于 /usr/lib 目录中。然后我尝试了以下命令./configure --with-tlib=curses,这次得到了一个不同的错误,如下所示
checking --with-tlib argument... curses
checking for linking with curses library... configure: error: FAILED
config.info 错误信息是
| #include <sys/types.h>
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #endif
| #include <signal.h>
| #include "confdefs.h"
|
| int
| main ()
| {
| stack_t sigstk; sigstk.ss_base = 0;
| ;
| return 0;
| }
configure:10339: result: no
configure:10345: checking --with-tlib argument
configure:10354: result: curses
configure:10357: checking for linking with curses library
configure:10370: gcc -o conftest -g -O2 conftest.c -lcurses >&5
collect2: /lib/libcurses.a: not a COFF file
configure:10370: $? = 1
configure: failed program was:
| /* confdefs.h */
我做错了什么,我该如何构建?
【问题讨论】:
-
这个查询更好的地方是groups.google.com/forum/#!forum/vim_dev
-
tgetent 确实存在于 /usr/lib/libcurses.a ...您应该检查文件
config.log以查看实际的错误消息和失败的测试程序 -
注意:如果
configure尊敬选项--with-x=no或--without-x会很酷 -
OP 可以检查
config.log并查看实际错误(问题中仅显示摘要)。 -
关于
--without-x:使用sed破解文件src/auto/configure:sed_repl 's/$with_x/no/g' src/auto/configure