【问题标题】:Unable to build glibc无法构建 glibc
【发布时间】:2019-08-03 13:31:12
【问题描述】:

我正在尝试从 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

【问题讨论】:

    标签: gcc compiler-errors compilation gnu-make glibc


    【解决方案1】:

    这是一个已知问题:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-08
      • 1970-01-01
      • 2019-08-26
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      • 2019-11-16
      • 2019-08-22
      相关资源
      最近更新 更多