为 CLFS 3.0.0 SYSTEMD 构建 TIC 失败 (ncurses5.9)

Building TIC fails (ncurses5.9) for CLFS 3.0.0 SYSTEMD

最近我决定重试构建 CLFS 机器 http://www.clfs.org 并且在 3.0.0 SYSTEMD 的第 5.5 步。我们被告知 运行 make -C include 然后 make -C progs tic。我在最后一个命令中失败了。我是否遗漏了任何包裹,或者我做错了什么?

我在 VMWare 中使用 ArchLinux 作为我的 CLFS 主机,它 运行 正在 Windows 10.

这是我正在寻找命令的页面:http://clfs.org/files/BOOK/3.0.0/SYSTEMD/view/x86_64/cross-tools/ncurses.html

这是我 运行 最后一个命令时控制台的输出:

    In file included from ../ncurses/curses.priv.h:283:0,
    from ../ncurses/lib_gen.c:19:_33528.c:835:15: error: expected ')' before 'int'
    ../include/curses.h:1594:56: note: in definition of macro 'mouse_trafo'
    #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
                                                           ^

错误消息指向 y 符号,

  • 这可能在您系统的某些头文件中被(错误)定义了。
  • 除了杂乱的#define 之外,该行唯一有趣的地方是 wmouse_trafo 的原型使用 bool,配置脚本应该有(给定用于 CLFS 的编译器版本)等同于 c99 _Bool(这应该不是问题)。

你可以看到编译器看到了什么

make -C ncurses lib_gen.i

并在 ncurses/lib_gen.i 中寻找 wmouse_trafo

例如,我看到它提到了两次:

extern _Bool wmouse_trafo (const WINDOW*, int*, int*, _Bool);
extern _Bool mouse_trafo (int*, int*, _Bool);

 _Bool (mouse_trafo) (int * a1, int * a2, _Bool z)
{
 ; return wmouse_trafo(stdscr,a1,a2,z);
}

杂散的分号不是问题,但如果交叉编译器有问题,可能会使 _Bool 丢失。

CLFS 3.0 的指令使用gcc 4.8.3 (versions of all of the parts do matter). However, the error message cited here looks like a recent report due to gcc 5 — which is addressed in ncurses 6.0