无法构建 glibc

Unable to build glibc

我正在尝试从 Ubuntu 18.04 上的源代码构建 glibc 2.27 作为静态库。这是我正在使用的命令(在为 glibc 创建一个单独的构建目录之后):

$ git clone git://sourceware.org/git/glibc.git && cd glibc
$ git checkout release/2.27/master
$ cd ..
$ mkdir glibc-build && cd glibc-build
$ ../glibc/configure --enable-kernel=4.4 --disable-shared --enable-static --enable-static-nss --prefix=/usr
$ make

make 导致此错误:

cc1: fatal error: /home/parallels/glibc-build/libc-modules.h: No such file or directory
compilation terminated.
../Makerules:281: recipe for target '/home/parallels/glibc-build/ucontext_i.h' failed
make[2]: *** [/home/parallels/glibc-build/ucontext_i.h] Error 1
make[2]: Leaving directory '/home/parallels/glibc/csu'
Makefile:215: recipe for target 'csu/subdir_lib' failed
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory '/home/parallels/glibc'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

Full log for make

我是 运行 Ubuntu 18.04,我正在使用 gccmake.

的预装版本

这是一个已知问题:

一般来说,这不是问题,因为默认构建(没有 --disable-shared)构建库的静态和动态链接版本,make install DESTDIR=… 两者都安装。