<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>15228</bug_id>
          
          <creation_ts>2007-09-17 15:48:19 -0700</creation_ts>
          <short_desc>Missing flex, bison, or gperf produces a failing build</short_desc>
          <delta_ts>2007-09-19 09:20:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tuukka Hastrup">Tuukka.Hastrup</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aroben</cc>
    
    <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>410</commentid>
    <comment_count>0</comment_count>
    <who name="Tuukka Hastrup">Tuukka.Hastrup</who>
    <bug_when>2007-09-17 15:48:19 -0700</bug_when>
    <thetext>If a build for Gdk or Qt is started with flex, bison, or gperf unavailable, the build will fail with non-obvious error messages even after those tools are later installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>395</commentid>
    <comment_count>1</comment_count>
      <attachid>16309</attachid>
    <who name="Tuukka Hastrup">Tuukka.Hastrup</who>
    <bug_when>2007-09-17 15:52:25 -0700</bug_when>
    <thetext>Created attachment 16309
Proposed fix

Attached a proposed fix for this bug, requesting review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360</commentid>
    <comment_count>2</comment_count>
      <attachid>16309</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-09-18 09:48:43 -0700</bug_when>
    <thetext>Comment on attachment 16309
Proposed fix

&gt;+    } elsif (isGdk() or isQt()) {
&gt;+        my @cmds = qw(flex bison gperf);
&gt;+        foreach my $cmd (@cmds) {
&gt;+            if (not `$cmd --version`) {
&gt;+                die ((join &quot;, &quot;, @cmds) . &quot; required to build WebKit.\n&quot;);
&gt;+            }
&gt;+        }
&gt;     }

Thanks for taking the time to file a bug and create a patch!  This looks good, but I&apos;d like to see the code changed to test for all three commands and report only the ones that are missing.

For example if flex and bison are installed but not gperf, the developer gets a message about all three being required to build instead of a message about &quot;gperf&quot; missing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336</commentid>
    <comment_count>3</comment_count>
      <attachid>16317</attachid>
    <who name="Tuukka Hastrup">Tuukka.Hastrup</who>
    <bug_when>2007-09-18 13:41:18 -0700</bug_when>
    <thetext>Created attachment 16317
Updated fix

Actually the initial patch prints an error message for the first command that can&apos;t be executed, followed by the message about the list of all required commands. 

But why not take one more step towards usability indeed. I&apos;ve updated the patch according to the feedback, requesting a new review. Example output:

~/svn/WebKit$ WebKitTools/Scripts/build-webkit --gdk
Can&apos;t exec &quot;flex&quot;: No such file or directory at /home/tuukka/svn/WebKit/WebKitTools/Scripts/webkitdirs.pm line 497.
Can&apos;t exec &quot;gperf&quot;: No such file or directory at /home/tuukka/svn/WebKit/WebKitTools/Scripts/webkitdirs.pm line 497.
flex, gperf missing but required to build WebKit.
~/svn/WebKit$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307</commentid>
    <comment_count>4</comment_count>
      <attachid>16317</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-09-19 09:14:56 -0700</bug_when>
    <thetext>Comment on attachment 16317
Updated fix

Looks good!  r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>308</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-09-19 09:20:10 -0700</bug_when>
    <thetext>Committed revision 25639.

Added &quot;ERROR: &quot; to the die() statement to make it clearer that this is an error.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16309</attachid>
            <date>2007-09-17 15:52:25 -0700</date>
            <delta_ts>2007-09-18 13:41:18 -0700</delta_ts>
            <desc>Proposed fix</desc>
            <filename>webkitgdk-checkcmds.patch</filename>
            <type>text/plain</type>
            <size>1227</size>
            <attacher name="Tuukka Hastrup">Tuukka.Hastrup</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXRUb29scy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDI1NjAwKQorKysgV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xLDMgKzEsOSBAQAorMjAwNy0wOS0xNyAgVHV1a2thIEhhc3RydXAgIDxU
