LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS v7.9 First sanity check failed (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-v7-9-first-sanity-check-failed-4175594735/)

/arun/ank 12-03-2016 07:53 PM

LFS v7.9 First sanity check failed
 
Hi,

This is my first time here at LQ. I have been using linux for quite some time and am a Computer science undergrad.

The following command from the first sanity test doesn't return any output.

Code:

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

readelf -l a.out | grep ': /'
returns the output that should come out of the command mentioned before:
Code:

[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
i have read on LQ that this means something is wrong as does the book.

I am running red hat 7 and if possible would like to keep using it.

The output of version check on host :
Code:

bash, version 4.2.45(1)-release

/bin/sh -> /usr/bin/bash

Binutils: version 2.23.52.0.1-16.el7 20130226

bison (GNU Bison) 2.7

yacc is

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.2 20140120 (Red Hat 4.8.2-16)

g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)
(GNU libc) 2.17

grep (GNU grep) 2.16

gzip 1.5

Linux version 3.10.0-123.el7.x86_64 (mockbuild@x86-017.build.eng.bos.redhat.com) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon May 5 11:16:57 EDT 2014

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

texi2any (GNU texinfo) 6.3

xz (XZ Utils) 5.1.2alpha
g++ compilation OK

and the .bashrc :
Code:

set +h

umask 022

LFS=/lfs-mount

LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu

PATH=/tools/bin:/bin:/usr/bin

export LFS LC_ALL LFS_TGT PATH

The compilations of the binutils, gcc, api header extraction and glibc were without any error.
This is the Fourth time i am doing this from the start, and since i don't use html format book, it's a tedious task.Another LQ:LFS user had a similar problem where he was using centos and simply extracting by "tar -xf" was enough for him, i've been doing that from the start.

Any pointers will be hugely appreciated.

spiky0011 12-04-2016 02:27 AM

Hi

Redhat and friends dont seem to play at building LFS very well, You could try a live cd, Debian, Slack, Arch all work well.
Quote:

set +h

umask 022

LFS=/lfs-mount <<<< LFS=/mnt/lfs as per book

LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu

PATH=/tools/bin:/bin:/usr/bin

export LFS LC_ALL LFS_TGT PATH
You say you dont use html format book, what do you use? PDF is not good, or are you typing everything that can cause problems. Copy and paste the commnds from the book.
Is there anything in $LFS/tools ?
This looks like it,s running on host system
Code:

readelf -l a.out | grep ': /'
Are you building as LFS user and not root or using sudo

Also FYI there is version 7.10 released now

/arun/ank 12-04-2016 12:04 PM

but it can be done on redhat?
 
Quote:

Originally Posted by spiky0011 (Post 5637722)
Redhat and friends dont seem to play at building LFS very well


You say you dont use html format book, what do you use? PDF is not good, or are you typing everything that can cause problems. Copy and paste the commnds from the book.
Is there anything in $LFS/tools ?
This looks like it,s running on host system
Code:

readelf -l a.out | grep ': /'
Are you building as LFS user and not root or using sudo

Also FYI there is version 7.10 released now

1. I'm typing and would really like to keep doing that; don't want to downright copypasta, atleast now.( still i double-triple check)

2. all o/ps pasted are as the lfs user

3. I've been using linux for quite a while, was enrolled in RHCE and would really like if there is a workaround to this "lfs-rhel" situation.


All times are GMT -5. The time now is 07:08 PM.