Bug 111147

Summary: [chromium] Use lipo(1) rather than file(1) to list library architectures.
Product: WebKit Reporter: Gavin Peters <gavinp>
Component: New BugsAssignee: Gavin Peters <gavinp>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, japhet, rsesek, thakis, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Gavin Peters 2013-02-28 23:41:33 PST
[chromium] Use lipo(1) rather than file(1) to list library architectures.
Comment 1 Gavin Peters 2013-02-28 23:50:48 PST
Created attachment 190894 [details]
Patch
Comment 2 Gavin Peters 2013-02-28 23:55:56 PST
japhet,

You have no idea how sad this build failure made me. I will not, except under duress, tell you how much time I wasted trying to figure this out.

WDYT? (of the patch, not my bad attitude)
Comment 3 Eric Seidel (no email) 2013-03-01 00:02:57 PST
Comment on attachment 190894 [details]
Patch

otool also works.  nm might too. :)
Comment 4 Gavin Peters 2013-03-12 07:50:14 PDT
japhet? seidel?

Any chance at a review?
Comment 5 Nate Chapin 2013-03-12 09:15:25 PDT
(In reply to comment #4)
> japhet? seidel?
> 
> Any chance at a review?

Not it. I don't speak .sh well enough to review it.
Comment 6 Gavin Peters 2013-03-12 09:19:11 PDT
Thanks for getting back to me japhet. I found you using blame on that file, I guess you'd reformatted it... I am aware of this curse. :D

thakis or rsesek, can either of you review this?
Comment 7 Nico Weber 2013-03-12 09:31:32 PDT
Comment on attachment 190894 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190894&action=review

> Source/WebCore/ChangeLog:6
> +        Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get

Which problem are you seeing?
Comment 8 Gavin Peters 2013-03-12 10:14:58 PDT
(In reply to comment #7)
> (From update of attachment 190894 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190894&action=review
> 
> > Source/WebCore/ChangeLog:6
> > +        Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
> 
> Which problem are you seeing?

On my mac, I couldn't build Chromium. I have MacPorts, and the file(1) installed with that had incompatible output, which made ARCHS not get loaded correctly.

Since the script already uses lipo(1) later, and since it can output the data that's being looked for, that seemed the way to go, rather than coding /usr/bin/file or adding a more flexible parser of file(1)'s output.
Comment 9 Nico Weber 2013-03-12 10:24:37 PDT
Comment on attachment 190894 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190894&action=review

>>> Source/WebCore/ChangeLog:6
>>> +        Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
>> 
>> Which problem are you seeing?
> 
> On my mac, I couldn't build Chromium. I have MacPorts, and the file(1) installed with that had incompatible output, which made ARCHS not get loaded correctly.
> 
> Since the script already uses lipo(1) later, and since it can output the data that's being looked for, that seemed the way to go, rather than coding /usr/bin/file or adding a more flexible parser of file(1)'s output.

Hm, ok. MacPorts breaks other stuff too (see e.g. the thread on chromium-dev from yesterday night), but if you're happy with being on the hook if the output of lipo varies over time, I can live with this :-)
Comment 10 Gavin Peters 2013-03-12 12:31:57 PDT
Comment on attachment 190894 [details]
Patch

Thanks Nico.

If lipo changes, I assume I will be hearing about it quick fast.
Comment 11 WebKit Review Bot 2013-03-12 12:45:56 PDT
Comment on attachment 190894 [details]
Patch

Clearing flags on attachment: 190894

Committed r145574: <http://trac.webkit.org/changeset/145574>
Comment 12 WebKit Review Bot 2013-03-12 12:45:59 PDT
All reviewed patches have been landed.  Closing bug.