LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-10-2016, 04:48 PM   #1
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Rep: Reputation: Disabled
LFS 7.9 Which source and build directories to retain? +Perl make fail Chapter:5


Hi, New to LFS

I am following the directions from the book:
http://www.linuxfromscratch.org/lfs/...tructions.html

Quote:
Delete the extracted source directory unless instructed otherwise.
I am in chapter 5 (binutils pass 2) and I have not seen any package builds that instruct you to retain said directories.

There are two reasons I am concerned.

1. This is my second attempt to build the toolchain. My last attempt failed to make Perl (5.29. Perl-5.22.1). I already triple checked my environment and the host system (Debian 7.9 Wheezy) requirements and they are OK. I suspect I missed something so I started over.


2. I came across some LFS instructions for an older version (V6.1.1) found here:
http://www.tldp.org/LDP/lfs/LFS-BOOK-6.1.1.txt

It mentions:
Quote:
Only three of the packages need to retain the
source and build directories in order for their contents to be used by
later commands. Pay special attention to these reminders.
Then in binutils pass 1 these older instructions say:
Quote:
Warning

Do not remove the Binutils build and source directories yet. These
will be needed again in their current state later in this chapter.

Details on this package are located in [338]Section 6.13.2, "Contents
of Binutils."
These older instructions also mention the same for tcl and pass 2 of binutils.


I see no mention of this in the book for LFS version 7.9 for any steps in chapter 5 so far.

I just want to make sure I'm not missing anything. Could somone please let me know at what steps in LFS 7.9 you need to retain the source (and build) directories if any? As I said, I made it to step 5.22 (last try) and did not see mention of this exception to removing the directories.

Thanks,
Tim

Last edited by Tim Abracadabra; 04-14-2016 at 06:22 PM. Reason: Add to title
 
Old 04-10-2016, 05:24 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You dont need to keep any of the untarred dirs once you have built the package, The source " tarballs" you need to keep for use againin Ch6, some are used a 2nd time in Ch5. All dirs are removed after being built.
 
1 members found this post helpful.
Old 04-10-2016, 08:07 PM   #3
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
That's right, and the old versions of the book are not of much use as guidance building the current version today. They are historically interesting but pretty much irrelevant now. For example, version 1.0 in 1999 built toolchain packages in the host system with static libraries and copied the binaries created to $LFS. Also, back then, the init system and kernel were installed first. By version 2.1.5 in 2000, the toolchain stuff was still being compiled with static libraries, but in $LFS/usr. Version 4.0 in 2002 introduced the idea of the $LFS/static directory to keep all that toolchain stuff from cluttering the LFS system directories. The cross-compiler idea appeared in version 5.0 in 2003, but the first passes of binutils and gcc were still being compiled with static libraries. That version also was the first to mention the $LFS/tools directory. By 2005, version 6.1 came along with the basic cross-compiler techniques still used today. Even so, the packages and details are constantly changing.
 
2 members found this post helpful.
Old 04-10-2016, 09:11 PM   #4
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
Thank You so much to both of you for the quick replies that exactly answered my question

I do find the LFS 7.9 documentation thorough and informative but I just felt the need
to double check that I didn't miss something regarding retention of those untarred source and build directories
as my first attempt of the tool chain build died at the Perl make.

Also, Thank you stoat for the LFS history synopsis. Seems like excellent progress over the years!

You guys Rock !!

Now the make of gcc -second pass just finished on this Pentium 4. So Onward !
Now if I can just make it past the Perl make this time, he he

Thanks and all the best,
Tim

Last edited by Tim Abracadabra; 04-10-2016 at 09:14 PM. Reason: Fix typo
 
Old 04-10-2016, 09:39 PM   #5
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
When a careful person is following exactly the stable book and runs into a single package that fails to build over and over, it seems to me that a common explanation is one of the prerequisites being off. I know you said that you checked that, but just make sure you checked it carefully. For example, a common one is /bin/sh pointing to /bin/dash instead of /bin/bash. That one digit in the output of version-check.sh derails a lot of efforts around here. If Perl fails again, you can post the version-check output if you want extra eyes to go over it.
 
Old 04-10-2016, 10:00 PM   #6
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
Thanks stoat.
Well, it wasn't over and over, just my first try that Perl make failed.

But, since you offered

Here is the output of my bash-version-check.sh

Code:
bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Debian 2.22) 1.11
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Debian 4.7.2-5) 4.7.2
g++ (Debian 4.7.2-5) 4.7.2
(Debian EGLIBC 2.13-38+deb7u10) 2.13
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.73-2+deb7u3
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
g++ compilation OK

I always appreciate a second set of eyes !

Thanks,
Tim
 
