[SOLVED] LFS 7.9 Which source and build directories to retain? +Perl make fail Chapter:5
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.
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.
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
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.
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.
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:
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
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.
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:
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
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:
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.
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
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.
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:
Quote:
Originally Posted by ReaperX7
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 ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.