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-28-2016, 06:38 AM   #1
Rafnex
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
Linux from Scratch 5.7.2 Toolchain sanity check


I started the Project "Linux from Scratch" some time ago. First I started with Ubuntu 15.10 64bit and did everything according to the PDF-File. By the Check in paragraph 5.7.2, it didn't worked. Afterwards I started all over again, with CentOS 7.2 but it works neither.In both attempts i got no Errors while compiling and installing the previous packages.

Input:

Code:
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
Output:

Code:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find -lc
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
Input:

Code:
readelf -l a.out | grep ': /tools'
Output:

Code:
readelf: Error: 'a.out': No such file
I found no solution that worked in StackOverFlow or different platforms.

Here my Output of the version-check.sh:

Code:
lfs:~$ bash version-check.sh
bash, version 4.2.46(1)-release
/bin/sh -> /usr/bin/bash
Binutils: version 2.23.52.0.1-55.el7 20130226
bison (GNU Bison) 2.7
/usr/bin/yacc -> /usr/bin/bison
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.22
diff (GNU diffutils) 3.3
find (GNU findutils) 4.5.11
GNU Awk 4.0.2
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
(GNU libc) 2.17
grep (GNU grep) 2.20
gzip 1.5
Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
m4 (GNU M4) 1.4.16
GNU Make 3.82
GNU patch 2.7.1
Perl version='5.16.3';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.26
makeinfo (GNU texinfo) 5.1
xz (XZ Utils) 5.1.2alpha
g++ compilation OK
My ~/.bashrc of the LSF User:

Code:
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH
My ~/.bash_profile of the LFS User

Code:
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
Thanks for your help!
 
Old 04-29-2016, 06:56 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,350

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
You've made errors somewhere. Chapter 5 isn't too bad.

Delete, and start over. I would use the html book - easier for copy 'n' paste. You haven't much ground to catch up. You need chapter 5 in good order going into chapter 6.
 
Old 04-29-2016, 11:12 AM   #3
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
CentOS is Red Hat based, and RHEL is a known problem distribution for building LFS.

We don't know why, but it's possibly something they use like a patch and it causes everything to go screwy.

If it's not too much trouble, Slackware might be useful for you to get LFS built. AlienBOB has a few Live media disk images available and they can be used to get Chapter 5 completed before you move into Chapter 6. If you ever use a Live disk to build LFS, you have to build Chapter 5 in one session or it will mess up the permissions.
 
Old 04-29-2016, 07:16 PM   #4
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
Quote:
Originally Posted by ReaperX7 View Post
If it's not too much trouble, Slackware might be useful for you to get LFS built. AlienBOB has a few Live media disk images available and they can be used to get Chapter 5 completed before you move into Chapter 6. If you ever use a Live disk to build LFS, you have to build Chapter 5 in one session or it will mess up the permissions.
Salix Live is a good alternative for host. I've been using it to build my LFS systems. It is largely (if not entirely) compatible with Slackware, and meets all of the build requirements for LFS out of the box. Get the XFCE version and load it onto your USB stick

http://www.salixos.org/download.html
 
Old 05-03-2016, 09:01 AM   #5
Rafnex
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi together!

Solved it.

I started again and unziped the packages with "tar -xf" instead of "tar -jxvf".

And it worked!

Thanks for your help!
 
Old 06-28-2016, 07:09 PM   #6
brb_coffee
LQ Newbie
 
Registered: Aug 2013
Posts: 4

Rep: Reputation: Disabled
Because of this post, I also re-worked the steps using "tar xf" rather than "tar jxvf". This seems to have fixed the issue for me too. CentOS 7.

Thank you, Rafnex.
 
  


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
LFS 7.7 manual section 6.10 Adjusting the Toolchain - Sanity Check Failure ocpaul20 Linux From Scratch 5 04-12-2015 10:35 PM
[SOLVED] Linux from scratch , chapter 5.7 No output from sanity check flighter Linux From Scratch 8 08-20-2013 07:16 AM
5.8 adjusting toolchain, sanity check vendtagain Linux From Scratch 1 10-01-2009 10:38 AM
No output from sanity check, chapter 5.7.*Adjusting the Toolchain Murdock_nl Linux From Scratch 2 09-13-2008 12:59 AM
LFS 6 ch5.9 adjusting the toolchain failed sanity check totty79 Linux From Scratch 1 03-21-2005 02:58 PM

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

All times are GMT -5. The time now is 10:26 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
Open Source Consulting | Domain Registration