dXVra2EuSGFzdHJ1cEBpa2kuZmk+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BT
ISkuCisKKyAgICAgICAgKiBTY3JpcHRzL3dlYmtpdGRpcnMucG06IE9uIEdkayBhbmQgUXQsIGNo
ZWNrIHRoYXQgZmxleCwgYmlzb24sIGdwZXJmIGFyZSBhdmFpbGFibGUuCisKIDIwMDctMDktMTcg
IFNhbSBXZWluaWcgIDxzYW1Ad2Via2l0Lm9yZz4KIAogICAgICAgICBSZXZpZXdlZCBieSBBZGFt
IFJvYmVuLgpJbmRleDogV2ViS2l0VG9vbHMvU2NyaXB0cy93ZWJraXRkaXJzLnBtCj09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT0KLS0tIFdlYktpdFRvb2xzL1NjcmlwdHMvd2Via2l0ZGlycy5wbQkocmV2aXNpb24gMjU1OTMp
CisrKyBXZWJLaXRUb29scy9TY3JpcHRzL3dlYmtpdGRpcnMucG0JKHdvcmtpbmcgY29weSkKQEAg
LTQ5MCw2ICs0OTAsMTMgQEAgc3ViIGNoZWNrUmVxdWlyZWRTeXN0ZW1Db25maWcKICAgICAgICAg
ICAgIHByaW50ICJodHRwOi8vZGV2ZWxvcGVyLmFwcGxlLmNvbS90b29scy94Y29kZVxuIjsKICAg
ICAgICAgICAgIHByaW50ICIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqXG4iOwogICAgICAgICB9CisgICAgfSBlbHNpZiAoaXNHZGso
KSBvciBpc1F0KCkpIHsKKyAgICAgICAgbXkgQGNtZHMgPSBxdyhmbGV4IGJpc29uIGdwZXJmKTsK
KyAgICAgICAgZm9yZWFjaCBteSAkY21kIChAY21kcykgeworICAgICAgICAgICAgaWYgKG5vdCBg
JGNtZCAtLXZlcnNpb25gKSB7CisgICAgICAgICAgICAgICAgZGllICgoam9pbiAiLCAiLCBAY21k
cykgLiAiIHJlcXVpcmVkIHRvIGJ1aWxkIFdlYktpdC5cbiIpOworICAgICAgICAgICAgfQorICAg
ICAgICB9CiAgICAgfQogICAgICMgV2luMzIgYW5kIG90aGVyIHBsYXRmb3JtcyBtYXkgd2FudCB0
byBjaGVjayBmb3IgbWluaW11bSBjb25maWcKIH0K
</data>
<flag name="review"
          id="6865"
          type_id="1"
          status="-"
          setter="ddkilzer"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16317</attachid>
            <date>2007-09-18 13:41:18 -0700</date>
            <delta_ts>2007-09-19 09:14:56 -0700</delta_ts>
            <desc>Updated fix</desc>
            <filename>webkitgdk-checkcmds-2.patch</filename>
            <type>text/plain</type>
            <size>1320</size>
            <attacher name="Tuukka Hastrup">Tuukka.Hastrup</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXRUb29scy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDI1NjE1KQorKysgV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xLDMgKzEsOSBAQAorMjAwNy0wOS0xNyAgVHV1a2thIEhhc3RydXAgIDxU
dXVra2EuSGFzdHJ1cEBpa2kuZmk+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BT
ISkuCisKKyAgICAgICAgKiBTY3JpcHRzL3dlYmtpdGRpcnMucG06IE9uIEdkayBhbmQgUXQsIGNo
ZWNrIHRoYXQgZmxleCwgYmlzb24sIGdwZXJmIGFyZSBhdmFpbGFibGUuCisKIDIwMDctMDktMTcg
IFNhbSBXZWluaWcgIDxzYW1Ad2Via2l0Lm9yZz4KIAogICAgICAgICBCdWlsZCBmaXguCkluZGV4
OiBXZWJLaXRUb29scy9TY3JpcHRzL3dlYmtpdGRpcnMucG0KPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0
VG9vbHMvU2NyaXB0cy93ZWJraXRkaXJzLnBtCShyZXZpc2lvbiAyNTYxNSkKKysrIFdlYktpdFRv
b2xzL1NjcmlwdHMvd2Via2l0ZGlycy5wbQkod29ya2luZyBjb3B5KQpAQCAtNDkwLDYgKzQ5MCwx
OCBAQAogICAgICAgICAgICAgcHJpbnQgImh0dHA6Ly9kZXZlbG9wZXIuYXBwbGUuY29tL3Rvb2xz
L3hjb2RlXG4iOwogICAgICAgICAgICAgcHJpbnQgIioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiI7CiAgICAgICAgIH0KKyAgICB9
IGVsc2lmIChpc0dkaygpIG9yIGlzUXQoKSkgeworICAgICAgICBteSBAY21kcyA9IHF3KGZsZXgg
Ymlzb24gZ3BlcmYpOworICAgICAgICBteSBAbWlzc2luZyA9ICgpOworICAgICAgICBmb3JlYWNo
IG15ICRjbWQgKEBjbWRzKSB7CisgICAgICAgICAgICBpZiAobm90IGAkY21kIC0tdmVyc2lvbmAp
IHsKKyAgICAgICAgICAgICAgICBwdXNoIEBtaXNzaW5nLCAkY21kOworICAgICAgICAgICAgfQor
ICAgICAgICB9CisgICAgICAgIGlmIChAbWlzc2luZykgeworICAgICAgICAgICAgbXkgJGxpc3Qg
PSBqb2luICIsICIsIEBtaXNzaW5nOworICAgICAgICAgICAgZGllICIkbGlzdCBtaXNzaW5nIGJ1
dCByZXF1aXJlZCB0byBidWlsZCBXZWJLaXQuXG4iOworICAgICAgICB9CiAgICAgfQogICAgICMg
V2luMzIgYW5kIG90aGVyIHBsYXRmb3JtcyBtYXkgd2FudCB0byBjaGVjayBmb3IgbWluaW11bSBj
b25maWcKIH0K
</data>
<flag name="review"
          id="6870"
          type_id="1"
          status="+"
          setter="ddkilzer"
    />
          </attachment>
      

    </bug>

</bugzilla>