LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-31-2010, 02:55 AM   #16
centguy
Member
 
Registered: Feb 2008
Posts: 618
Blog Entries: 1

Rep: Reputation: 48

yes. I have managed to do quite well, progressing slowly.
I don't know if it helps, but I usually do a "history" command
and capture everything after a successful build in a file in the host
for future reference. This way, you are very sure that you can trace
back everything what you have done.

Another thing, just cut and paste the whole ../source/configure lines
in one go, this way, you are guaranteed not to miss everything.

Also make sure that "make install" is usually not the last step, which
I have painfully learned since I missed out a soft link step "ln -s ..."
step.

With all these precaution, a successful build is still at the mercy of
the host and careful bookkeeping.

I am not done with the whole LFS chapter 6 yet, but so far so good.
 
Old 01-31-2010, 12:47 PM   #17
steviebob
Member
 
Registered: Jan 2010
Location: Arkansas
Distribution: Slackware-Current, LFS
Posts: 136

Original Poster
Rep: Reputation: 16
Thank you both, centguy and crts. I'll keep all of this advice in mind. I'm going to completely restart everything, except I'm keeping the source files, I'm too lazy to redownload it all, it took way too long xD
 
Old 01-31-2010, 12:57 PM   #18
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by steviebob View Post
Thank you both, centguy and crts. I'll keep all of this advice in mind. I'm going to completely restart everything, except I'm keeping the source files, I'm too lazy to redownload it all, it took way too long xD
You don't have to redownload if you have an unmodified backup of your sources. Otherwise it might be problematic.
 
Old 01-31-2010, 09:32 PM   #19
steviebob
Member
 
Registered: Jan 2010
Location: Arkansas
Distribution: Slackware-Current, LFS
Posts: 136

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by crts View Post
You don't have to redownload if you have an unmodified backup of your sources. Otherwise it might be problematic.
Don't worry about that, I made sure to back up the sources directory. even if I didn't, I could have just used the "wget -i" command and downloaded all of the files again. No biggy
 
Old 01-31-2010, 10:50 PM   #20
centguy
Member
 
Registered: Feb 2008
Posts: 618
Blog Entries: 1

