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 04-02-2013, 03:52 AM   #1
c129084
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
Toolchain


Working trough the LFS guide I had a question about the toolchain.

I've already read this thread:
http://www.linuxquestions.org/questi...lchain-520503/

Why do I need a new, 'clean' toolchain to build a new linux system. Why can't I just compile (for instance) kernel and busybox and then boot it up?

After it has been compiled (and necessary libraries are present) it should work, right?
 
Old 04-02-2013, 04:05 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,607

Rep: Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243
I assume the tools are not perfect. They may fail in case of some strange "circumstances", so if the production environment contained some aliens. You can never guarantee all the tools work in all cases. The most secure solution whould be to use a new, fresh, clean and unused environment.
Remember, you will have no chance to recover such errors in a running system.
 
1 members found this post helpful.
Old 04-02-2013, 04:35 AM   #3
c129084
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
They may fail in case of some strange "circumstances".
Is there a high risk of this happening (assuming I'm going to compile this on my relatively normal workstation)? Or is this a "well, in the 0.02% chance something might be wrong, better build a clean toolchain"
 
Old 04-02-2013, 08:01 AM   #4
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 836

Rep: Reputation: 167Reputation: 167
The idea of building the toolchain is to stop cross contamination from the host system, ie you don't want programs linked to library's that are on the host that may not be on the destination system, and don't forget that some libs are linked to other libs and so on, compiling the toolcain is fairly painless IF YOU STICK TO THE BOOK, at least for the first few times, once you have a built and working toolchain you can always save it for future use so you don't have to rebuild from scratch every time, although for your first couple of builds I would build the toolchain from scratch every time as its good practice.
 
1 members found this post helpful.
Old 04-02-2013, 08:19 AM   #5
c129084
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
The idea of building the toolchain is to stop cross contamination from the host system, ie you don't want programs linked to library's that are on the host that may not be on the destination system, and don't forget that some libs are linked to other libs and so on.
Then again, does this happen fast/often, is this a high risk?

Quote:
Originally Posted by Keith Hedger View Post
compiling the toolcain is fairly painless IF YOU STICK TO THE BOOK, at least for the first few times
It wasn't very difficult (when following the book), but how could a sane person know all the little tweaks and adjustments that (need to) happen here and there???

Quote:
Originally Posted by Keith Hedger View Post
once you have a built and working toolchain you can always save it for future use so you don't have to rebuild from scratch every time, although for your first couple of builds I would build the toolchain from scratch every time as its good practice.
Very good advise , I will definitely follow it.
 
Old 04-02-2013, 08:30 AM   #6
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 836

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by c129084 View Post
...Then again, does this happen fast/often, is this a high risk?...
Yes just do ldd on random system libs/apps to see how many libs they are linked against.

Quote:
Originally Posted by c129084 View Post
...It wasn't very difficult (when following the book), but how could a sane person know all the little tweaks and adjustments that (need to) happen here and there???...
Experience and ask on this forum if you get stuck, also the book does ( mostly ) explain why certain otions/patches are used.
 
2 members found this post helpful.
  


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
[SOLVED] ToolChain error devilboy09 Linux From Scratch 17 11-08-2011 08:56 AM
Toolchain skeeters Programming 3 12-11-2009 02:33 PM
about toolchain nesta Linux - Kernel 4 01-23-2007 05:30 AM
adjusting the toolchain bourbonstreet Linux From Scratch 5 11-05-2006 11:43 AM
Problems with the Toolchain hbinded Linux From Scratch 10 05-17-2006 08:51 AM


All times are GMT -5. The time now is 09:03 AM.

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