On 1/27/2018 5:48 PM, Baho Utot wrote:


On 1/27/2018 11:41 AM, Maxwell Huenink wrote:
​​After building GCC in step 6.20 there were several steps to ensure that the new GCC was installed correctly. Starting at "Verify the compiler is serching for the correct header files:", I failed to get the output that the book says I should get.

Rather than getting:

|#include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include /usr/local/include /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed /usr/include|

I got
root:/sources/gcc-7.2.0/build# grep -B4 '^ /usr/include' dummy.log
   ignoring nonexistent directory "/tools/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/include"
   ignoring duplicate directory "/tools/include"
   #include "..." search starts here:
   #include <...> search starts here:
    /usr/include
​
I also did not get the correct search paths in the following step, which should have been:

|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");

|

|But instead I got:
|

root:/sources/gcc-7.2.0/build# 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");
​
I have already run "make install" and don't know what my next step should be.



I have been getting this too.  I am currently working on this and I think it is related to the symlink in

6.9.1. Installation of Glibc

 First create a compatibility symlink to avoid references to /tools in our final glibc:

ln -sfv /tools/lib/gcc /usr/lib


I have not confirmed this as I have not tried a rebuild which will be soon.


I have successfully fixed my problem with the
ln -sfv /tools/lib/gcc /usr/lib
issue.

I removed the symlink after building gcc and before installing gcc.

This is my result from testing and it matches the book.

      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
Book: [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crt1.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crti.o succeeded
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../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

#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed
 /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

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");
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");

dummy.log:attempt to open /lib/libc.so.6 succeeded
dummy.log:attempt to open /lib/libc.so.6 succeeded
Book: attempt to open /lib/libc.so.6 succeeded

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
removed 'dummy.c'
removed 'a.out'
removed 'dummy.log'

On the road again
--
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

Reply via email to