LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-error-during-binutils-2-22-pass-1-section-5-4-lfs-7-2-a-4175438643/)

erkant 11-25-2012 10:46 AM

LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2)
 
I'm new to LFS, and started building version 7.2, by following the book. Everything worked fine until I reached section 5.2, where it starts installing Binutils-2.22-Pass 1. I'm currently logged in as the user lfs, which has the home directory in /home/lfs as the book suggests. If I run the following command as lfs user I get the following error:

patch -Np1 -i ../binutils-2.22-build_fix-1.patch
patch: **** Can't open patch file ../binutils-2.22-build_fix-1.patch : No such file or directory

The point that confuses me is the part before binutils which is ../
So, why should I use it? What's the point of it? Or should I change it to something?
But if I use the following command instead:

patch -Np1 -i $LFS/sources/binutils-2.22-build_fix-1.patch

Then, I get these lines:

can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org>
|Date: 2012-03-27
|Initial Package Version: 2.22
|Upstream Status: From Upstream
|Origin: http://lists.gnu.org/archive/html/bu.../msg00241.html
|Description: Fixes a build failure when using -O3 compiler flag
|
|diff -Naur binutils-2.22.orig/opcodes/ChangeLog binutils-2.22/opcodes/ChangeLog
|--- binutils-2.22.orig/opcodes/ChangeLog 2011-11-21 09:29:39.000000000 +0000
|+++ binutils-2.22/opcodes/ChangeLog 2012-03-27 19:49:36.299866714 +0000
--------------------------
File to patch:

And it is waiting me to enter a file to patch. If someone can help me, I would be glad.

druuna 11-25-2012 10:57 AM

You should read more carefully :)

This from: 5.3. General Compilation Instructions
Quote:

Important

To re-emphasize the build process:

Place all the sources and patches in a directory that will be accessible from the chroot environment such as /mnt/lfs/sources/. Do not put sources in /mnt/lfs/tools/.

Change to the sources directory.

For each package:

Using the tar program, extract the package to be built. In Chapter 5, ensure you are the lfs user when extracting the package.

Change to the directory created when the package was extracted.

Follow the book's instructions for building the package.

Change back to the sources directory.

Delete the extracted source directory and any <package>-build directories that were created in the build process unless instructed otherwise.

spiky0011 11-25-2012 10:59 AM

Hi

Before you start do make sure your host is compliant.
That said where did you put the patch file it should be in /mnt/lfs/sources.
Unpack binutils tar then cd into binutils-2.22 dir before running commands

erkant 11-25-2012 01:16 PM

Thanks guys, it solved the problem!

Keith Hedger 11-26-2012 01:26 PM

Quote:

Originally Posted by erkant (Post 4836625)
...The point that confuses me is the part before binutils which is ../
So, why should I use it? What's the point of it? Or should I change it to something?...

FYI the "../" means go up one level from the current directory.

If your problem was solved don't forget to mark the thread SOLVED ... It's good manners.


All times are GMT -5. The time now is 08:39 AM.