Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.