我试图从Ubuntu18.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
$ makemake导致此错误:
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我正在运行Ubuntu18.04,并使用预装的gcc和make版本。
发布于 2019-03-13 06:07:01
这是一个众所周知的问题:
通常,这不是一个问题,因为默认构建(没有--disable-shared)同时构建了库的静态版本和动态链接版本,而make install DESTDIR=…同时安装了这两个版本。
https://stackoverflow.com/questions/55132287
复制相似问题