LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Patching fails in LFS 6.5 (https://www.linuxquestions.org/questions/linux-from-scratch-13/patching-fails-in-lfs-6-5-a-777467/)

ReyJavikVI 12-22-2009 10:11 AM

Patching fails in LFS 6.5
 
I'm in step 5.26. Applying the patch to Patch (>__>) fails with this message:

Code:

$ patch -Np1 -i ../patch-2.5.9-fixes-1.patch
patching file pch.c
Hunk #1 FAILED at 1.
Hunk #2 succeeded at 355 (offset -11 lines).
Hunk #3 succeeded at 392 (offset -23 lines).
1 out of 3 hunks FAILED -- saving rejects to file pch.c.rej
$ cat pch.c.rej
***************
*** 1,6 ****
  /* reading patches */
 
- /* $Id: pch.c,v 1.44 2003/05/20 14:03:17 eggert Exp $ */
 
  /* Copyright (C) 1986, 1987, 1988 Larry Wall
 
--- 1,6 ----
  /* reading patches */
 
+ /* $Id: pch.c,v 1.45 2003/07/02 22:19:21 eggert Exp $ */
 
  /* Copyright (C) 1986, 1987, 1988 Larry Wall

Everything until now worked fine. Any idea what could be the problem?


BTW, an unrelated question. I recently found out about DIY Linux. Apparently, the difference with LFS is that the former is more advanced so that you will get a more fleshed out Linux, with package management and stuff. Is that so?

druuna 12-23-2009 03:34 AM

Hi,

That should work (just tried it again):
Code:

~/Tmp> tar zxf patch-2.5.9.tar.gz
~/Tmp> cd patch-2.5.9/
~/Tmp/patch-2.5.9> patch -Np1 -i ../patch-2.5.9-fixes-1.patch
patching file pch.c
~/Tmp>

Are you sure that:

1) The patch itself is not corrupt?
2) You used the patch.2.5.9 tarball together with the patch-2.5.9-fixes-1.patch? (version being the important part)

Hope this helps.

PS: I don't have any experience with DIY Linux.

ReyJavikVI 12-23-2009 09:42 AM

Oh, right, thanks. I had downloaded 2.5.4 instead of 2.5.9, since the LFS mirror I was using had that version. I'll download it from the GNU site, should work.

ReyJavikVI 12-23-2009 09:44 AM

Yeah, it worked.


All times are GMT -5. The time now is 01:18 PM.