6.12.1. Installation of GCC (Book: LFS Version 6.2)
Hi. This is my fourth attempt at an LFS system - I have had one success so far - so I still consider myself a newbie. In section 6.12.1 - Installation of GCC all goes well. The test-suite shows some errors, but I carry on as it usually does. I start the test for the dynamic linker. All is fine until I do the test for the search paths: Step 15: grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' Desired output: SEARCH_DIR(/usr/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/local/lib) SEARCH_DIR(/lib) SEARCH_DIR(/usr/lib); What I got: SEARCH_DIR(/tools/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/lib) SEARCH_DIR(/lib); All other tests showed the desired output. My question is: How far back do I need to go? -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
RE: 6.12.1. Installation of GCC (Book: LFS Version 6.2)
knutz wrote: Hi. This is my fourth attempt at an LFS system - I have had one success so far - I applaude your persistence :) In section 6.12.1 - Installation of GCC all goes well. The test-suite shows some errors, but I carry on as it usually does. I start the test for the dynamic linker. All is fine until I do the test for the search paths: Step 15: grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' Desired output: SEARCH_DIR(/usr/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/local/lib) SEARCH_DIR(/lib) SEARCH_DIR(/usr/lib); What I got: SEARCH_DIR(/tools/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/lib) SEARCH_DIR(/lib); All other tests showed the desired output. My question is: How far back do I need to go? This looks like the output you should get in 6.10, so most likely you won't need to go back any further than that. I'm no toolchain guru but it looks to me like the gcc you used to compile your dummy.c is not using the new Binutils from ch 6.11. Are you sure that you entered the chroot with the correct command? Check that your PATH is correct (/usr/bin first and /tools/bin last) and that shell hashing is off (output of echo $- must not contain lowercase 'h') Brandon -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
RE: 6.12.1. Installation of GCC (Book: LFS Version 6.2)
Brandon Peirce wrote: entered the chroot with the correct command? Check that your PATH is correct (/usr/bin first and /tools/bin last) and that shell From ch 6.4: PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin Ok, /usr/bin should be 2nd not 1st, but the point is that the new gcc and binutils in /usr/bin should be found before the one in /tools/bin. You might also like to repeat the test from 6.12 explicitly using /usr/bin/gcc instead of just cc to generate the dummy.log. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: 6.12.1. Installation of GCC (Book: LFS Version 6.2)
On 10/5/06, knutz [EMAIL PROTECTED] wrote: Desired output: SEARCH_DIR(/usr/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/local/lib) SEARCH_DIR(/lib) SEARCH_DIR(/usr/lib); What I got: SEARCH_DIR(/tools/i686-pc-linux-gnu/lib) SEARCH_DIR(/usr/lib) SEARCH_DIR(/lib); All other tests showed the desired output. My question is: How far back do I need to go? This is from the ld linker in binutils. For some reason, it's still using the ld in /tools/bin. So, as Brandon said, either your PATH is wrong and /tools/bin is at the beginning. Then when GCC got built, it assumed this ld was the right one to use. Otherwise, something went wrong in the binutils installation in Ch. 6.11. So, you should probably go back Ch. 6.11 and rebuild binutils and gcc. However, here's a quick test to see what's going on. 1. What's your PATH? /usr/bin should come before /tools/bin. $ echo $PATH 2. Assuming PATH is correct, which ld is first in the path. $ type -p ld 3. Is it /usr/bin/ld? If not, binutils in Ch. 6.11 definitely got messed up and didn't install to the standard directory. If it is the correct ld, check what it's search path is. $ ld --verbose | grep SEARCH This output should match that in Ch. 6.12. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page