LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-28-2012, 02:51 PM   #1
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123
Blog Entries: 12

Rep: Reputation: 5
LFS 5.4 error: patch: **** Can't open patch file ..


I typed:
Code:
patch -Np1 -i ../binutils-2.22-build_fix-1.patch
and got error message
Code:
patch: **** Can't open patch file ../binutils-2.22-build_fix-1.patch : No such file or directory
here is the full picture:
Code:
lfs@host:/mnt/lfs/sources$ ls
Checkmd5sums.sh			    lfs-bootscripts-20120901.tar.bz2
autoconf-2.69.tar.xz		    libpipeline-1.2.1.tar.gz
automake-1.12.3.tar.xz		    libtool-2.4.2.tar.gz
bash-4.2-fixes-8.patch		    linux-3.5.2.tar.xz
bash-4.2.tar.gz			    m4-1.4.16.tar.bz2
binutils-2.22-build_fix-1.patch     make-3.82-upstream_fixes-2.patch
binutils-2.22.tar.bz2		    make-3.82.tar.bz2
bison-2.6.2.tar.xz		    man-db-2.6.2.tar.xz
bzip2-1.0.6-install_docs-1.patch    man-pages-3.42.tar.xz
bzip2-1.0.6.tar.gz		    md5sums
check-0.9.8.tar.gz		    mpc-1.0.tar.gz
coreutils-8.19-i18n-1.patch	    mpfr-3.1.1.tar.xz
coreutils-8.19.tar.xz		    ncurses-5.9.tar.gz
dejagnu-1.5.tar.gz		    patch-2.6.1-test_fix-1.patch
diffutils-3.2.tar.gz		    patch-2.6.1.tar.bz2
e2fsprogs-1.42.5.tar.gz		    perl-5.16.1-libc-2.patch
expect5.45.tar.gz		    perl-5.16.1.tar.bz2
file-5.11.tar.gz		    pkg-config-0.27.tar.gz
findutils-4.4.2.tar.gz		    procps-3.2.8-fix_HZ_errors-1.patch
flex-2.5.37-bison-2.6.1-1.patch     procps-3.2.8-watch_unicode-1.patch
flex-2.5.37.tar.bz2		    procps-3.2.8.tar.gz
gawk-4.0.1.tar.xz		    psmisc-22.19.tar.gz
gcc-4.7.1.tar.bz2		    readline-6.2-fixes-1.patch
gdbm-1.10.tar.gz		    readline-6.2.tar.gz
gettext-0.18.1.1.tar.gz		    sed-4.2.1-testsuite_fixes-1.patch
glibc-2.16.0-res_query_fix-1.patch  sed-4.2.1.tar.bz2
glibc-2.16.0.tar.xz		    shadow-4.1.5.1.tar.bz2
gmp-5.0.5.tar.xz		    sysklogd-1.5.tar.gz
grep-2.14.tar.xz		    systemd-188.tar.xz
groff-1.21.tar.gz		    sysvinit-2.88dsf.tar.bz2
grub-2.00.tar.xz		    tar-1.26.tar.bz2
gzip-1.5.tar.xz			    tcl8.5.12-src.tar.gz
iana-etc-2.30.tar.bz2		    texinfo-4.13a.tar.gz
inetutils-1.9.1.tar.gz		    tzdata2012e.tar.gz
iproute2-3.5.1.tar.xz		    udev-lfs-188-3.tar.bz2
kbd-1.15.3-backspace-1.patch	    util-linux-2.21.2.tar.xz
kbd-1.15.3-upstream_fixes-1.patch   vim-7.3.tar.bz2
kbd-1.15.3.tar.gz		    wget-list
kmod-9-testsuite-1.patch	    xz-5.0.4.tar.xz
kmod-9.tar.xz			    zlib-1.2.7.tar.bz2
less-444.tar.gz
lfs@host:/mnt/lfs/sources$ 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
lfs@host:/mnt/lfs/sources$
sorry if this should be obvious, but,
Why am I getting the error message?
and
How do I fix it?
Thanks.
 
Old 12-28-2012, 02:55 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

When you untared binutils did you cd into binutils dir
You should be standing in $LFS/sources/binutils-2.22 then run commands

The ../means back 1 level so it would read from the sources dir and patch in binutils-2.22 dir

chapter 5.3 last "important note"

Last edited by spiky0011; 12-28-2012 at 11:36 PM.
 
Old 12-28-2012, 03:12 PM   #3
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123

Original Poster
Blog Entries: 12

Rep: Reputation: 5
ok, since I'm in the sources directory, I modified to:
Code:
lfs@host:/mnt/lfs/sources$ patch -Np1 -i binutils-2.22-build_fix-1.patch
and get
Code:
patching file opcodes/ChangeLog
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file opcodes/ChangeLog.rej
patching file opcodes/i386-dis.c
Hunk #1 FAILED at 11331.
1 out of 1 hunk FAILED -- saving rejects to file opcodes/i386-dis.c.rej
lfs@host:/mnt/lfs/sources$
I
 
Old 12-28-2012, 03:16 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
WHY???

Why change the book

Quote:
lfs@host:/mnt/lfs/sources$ patch -Np1 -i binutils-2.22-build_fix-1.patch
Code:
lfs@host:/mnt/lfs/sources$ patch -Np1 -i ../binutils-2.22-build_fix-1.patch

Last edited by spiky0011; 12-28-2012 at 11:39 PM.
 
Old 12-28-2012, 03:23 PM   #5
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123

Original Poster
Blog Entries: 12

Rep: Reputation: 5
the book: Change to the sources directory.

and I'm in the sources directory

How did I change the book?
 
Old 12-28-2012, 03:28 PM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Did you read chapter 5.3 important part
b
Quote:
Change to the directory created when the package was extracted.
c
Quote:
Follow the book's instructions for building the package
 
Old 12-28-2012, 03:33 PM   #7
DavidLee1A
Member
 
Registered: Dec 2012
Distribution: Debian Wheezy amd64
Posts: 123

Original Poster
Blog Entries: 12

Rep: Reputation: 5
I will go back and reread and check stuff ... so I'm sure I'm doing this right and then I'll post back. If this is sensitive to my location then I want to see if I can figure out WHY it's going to be influenced by that.
Thank you for quickly responding ... it will be a few hours before I post back here.
 
  


Reply



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
patch in .sh file -> error Chipper Linux - General 4 03-01-2011 06:20 AM
got the error while patching the file using patch command amit_pansuria Linux - General 1 03-08-2010 10:25 AM
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 03:45 PM
lfs-6.1 Patch-2.5.4 //ERROR or No ERROR?? ukyo Linux From Scratch 1 08-25-2005 07:34 AM
Patch 2.5.4 for LFS 5.0 error at make. vexer Linux From Scratch 1 11-20-2003 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration