On 1/3/2018 11:01 PM, Bruce Dubbs wrote:
Baho Utot wrote:
I can not figure this out.
I have rebuilt the whole thing from beginning to end and I always get
the
following upon the test for this chapter. All previous tests are good.
I made a script to do the test which give me the command followed by the
result then the line with Book: is what I am supposted to get.
I simply can not figure out why I get the results I do.
If any one has some insight please educate me on why the difference with
the book.
readelf -l a.out | grep ': /lib'
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
Book: [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
Looks right.
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/../lib/crt1.o succeeded
/usr/lib/../lib/crti.o succeeded
/usr/lib/../lib/crtn.o succeeded
Book: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crt1.o
succeeded
Book: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crti.o
succeeded
Book: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crtn.o
succeeded
Where did you get this? It is not in 8.1. Your results match the book.
I got it from the book I cut and pasted the book values from here:
http://linuxfromscratch.org/lfs/view/stable/chapter06/gcc.html
grep -B4 '^ /usr/include' dummy.log
#include <...> search starts here:
/usr/include
Book: #include <...> search starts here:
Book: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include
Book: /usr/local/include
Book: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed
Book: /usr/include
Again, what you have matches the book.
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");
Book: SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
Book: SEARCH_DIR("/usr/local/lib64")
Book: SEARCH_DIR("/lib64")
Book: SEARCH_DIR("/usr/lib64")
Book: SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
Book: SEARCH_DIR("/usr/local/lib")
Book: SEARCH_DIR("/lib")
Book: SEARCH_DIR("/usr/lib");
I do not know where you got these values from the book. The book has:
"References to paths that have components with '-linux-gnu' should be
ignored, but otherwise the output of the last command should be:
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")"
Which matches what you have.
grep "/lib.*/libc.so.6 " dummy.log
attempt to open /lib/libc.so.6 succeeded
Book: attempt to open /lib/libc.so.6 succeeded
Looks good to me.
grep found dummy.log
found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2
Book: found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2
Also looks good.
-- Bruce
Here is where I get the book values
http://linuxfromscratch.org/lfs/view/stable/chapter06/gcc.html
all the values labeled Book: came from there
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style