LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-03-2016, 02:33 PM   #1
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Rep: Reputation: 18
sanity check after gcc install at 6.17 failed


ok, after about three hours of testing and installing gcc, i ran the sanity checks at the end of 6.17 and the first one didn't print an output. the others passed, but nothing for the first one. i had two failures on the gcc test, but they matched exactly the link given, so i installed as it said. when i looked back at the one after 6.10, i noticed there was a small difference in the path. this time there have been no errors at all throughout the whole process and it has only taken about 8 hours to get here, and that includes the installation of slackware and configuring it. eventually, i am going to finish one of these. here is the output of the errors i mentioned.
sanity check after 6.10.
Code:
root:/sources# echo 'int main(){}' > dummy.c
root:/sources# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources# readelf -l a.out | grep ': /lib'
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
root:/sources# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/../lib64/crt1.o succeeded
/usr/lib/../lib64/crti.o succeeded
/usr/lib/../lib64/crtn.o succeeded
root:/sources# grep -B1 '^ /usr/include' dummy.log
#include <...> search starts here:
 /usr/include
root:/sources# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib");
root:/sources# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib64/libc.so.6 succeeded
root:/sources# grep found dummy.log
found ld-linux-x86-64.so.2 at /lib64/ld-linux-x86-64.so.2
root:/sources# rm -v dummy.c a.out dummy.log
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'
root:/sources#
sanity check after 6.17.
Code:
root:/sources/gcc-5.3.0/build# ln -sv ../usr/bin/cpp /lib
'/lib/cpp' -> '../usr/bin/cpp'
root:/sources/gcc-5.3.0/build# ln -sv gcc /usr/bin/cc
'/usr/bin/cc' -> 'gcc'
root:/sources/gcc-5.3.0/build# install -v -dm755 /usr/lib/bfd-plugins
install: creating directory '/usr/lib/bfd-plugins'
root:/sources/gcc-5.3.0/build# ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/5.3.0/liblto_plugin.so \
>         /usr/lib/bfd-plugins/
'/usr/lib/bfd-plugins/liblto_plugin.so' -> '../../libexec/gcc/x86_64-unknown-linux-gnu/5.3.0/liblto_plugin.so'
root:/sources/gcc-5.3.0/build# echo 'int main(){}' > dummy.c
root:/sources/gcc-5.3.0/build# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources/gcc-5.3.0/build# readelf -l a.out | grep ': /lib'
root:/sources/gcc-5.3.0/build# echo 'int main(){}' > dummy.c
root:/sources/gcc-5.3.0/build# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources/gcc-5.3.0/build# readelf -l a.out | grep ': /lib'
root:/sources/gcc-5.3.0/build# cd ..
root:/sources/gcc-5.3.0# cd build/
root:/sources/gcc-5.3.0/build# rm -v dummy.c a.out dummy.log
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'
root:/sources/gcc-5.3.0/build# echo 'int main(){}' > dummy.c           
root:/sources/gcc-5.3.0/build# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources/gcc-5.3.0/build# readelf -l a.out | grep ': /lib'        
root:/sources/gcc-5.3.0/build# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/crt1.o succeeded
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/crti.o succeeded
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/crtn.o succeeded
root:/sources/gcc-5.3.0/build# grep -B4 '^ /usr/include' dummy.log
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include-fixed
 /usr/include
root:/sources/gcc-5.3.0/build# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
root:/sources/gcc-5.3.0/build# grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib64/libc.so.6 succeeded
root:/sources/gcc-5.3.0/build# grep found dummy.log
found ld-linux-x86-64.so.2 at /lib64/ld-linux-x86-64.so.2
let me know if anything else is needed.
 
Old 09-03-2016, 02:45 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
All looks good to me all the expected output as per book, strange the 1st never output but 2nd looks fine
 
