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

그러나 그렇게 하면 다음이 반환되는 것 같습니다.

lfs@linux-NVIDIA-nForce-590-SLI /mnt/lfs/tools $ 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/sources 디렉토리에 있을 것으로 예상됩니다. 구체적으로 어떤 파일을 패치합니까? 이 명령을 실행할 때 어느 디렉터리에 있어야 합니까?

참고로 가이드에서 요청한 대로 /mnt/lfs /mnt/lfs/sources /mnt/lfs/tools 디렉토리를 생성하고 /mnt/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

추출된 glibc-2.22 디렉토리에 있어야 합니다(따라서 ..패치 경로에서는 패치가 상위 디렉토리에 있다고 가정합니다. 귀하의 경우에는 입니다 $LFS). 디렉토리에 추출해서 빌드
해야 하는데 그런 목적은 아닙니다(임시 시스템을 저장하기 위한 것입니다). 정말 주의 깊게 읽어야 해요$LFS/source$LFS/tools

5.3장.

답변2

여기서는 생략된 glibc tarball의 압축을 먼저 풀어야 합니다.

tar -xf glibc-2.22.tar.xz
cd glibc-2.22
patch -Np1 -i ../glibc-2.22-upstream_i386_fix-1.patch

행운을 빌어요:)

관련 정보