LinuxQuestions.org
Help answer threads with 0 replies.
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 01-26-2018, 09:49 AM   #1
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Rep: Reputation: Disabled
Sanity check error in Glibc-2.26 chapter 5.7


When I performed the sanity check,
Code:
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
the expected output is,
Code:
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
But, while executing it, I get error
Code:
lfs:/mnt/lfs/sources/glibc-2.26/build$ echo 'int main(){}' > dummy.c
lfs:/mnt/lfs/sources/glibc-2.26/build$ $LFS_TGT-gcc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.2.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/7.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
lfs:/mnt/lfs/sources/glibc-2.26/build$ readelf -l a.out | grep ': /tools'
readelf: Error: 'a.out': No such file
Th bashrc and bash_profile files.
Code:
lfs:/mnt/lfs/sources/glibc-2.26/build$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
lfs:/mnt/lfs/sources/glibc-2.26/build$ cat ~/.bashrc      
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
/tools and /mnt/lfs/tools are also linked. I've been stuck with this for so many days. Please help me.
 
Old 01-27-2018, 02:21 AM   #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
Hi

Are you using a PDF to follow lfs or the online HTML book "prefered"

ls -l /mnt/lfs

When you are starting again are you emptying tools? dont try to over write whats in there. Are you posotive all packages built correctly so far "binutils, Gcc" no errors?

Make sure you remove all untarred dirs when finished building them.

Last edited by spiky0011; 01-27-2018 at 02:25 AM.
 
Old 01-27-2018, 01:21 PM   #3
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Original Poster
Rep: Reputation: Disabled
I'm using the offline html systemd version.
LFS-BOOK-20171203-systemd-NOCHUNKS.html

No. I didn't make any changes to the tools directory. Yes there were no errors.
I have removed all untarred folders.
 
Old 01-27-2018, 04:57 PM   #4
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
when you restart empty tools dir

and ls -l /mnt/lfs
 
Old 01-28-2018, 11:02 AM   #5
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 59

Original Poster
Rep: Reputation: Disabled
I restarted and issued ls -l.

Code:
bash-4.3# rm -rf /tools
bash-4.3# ls -l /mnt/lfs
total 24
drwx------  2 root root 16384 Jan 14 20:01 lost+found
drwxrwxrwt  3 lfs  root  4096 Jan 22 19:17 sources
drwxr-xr-x 11 lfs  root  4096 Jan 22 19:52 tools

Code:
bash-4.3# readlink /tools
/mnt/lfs/tools
I did all this as root.
 
  


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
No output for sanity check in Glibc-2.26 chapter 5.7 - Error in tools directory location parotta36 Linux From Scratch 10 01-23-2018 07:12 AM
[SOLVED] LFS 7.3 / Chapter 6.10 / Page 96 / Error from the sanity check Drumachine Linux From Scratch 4 08-15-2013 09:01 AM
[SOLVED] error after tools check glibc chapter 5.7 Lancelot1 Linux From Scratch 14 12-11-2012 10:32 AM
[SOLVED] LFS 6.8 - check error 2 when installing glibc for chapter 6.9 robofighter Linux From Scratch 4 07-30-2011 03:25 PM
LFS 6, chapter 6.11; Glibc 'make check' error Zamochit Linux From Scratch 5 05-31-2005 12:54 PM

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

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