Ken Moffat wrote:
> On Tue, Oct 01, 2013 at 04:41:28PM +1300, Craig Magee wrote:
>> On 1 October 2013 16:09, Ken Moffat <zarniwh...@ntlworld.com> wrote:
>>
>>> On Tue, Oct 01, 2013 at 03:27:22PM +1300, Craig Magee wrote:
>>>> However, grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' returns only:
>>>> SEARCH_DIR("/usr/lib")
>>>> SEARCH_DIR("/lib");
>>>>
>>>> while the book tells me to expect:
>>>> SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
>>>> SEARCH_DIR("/usr/local/lib64")
>>>> SEARCH_DIR("/lib64")
>>>> SEARCH_DIR("/usr/lib64")
>>>> SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
>>>> SEARCH_DIR("/usr/local/lib")
>>>> SEARCH_DIR("/lib")
>>>> SEARCH_DIR("/usr/lib");
>>>>
>>>> Any advice on where I went wrong would be greatly appreciated.
>>>>
>>>> Thanks.
>>>
>>>   Does the book tell you to expect that ?  My local copy of 7.4 says
>>> that your results are correct.  I think you might have been looking
>>> at a different version of the book, or a different page, along the
>>> way.  In particular, that grep for '.*/usr/lib' cannot possibly match
>>> '/usr/x86_64-unknown-linux-gnu/lib'.

It can match if there is more than one SEARCH entry on the line.  See below.

>> Ah, I didn't think to take the time decoding the regular expression as they
>> confuse the heck out of me.  I copypasta'd it.
>>
>> http://www.linuxfromscratch.org/lfs/view/stable/chapter06/gcc.html
>> It definitely states the block of text I quoted.
>>
>> Would the expected output listed for i686 systems also be incorrect?
>> SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
>> SEARCH_DIR("/usr/local/lib")
>> SEARCH_DIR("/lib")
>> SEARCH_DIR("/usr/lib");
>
>   Ah, I was looking at 6.10 (Adjusting the toolchain), not 6.17.
>
>   Interesting.  In my logs I keep the actual output from dummy.log
> and that does have all of those.  But I don't see how that (same)
> regexp can possibly return the first two results that we show.
>
>   OTOH, I'm hours past my bedtime, maybe I'm missing something
> obvious.  I'll defer to Matt or Bruce if they comment in the next
> few hours.  At the moment it looks like such an obvious fubar that I
> would expect _someone_ to have noticed it, so I guess I'm probably
> out on my own again and leading you astray ;-)

My log (Sep 23 svn) has exactly what the book says for x86_64.  Take a 
look at the full dummy.log to see if there is something that doesn't 
look right.

Note that the sed only separates the SEARCH entries to separate lines. 
That is, changes the semicolon-space pair to a new line.

I haven't done a 686 in quite some time.  Perhaps Fernando has.

   -- Bruce


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to