On Tue, Feb 26, 2008 at 8:05 AM, mark jones <[EMAIL PROTECTED]> wrote: > > Hello, > > I have completed the chapter 5. But I am facing one problem in chapter > 6.10 every time. After done all the steps before it, then query the following: > > > > $> grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' > > > > I got nothing, then I tried with > > > > $> grep 'SEARCH.*/lib' dummy.log |sed 's|; |\n|g' > > > > And I got only the following output: > > > > SEARCH_DIR("/tools/i686-pc-linux-gnu/lib") > > SEARCH_DIR("/tools/lib") > > So it seems /tools/lib is not replaced properly. I also got following > output by the command > > > > $> grep found dummy.log > > > > found ld-linux.so.2 at /tools/lib/ld-linux.so.2 > > > > I can't go ahead without solving this issue. > > Can you please tell me what I missed ?
All these problems point to the wrong ld linker being used. At the beginning of Ch. 6.10 there are instructions to move the adjusted ld (/tools/bin/ld-new) to be /tools/bin/ld. That ld should have the correct paths pointing to /usr. So, after making the adjustment moving ld-new to /tools/bin/ld, try this command: $ ld --verbose | grep SEARCH SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/lib"); If that looks alright, then you've done the ld adjustment correctly in Ch. 5 Binutils Pass 2. Now check if the ld executed by gcc is also doing the right thing: $ gcc -Wl,--verbose 2>/dev/null | grep '\(SEARCH\|found\)' SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/lib"); found ld-linux.so.2 at /lib/ld-linux.so.2 If that's wrong, then gcc isn't using the right ld. Try these commands: $ type ld /tools/bin/ld $ gcc -print-prog-name=ld ld That would show that gcc is using the ld found in $PATH, which is /tools/bin/ld. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page