LFS 问题 - 应用第 5.7.1 节中的补丁

LFS 问题 - 应用第 5.7.1 节中的补丁

如果这个问题之前已经问过,并且很明显,请提前道歉。我现在严格按照指南开始操作。有问题的页面是这样的:

http://linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html

此点指定运行此项:

patch -Np1 -i ../glibc-2.22-upstream_i386_fix-1.patch

然而,这样做似乎会返回这样的结果:

can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By:            Bruce Dubbs <bdubbs at linuxfromscratch dot org>
|Date:                    2015-08-23
|Initial Package Version: 2.22
|Upstream Status:         In repository
|Origin:                  https://github.molgen.mpg.de/git-mirror/glibc
|Description:             This patch fixes a build problem on 32-bit systems.
|
|commit a08e80d1143f6b0386d5bc8cc7b8ed576091dbf3
|Author: Andrew Senkevich <[email protected]>
|Date:   Wed Aug 19 16:54:28 2015 +0300
|
|        [BZ #18796]
|        * scripts/test-installation.pl: Don't add -lmvec to build options if
|        libmvec wasn't built.
|
|diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
|index cac1562..79b2b3e 100755
|--- a/scripts/test-installation.pl
|+++ b/scripts/test-installation.pl
--------------------------
File to patch: 

因此,对于之前已经遵循指南的人来说,补丁相对于要修补的文件到底应该放在哪里?它具体修补的是哪个文件?运行此命令时我应该在哪个目录中?

作为参考,我按照指南中的要求创建了目录 /mnt/lfs /mnt/lfs/sources /mnt/lfs/tools。

源文件和补丁看起来应该放在 lfs/sources 中,并将文件提取到 lfs/tools 中。因此,目前补丁位于 /mnt/lfs/sources 中,而 glibc-2.22 的提取文件位于 /mnt/lfs/tools 中

lfs@linux-NVIDIA-nForce-590-SLI /mnt/lfs $ ls -lah /mnt/lfs/sources/glibc-2.22-upstream_i368_fix-1.patch 
-rw-r--r-- 1 linux linux 1.9K Sep 30 20:23 /mnt/lfs/sources/glibc-2.22-upstream_i368_fix-1.patch

lfs@linux-NVIDIA-nForce-590-SLI /mnt/lfs $ ls -lah /mnt/lfs/tools/glibc-2.22 -ddrwxr-xr-x 68 lfs lfs 4.0K Aug  5 01:42 /mnt/lfs/tools/glibc-2.22

如果我遗漏了什么,请告诉我,我只是在绞尽脑汁试图理解这个补丁点。

答案1

http://linuxfromscratch.org/lfs/view/stable/chapter05/generalinstructions.html

放置所有来源和补丁在可以从 chroot 环境访问的目录中,例如 /mnt/lfs/sources/。请执行不是将源放入 /mnt/lfs/tools/。

在 Google 呆了 3 个小时,面团......

相关内容