Old 04-10-2016, 10:48 PM   #7
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
Just to add in case someone googles (or duck-duck's) Perl make fail, I'd like to mention
that I really think that from my analysis of my Perl make output (tee is your friend!),
I am leaning toward something going wrong in my first tool chain build happening either
in the second pass of binutils or gcc. That is why I started over.

I posted because I was not sure and wanted to pass this by the seasoned experts here.

I'd really appreciate it if there is anything you see in my version-check that you see that needs addressing.
Please, Feel free to opine

If I have other issues not related to the OP topic, I'll open a new thread.

Thanks again,
Tim

Last edited by Tim Abracadabra; 04-10-2016 at 11:04 PM. Reason: Bah, another typo and added clarification
 
Old 04-10-2016, 11:29 PM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I never keep sources from LFS lying around. Mostly, I program buildscripts to avoid this.

I have my scripts made to work with Slackware's pkgtools tucked away nicely in my /usr/src directory on a spare partition.

Every BLFS package is segregated while the core system is a single tarball.
 
1 members found this post helpful.
Old 04-14-2016, 04:43 AM   #9
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
Subtopic - Perl make fail

Just to update in case this thread may be helpful to others.

First, I now sucessfully completed my toolchain build of LFS 7.9

Now the possibly helpful part:

I was wondering where I went wrong on my first attempt.
That is why I was reviewing the process and came upon the mention of retained package builds
and posted my question.

Here it is (after context):

I do not copy and paste from the book directly to the comamnd line. I paste to a document
(ascii text) first so I can add tee to the commands for logging of the configure,
make, make install, make test (If I want), etc.. . Then copy and paste from there.

I figured that I could use the tee'd output to help troubleshoot if in case anything went wrong
and use them to help others in case they had issues.

I have also for comparison, downloaded the logs from:
http://www.linuxfromscratch.org/lfs/...able/i7-5820K/

and wrote scripts to compare my tee'd output to those for another type
of "Sanity check" as well as "grepping" for error, warning or fail.


Anyway, before I get TL;DR ..

In the second pass of gcc in chapter 5:

Seems somehow I added character after the line contuation \ which seemed to cause all the other directives to be ignored.

Code:
CC=$LFS_TGT-gcc                                    \
CXX=$LFS_TGT-g++                                   \i  
AR=$LFS_TGT-ar                                     \
RANLIB=$LFS_TGT-ranlib                             \
../configure                                       \
    --prefix=/tools                                \
    --with-local-prefix=/tools                     \
    --with-native-system-header-dir=/tools/include \
    --enable-languages=c,c++                       \
    --disable-libstdcxx-pch                        \
    --disable-multilib                             \
    --disable-bootstrap                            \
    --disable-libgomp	2>&1 | tee ~/LFS-Proj/Screenlogs/gcc/gcc_configure_pass2
Interestingly, all the following steps "worked" until the make of Perl.
.. However, There were some interesting warnings.
Be careful not to dismiss those as due to differences in the "Included Host system" versions used.

So yes, the instructions in the book "Just Works".
Just be careful and double check before you hit enter !
And when it's been a long day, know when to call it quits
lol

Backups of your toolchain may not be a bad Idea as well especially
if building on a slower system.

I keep mine on an unmounted partition for safety.


@ReaperX7,
Thanks for sharing the helpful advice!
.. My scripting will come later.
I just want to do this "by hand" first and then make it more fun and fancy
All advice is most welcome!


On to Chapter 6

Thanks to you all and those at the LFS Project.

All the best and hope that helps,
Tim

Last edited by Tim Abracadabra; 04-14-2016 at 07:42 AM. Reason: add comma and warning comment
 
Old 04-14-2016, 04:48 AM   #10
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just as a side note, you might want to reinstall several packages from the LFS book and core after you get enough done to repackage and update core packages.

Whatever you do, do not touch glibc or kernel-headers. Leave them be. The book even says if you need to update those, it's just better to rebuild from scratch.
 
Old 04-14-2016, 05:50 AM   #11
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Just as a side note, you might want to reinstall several packages from the LFS book and core after you get enough done to repackage and update core packages.

Whatever you do, do not touch glibc or kernel-headers. Leave them be. The book even says if you need to update those, it's just better to rebuild from scratch.
? Are you referring to my upcoming build of my actual LFS system (Chapter 6) or updating my tool-chain before proceeding?
before I start ?

Thanks,
Tim
 
Old 04-14-2016, 06:05 AM   #12
Tim Abracadabra
Member
 
Registered: May 2014
Location: USA, Wherever I may Roam
Distribution: debian 9.8 w/GNOME and KDE dual boot w/Win 10.| debian 7.11 w/Xfce, LFS 7.9, + Multi-boot w/Windows7
Posts: 122

Original Poster
Rep: Reputation: Disabled
@ReaperX7

Yep, .. repackage, update .. Thanks !!
hmm, That may be sooner than later.
Awesome!

Last edited by Tim Abracadabra; 04-14-2016 at 06:11 AM.
 
  


Reply



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
VirtualBox Starter Pack - LFS as a Host For Your LFS Build basica Linux From Scratch 4 11-25-2015 12:02 PM
New build of LFS I'm experimenting with. (OpenRC+ZFS+B/LFS) ReaperX7 Linux From Scratch 26 07-19-2015 09:17 PM
[SOLVED] i can't perfome make install commond while build binutils-build LFS plzzz help me Carl_cj Linux From Scratch 19 09-04-2014 11:52 AM
[SOLVED] The build is prepared but confused about the next steps to build the LFS system CBM200 Linux From Scratch 3 02-04-2014 10:47 AM
Chapter 5 (After installing each package, delete its source and build directories) brayden516 Linux From Scratch 2 04-17-2008 11:50 AM

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

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