LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-28-2006, 09:42 AM   #1
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Rep: Reputation: 15
patch question


lo there
I'm on the second package, gcc, in the LFS book (6.2). I've figured out that the book doesn't explain how to unpack the source files and that I should cd into them (wierd..), and now I'm wondering, beacouse there is a patch for gcc and the book haven't mentioned anything about when, if and how I should apply it. What's the proper procedure. WHAT SHOULD I DO?

Im not a guru, why does the book assume that I can think out these steps by myself? Im practically retarded. Is the writers too lazy to type these steps, or is it some sort of noob-filter?
 
Old 10-28-2006, 09:46 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Unpack/untar package and enter newly created directory.

Here you execute the patch command and/or create the build directory.

I.e:

cd $LFS/sources - this is where all the archives can be found.
tar jxf <some.package>.tar.bz2 - unzip/unpack package.
cd <some.package> - cd to package directory

The book assumes that you have done the above already.

Patching is done here.
patch -Np1 -i ../<some-package>.patch

For most of the chapters all is done from here, but for some (binutils being one of those) it is needed to create a building dir (the source directory they talk about is the directory you are in at the moment). You do that as follows:

mkdir ../<some.package>-build - create build directory for package.
cd ../<some.package>-build - goto build directory.

Hope this helps.

Last edited by druuna; 10-28-2006 at 09:49 AM.
 
Old 10-28-2006, 09:57 AM   #3
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Yes it did. Thank you for the quick reply. Should I use the same gear patch -Np1 -i for all the pathces?
 
Old 10-28-2006, 10:03 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Should I use the same gear patch -Np1 -i for all the pathces?
The above is an example, but basically correct. Always use the commands given in the book especially if they differ from the above example. Just make sure you are executing the commands from the correct directory
 
Old 10-28-2006, 10:12 AM   #5
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Yes sir!
I've still got a question left. When im running the config file from a build folder it says I just run it like this for example ../gcc.4/configure

But it's wrong, It should be ../sources/gcc.4/configure beacouse I have untarred the source in the sources folder. Should I untarr and mv the gcc.4 folder outside of the sources folder? I hope you understand the issue Im having.

Last edited by inverted.gravity; 10-28-2006 at 10:19 AM.
 
Old 10-28-2006, 10:24 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm not following you.

If you are in the sources directory ($LFS/sources) where all the packages and patches are located and untar one of those packages, a new directory is created ($LFS/sources/gcc.... for example). You need to enter this directory (as stated in post #2). Then you create the build dir (if needed) and enter it.
 
Old 10-28-2006, 10:32 AM   #7
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Yes, the folder is in $LFS/sources/gcc/

But when I run the configure, make and make install, Im in $LFS/gcc-build/

The book says when im in $LFS/gcc-build/ I will run ../gcc/configure. The thing is that there is no folder $LFS/gcc/. The folder is situated in $LFS/sources/gcc/configure
 
Old 10-28-2006, 10:39 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Then you misunderstand the book:

After unpacking gcc and entering $LFS/sources/gcc (assumed) the book states:

mkdir -v ../gcc-build
cd ../gcc-build

You will end up in $LFS/sources/gcc-build _not_ in $LFS/gcc-build........
 
Old 10-28-2006, 10:41 AM   #9
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Aha now I understand. Thanks alot!
 
  


Reply


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
patch question eagle683 Linux - Newbie 2 06-15-2005 02:16 PM
Yet another Orinoco patch question wheelboy Linux - Wireless Networking 2 05-10-2005 10:16 PM
patch kernel question zuessh Linux - General 16 12-20-2003 08:42 PM
OpenSSH, patch question sopiaz57 Linux - Security 1 11-05-2003 09:26 PM
Mandrake patch question Tuzinor Linux - Newbie 0 10-07-2002 01:25 PM

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

All times are GMT -5. The time now is 02:49 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