Old 09-03-2016, 03:27 PM   #3
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
did you notice that both paths have the extra "../" after the "readelf -l a.out | grep ': /lib' " command? after i posted this, i figured i would just go ahead and install the rest, but then bzip failed.
Code:
root:/sources# tar -xf bzip2-1.0.6.tar.gz 
root:/sources# cd bzip2-1.0.6
root:/sources/bzip2-1.0.6# patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch
patching file Makefile
root:/sources/bzip2-1.0.6# sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
root:/sources/bzip2-1.0.6# sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
root:/sources/bzip2-1.0.6# make -f Makefile-libbz2_so
gcc -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
/usr/bin/ld: blocksort.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
blocksort.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile-libbz2_so:38: recipe for target 'all' failed
make: *** [all] Error 1
these may not even be related. but this does look a lot like the error i got on the other build i failed at last weekend. it is a different computer, so it has to be something else.

the last errors pointed to the same thing in the perl build, but looked like it pointed to bzip.

Last edited by sfzombie13; 09-03-2016 at 03:28 PM. Reason: clarification
 
Old 09-03-2016, 03:47 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
It went wrong in 6.10 according to the note

"On 64-bit systems, the path above will be /usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64/. This reduces to /usr/lib64 and /usr/lib64 is a symlink that points to /usr/lib. "

you have "/usr/lib/../lib64/crt1.o succeeded"
 
Old 09-03-2016, 03:47 PM   #5
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
after removing the directory and the tarball i downloaded from the wget list, i tried again, and it worked this time. installed with no errors. so i am moving on and will mark this one as solved as soon as i get past the perl.

after reading this where it went wrong in 6.10, how would i recover from that? is it just as easy as removing the directories and starting over? that is not a problem, i am used to redoing things.

Last edited by sfzombie13; 09-03-2016 at 03:49 PM. Reason: new info
 
Old 09-03-2016, 03:56 PM   #6
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
See what happens 1st, do you have a copy of tools from before ch6? It is possible to use that
 
Old 09-03-2016, 04:23 PM   #7
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
nope, didn't keep a copy of them. looks like another start over. i installed everything until sed with no issues, but sed is a bzip file, and of course bzip isn't working, so i can't unzip it. so, without a copy of the tools, i guess i just start again. for next time, when i keep the tools folder at the end of chapter 5, if i need to use it again, do i just dd the folder into the $LFS directory after deleting the old tools folder?
 
Old 09-04-2016, 08:08 AM   #8
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
the system is finished, sort of. it got done with everything, but will not boot. i added the information to lilo instead of installing grub, then ran lilo to add it. when i selected it, it got just past adding the clocksource to tsc, then said that line 678 of the /run/lib/init-functions couldn't write to the /run/bootlog because it was a read only file system. then line 689 couldn't find /sys in fstab. sounds like it is not mounting the virtual file system so that it can write to the logs. should i continue on with this thread, or start a new one? i am going to be looking all day to see if i can fix it, hopefully it is an easy fix.
 
Old 09-04-2016, 09:29 AM   #9
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
SUCCESS!!! i found the problem and fixed it, well, sort of. i renamed the S10udev to .old and copied the rc.udev file from my host system and renamed it S10udev. it gave me a couple of failures, but let me login. i created a test file in vim and saved it. now, i just have to figure out where the problem was and fix it, or leave it as it is and continue on to the blfs. either way, thanx to all for the help, and if anyone else has this issue, hope this helps out. this os is going to be distributed soon as an addition to the code project, free computer training at codewv dot org.
 
Old 09-04-2016, 09:36 AM   #10
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
Try to install bzip you might need it
 
Old 09-04-2016, 03:11 PM   #11
sfzombie13
Member
 
Registered: Dec 2003
Location: wv
Distribution: slackware, lfs, kali, pentoo, centos
Posts: 168

Original Poster
Rep: Reputation: 18
bzip is working now. i reinstalled it two more times after the error and it worked. i am taking the rest of the day and tomorrow off.
 
  


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
Failed sanity check in chapter 6.10 of LFS ravichanderjha Linux From Scratch 5 01-17-2015 07:48 AM
GCC pass 2 sanity check fails, but without errors phoenix_2000 Linux From Scratch 7 07-20-2014 02:48 PM
[SOLVED] [LFS 7.4 r.c.] Chapter 6 : GCC Sanity Check Fails DeeGee Linux From Scratch 2 09-26-2013 01:09 AM
sanity check failed for g++ pablovschby Programming 2 11-08-2004 02:39 AM
Failed sanity check in fluxbox ./configure scuzzman Linux - Newbie 6 06-20-2004 10:26 PM

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

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