Sto*_*aft 2 glibc configure gnu-make
我正在尝试在 Clear Linux 上构建 glibc 2.27,在此处获得:https : //www.gnu.org/software/libc/sources.html
根据帮助,我应该使用 prefix 命令构建到源文件夹之外的目录中。据我所知,我正在执行安装帮助中描述的操作:
配置和编译 GNU C 库
无法在源目录中编译 GNU C 库。您必须在单独的构建目录中构建它。例如,如果您在“/src/gnu/glibc-VERSION”中解压了 GNU C 库源代码,则创建一个目录“/src/gnu/glibc-build”来放置目标文件。这允许删除整个构建目录以防发生错误,这是重新开始的最安全方法,应该始终完成。
从您的对象目录中,运行位于源代码树顶层的 shell 脚本“configure”。在上面的场景中,你会输入
Run Code Online (Sandbox Code Playgroud)$ ../glibc-VERSION/configure ARGS...请注意,即使您在单独的构建目录中构建,编译也可能需要在源目录中创建或修改文件和目录。
'configure' 有很多选项,但唯一一个通常是强制性的是 '--prefix'。这个选项告诉'configure'你想安装GNU C 库的位置。这默认为“/usr/local”,但作为标准系统库安装的正常设置是 '--prefix=/usr' 对于 GNU/Linux 系统和 '--prefix='(空前缀)对于 GNU/赫德系统。
所以,我认为我这样做是正确的,但它仍然给我一个关于在不同目录中构建的错误:
james@clr ~/Downloads/glibc $ ./configure --prefix=/home/james/Downloads/glibc-build/
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for readelf... readelf
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... yes
configure: error: you must configure in a separate build directory
Run Code Online (Sandbox Code Playgroud)
您必须创建一个构建目录并configure从中运行脚本。你的情况:
mkdir /home/james/Downloads/glibc-build/
cd /home/james/Downloads/glibc-build/
~/Downloads/glibc/configure
Run Code Online (Sandbox Code Playgroud)
该--prefix选项将更改安装目录 ( make install)。
| 归档时间: |
|
| 查看次数: |
6107 次 |
| 最近记录: |