Rep: Reputation: 48
That's one area where the book can be improved I think. Right now, they
are suggesting to build stuff under $LFS/sources. But I think it will clutter the $LFS/sources because the created directories will be hiding somewhere with massive $LFS/sources/*.tar.gz. I create $LFS/sources/build-dir/
and copy the necessary *.tar.gz or bzip to $LFS/sources/build-dir.
Then followed the book closely, and the end of the build
I do "cd $LFS/sources/build-dir" and "rm -rf *". Well the last command may be too dangerous for a newbie, but since you are doing LFS, I think you know what you are doing.
 
0 members found this post helpful.
Old 02-01-2010, 05:26 AM   #21
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,

@centguy: Your solution is unnecessary and could even create problems during the build!!

As mentioned in the LFS book, you should delete the source of a package after the build (5.3. General Compilation Instructions, first Info box).

Do _not_ wait until the end to remove all created package (and build) dirs!!!

Gcc and binutils are 2 obvious (??) examples. You nust remove the source dir (and build dir in these cases) after you are done. Or, phrased differently: When you are done with binutils pass one you must remove the source and build dir, when you arrive at binutils pass 2 unpack a fresh copy and do _not_ use the source/build dir from pass 1!!

The above is just an example, you need to do this for all packages (unless stated differently). A side effect is that the $LFS/sources directory will stay 'clean'.

Hope this clears things up.
 
Old 02-02-2010, 12:33 AM   #22
centguy
Member
 
Registered: Feb 2008
Posts: 618
Blog Entries: 1

Rep: Reputation: 48
druuna:

You are right. When I say "build" means building one particular package, such gcc pass-1 or sed or whatever.

I guess my "build" is your "installation".

See, that's why the book can guide the people a little bit by showing
how things can be done in the first two installations of binutils pass-1 in Chapter 5 and especially gcc pass-1 in Chapter 5. I was scratching my head when I saw "mkdir -v ../binutils-build". Okay, that is still guessable, because you only have one package.

Remember I have to create a thread to ask how to deal with mpfr and gmp
in the first pass of gcc pass-1 in chapter 5. I have to untar gcc FIRST before I can make sense of "tar -jxf ../mpfr-2.4.1.tar.bz2" (okay, that is kind of obvious when you have dealt with millions of packages under
LFS, but for first timers, I don't think it is obvious, at least for me.. call me dumb if you want )
Two comments: (1) the book does not explicitly say you can untar under
$LFS/sources and clean the "mess" after that.

As I say, I prefer to "build" things under $LFS/sources/build-dir. After rm -rf * does the job at the end of "my build" or your "installation".
 
0 members found this post helpful.
Old 02-02-2010, 05:44 AM   #23
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
Quote:
Originally Posted by centguy View Post
druuna:

You are right. When I say "build" means building one particular package, such gcc pass-1 or sed or whatever.

I guess my "build" is your "installation".
???

I don't mention "installation" anywhere in my previous reply, just "building".
Technically installing is one part of a build from source (the make install step).

Quote:
See, that's why the book can guide the people a little bit by showing
how things can be done in the first two installations of binutils pass-1 in Chapter 5 and especially gcc pass-1 in Chapter 5. I was scratching my head when I saw "mkdir -v ../binutils-build". Okay, that is still guessable, because you only have one package.
No need to guess anything.

Chapter 5.3 (the second Important box) mentions unpacking the package and entering the created directory. This is a given for all (build) chapters. First unpack and enter the created directory and then start with the first steps in the specific chapter.

Quote:
Remember I have to create a thread to ask how to deal with mpfr and gmp
in the first pass of gcc pass-1 in chapter 5. I have to untar gcc FIRST before I can make sense of "tar -jxf ../mpfr-2.4.1.tar.bz2" (okay, that is kind of obvious when you have dealt with millions of packages under
LFS, but for first timers, I don't think it is obvious, at least for me.. call me dumb if you want )
Two comments: (1) the book does not explicitly say you can untar under
$LFS/sources and clean the "mess" after that.
It does look like you did not read the whole LFS book before actually starting the LFS build, which is the most common reason for problems during the building of specific packages or LFS in general.

Again you write that the book does not mention to remove the created directory (and the build-dir if it is needed), even though it does in chapter 5.3 (which I also mentioned in my previous reply [#21]).

Quote:
As I say, I prefer to "build" things under $LFS/sources/build-dir. After rm -rf * does the job at the end of "my build" or your "installation".
It is completely up to you to pick a location to store the packages/patches, but I would not deviate from the book unless you have some experience building LFS.

Hope this clears things up.
 
Old 02-02-2010, 06:34 AM   #24
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by druuna View Post
It does look like you did not read the whole LFS book before actually starting the LFS build, which is the most common reason for problems during the building of specific packages or LFS in general.
I can acknowledge that. My first attempt to build LFS failed miserably because I thought some minor deviation from the book won't hurt.

Quote:
As I say, I prefer to "build" things under $LFS/sources/build-dir.
@centguy: If I understood correctly then, e.g., your binutils-build directory would reside in $LFS/sources/build-dir/binutils-build. Then your ../configure would become ../../binutils-2.19.1/configure, right? So you would have to pay close attention to every command that you issue and modify it accordingly. I think it is very easy to overlook something this way. Just think of all the 'sed' commands. They are all very cryptic. Making the path to file that is to be edited longer does not add to the readability.
Don't get me wrong. Maybe your way does indeed work better for you. But I think for most people it is more suitable to do things by the book, at least when you build LFS the first time.
 
Old 02-03-2010, 01:25 AM   #25
centguy
Member
 
Registered: Feb 2008
Posts: 618
Blog Entries: 1

Rep: Reputation: 48
druuna:

Quote:
I don't mention "installation" anywhere in my previous reply, just "building".
sorry: I mistaken the first box of in Chapter 5.3 to be from you:

Quote:
After installing each package, delete its source and build directories, unless specifically instructed otherwise. Deleting the sources prevents mis-configuration when the same package is reinstalled later.
Shouldn't that be "After building each package" ? points to think about.
Anyway, it may be that I am just plain silly to pick up non-essential points.


crts:

I think you misunderstand my point. I just want to work one level down
from $LFS/source (so that you can clean the mess easily!), the commands in the LFS book still apply strictly !
see my log to build pkg-config:

Quote:
389 cd $LFS/sources/build-dir/
390 ls
391 rm -rf *
392 cp ../pkg-config-0.23.tar.gz .
393 tar -xzvf pkg-config-0.23.tar.gz
394 cd pkg-config-0.23
395 ./configure --prefix=/usr
396 make
397 make check
398 make install
399 history
There is not special in my way of doing. Stick to whatever you think is correct but still stick to the book as much as possible.

Last edited by centguy; 02-03-2010 at 01:28 AM.
 
0 members found this post helpful.
Old 02-03-2010, 06:56 AM   #26
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by centguy View Post
I just want to work one level down
from $LFS/source (so that you can clean the mess easily!), the commands in the LFS book still apply strictly !
Ah, ok. I get your point now. So you basically just add a prestep which copies source and patches to a dedicated directory first and pick it up from there. I do my installation in a similiar way.
 
  


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
chroot problem in linux from scratch (version 6.4) chapter 6.4, the transition... jason87x Linux - Software 1 07-05-2009 11:22 PM
suse linux boot cd problem -> tried the newb section but no solution suse-benno Linux - General 3 08-24-2005 04:11 PM
linux from scratch build with linux-2.6.11 and my pktsetup problem! behmjoe Linux - Software 8 04-02-2005 04:32 AM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 06:11 AM

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

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