LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 11-25-2012, 10:46 AM   #1
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
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.
 
Old 11-25-2012, 10:57 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
Old 11-25-2012, 10:59 AM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,667
Blog Entries: 1

Rep: Reputation: 243Reputation: 243Reputation: 243
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
 
Old 11-25-2012, 01:16 PM   #4
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Thanks guys, it solved the problem!
 
Old 11-26-2012, 01:26 PM   #5
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 874

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by erkant View Post
...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.

Last edited by Keith Hedger; 11-26-2012 at 01:27 PM.
 
  


Reply

Tags
binutils, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] lfs 6.7 book ch 5.4 binutils 2.20.1 pass 1 error:error: ppl_c.h: No such file or directory frank zhu Linux From Scratch 6 03-04-2011 11:23 AM
LFS 6.5 -- Binutils-2.19.1 - Pass 2 gives error: cannot run C compiled programs kamleshk1 Linux From Scratch 7 11-16-2010 08:57 AM
[SOLVED] LFS 6.6 Binutils install error Pass 1 on Ubuntu Jaunty Krol_:) Linux From Scratch 3 06-03-2010 10:53 AM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS binutils-build error : Pass 1 ramlnx Linux From Scratch 1 07-12-2006 07:06 AM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration