LinuxQuestions.org
Review your favorite Linux distribution.
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 06-21-2018, 04:38 PM   #1
Unturned3
LQ Newbie
 
Registered: Jan 2018
Posts: 19

Rep: Reputation: Disabled
Why is glibc built again in chapter 6.9?


Hello,
I'm following the LFS book version 8.2 and I am confused about the way that glibc is built and installed.
Why is glibc re-compiled and installed in chapter 6.9? Isn't it already cross-compiled by the GCC and Binutils built in Pass 1 (chapter 5)?
Thanks!
 
Old 06-22-2018, 03:44 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,369
Blog Entries: 1

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
All packages in ch5 were built into a temp toolcahain "dir /tools" this will be discared so now ch6 builds the actual system to the LFS partition, The toolchain is built so we can build the proper system without Touching the host system.
 
Old 06-22-2018, 10:58 AM   #3
RoLoR
Member
 
Registered: Feb 2018
Posts: 56

Rep: Reputation: Disabled
Indeed Chapter 5 is to make a building independent of host. If you copy version-check.sh to the $LFS/sources you can see how and when parts are taken over from host by running it with
Code:
bash version-check.sh
after every little step you make in chapter 5.
Chapter 6 is the actual build of LFS as said by spiky0011

Last edited by RoLoR; 06-22-2018 at 10:59 AM. Reason: Typo
 
Old 06-22-2018, 01:07 PM   #4
Unturned3
LQ Newbie
 
Registered: Jan 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Ahh, I see, so all the tools built in chapter 5 are for constructing a temporary & host-independent toolchain that can be used to build other packages in ch6.
But still I find the "Toolchain Technical Notes" section in ch5 quite confusing. At which point does the tools compiled become host-independent? If I use my host compiler to compile a new gcc & bintuils package, and then use the new tools to compile glibc, how is the glibc built here host-independent?
Sorry if this is a silly question; I am quite inexperienced in complicated compiling tasks.
BTW are there any good tutorials/guides on compiling software?

Thanks a lot!
 
Old 06-22-2018, 01:55 PM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,369
Blog Entries: 1

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
In ch6 chroot your path changes and puts tools last in where it looks "/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin".
Also if you look at where stuff is being installed to, ch5 prefix=/tools, now in ch6 prefix=/usr, then in ch-6.10 things get moved and linked. So then you start by looking at dirs on the partition.

Compiling software is prety much like what you are doing now, yes there are otherways which you will come across later in LFS and then more so in BLFS. If and when you go outside the book, packages have README and INSTALL files in them that you can read.

Last edited by spiky0011; 06-22-2018 at 01:59 PM.
 
  


Reply

Tags
compile, glibc, lfs


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] Glibc-2.23 (chapter 6.9) zoelee4 Linux From Scratch 40 09-28-2018 01:28 PM
Chapter 5 glibc configure: as and ld too old? Linux_ftw Linux From Scratch 2 12-10-2009 06:16 AM
glibc in chapter 6: not use locales? davemar Linux From Scratch 5 04-20-2004 06:15 AM
glibc problem in chapter 6 alaios Linux From Scratch 5 04-04-2004 05:27 AM
Chapter 6 glibc-2.3.1 install gabebster Linux From Scratch 14 09-24-2003 11:38 PM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration