[lfs-dev] SEARCH output in chroot 6.10 (Adjusting the Toolchain)

Bruce Dubbs bruce.dubbs at gmail.com
Wed Feb 4 10:04:31 PST 2015

Pierre Labastie wrote:
> Le 04/02/2015 03:04, Ken Moffat a écrit :
>>   On 24th Jan, on -chat, somebody called C A queried this -
>> Quoting from
>> http://lists.linuxfromscratch.org/pipermail/lfs-chat/2015-January/028737.html
>>> So, when adjusting a toolchain after compiling dummy.c as part of
>>> testing, when running:
>>> grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
>>> the result is:
>>> SEARCH_DIR("=/tools/x86_64-unknown-linux-gnu/lib64")
>>> SEARCH_DIR("/usr/lib")
>>> SEARCH_DIR("/lib")
>>> SEARCH_DIR("=/tools/x86_64-unknown-linux-gnu/lib");
>>> but the book says it should be:
>>> SEARCH_DIR("/usr/lib")
>>> SEARCH_DIR("/lib");
>>> and the further statement in the book is:
>>>> If the output does not appear as shown above or is not received at
>>>> all, then something is seriously wrong. Investigate and retrace
>>>> the
>>>> steps to find out where the problem is and correct it.
>>   In my own scripts, I normally just grep for the values I expect to
>> find, but this time I've logged the full results and it looks to me
>> as if the results are indeed as shown above (on x86_64, obviously -
>> i686 would only have one /tools/*linux*/lib entry).
>>   So, what am I missing ?  In general, people do not complain that
>> their output at this point does not match (i.e. exceeds) what the
>> book suggests.
>> ĸen
> Seems there is an oscillating behaviour of the results as a function of
> binutils version
> number: see
> http://lists.linuxfromscratch.org/pipermail/lfs-dev/2013-April/067945.html
> Actually, "/tools/x86_64-unknown-linux-gnu/lib64" does not exist anyway...
> But maybe somebody should change the book again!
> BTW, here is the output on i686 (recent build with gcc-4.9.2 and
> binutils-2.25):
> SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib32")
> SEARCH_DIR("/usr/lib")
> SEARCH_DIR("/lib")
> SEARCH_DIR("=/tools/i686-pc-linux-gnu/lib");

The point of the test is to ensure that /tools/lib and /tools/usr/lib 
are NOT present.  Perhaps we should just say that.

   -- Bruce

More information about the lfs-dev mailing list