<?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>140997</bug_id>
          
          <creation_ts>2015-01-28 07:38:21 -0800</creation_ts>
          <short_desc>[CMake] Minimum python version should be 2.7</short_desc>
          <delta_ts>2015-01-28 08:30:37 -0800</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>andersca</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gustavo</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>msaboff</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1064888</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-01-28 07:38:21 -0800</bug_when>
    <thetext>The minimum python version required to build WebKit is set to 2.6. This means that cmake will pick python2.6 on any system that has it installed and will use it to call the python build scripts.

This fails:

$ rm -fr WebKitBuild/Release
$ Tools/Scripts/build-webkit --release --gtk
[...]
-- Found Perl: /usr/bin/perl (found suitable version &quot;5.20.1&quot;, minimum required is &quot;5.10.0&quot;) 
-- Found PythonInterp: /usr/bin/python2.6 (found suitable version &quot;2.6.8&quot;, minimum required is &quot;2.6.0&quot;) 
-- Found Ruby: /usr/bin/ruby1.8 (found suitable version &quot;1.8.7&quot;, minimum required is &quot;1.8.7&quot;) 
[...]
Creating hashtable for /home/clopez/webkit/webkit/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Creating hashtable for /home/clopez/webkit/webkit/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
FAILED: cd /home/clopez/webkit/webkit/WebKitBuild/Release/Source/JavaScriptCore &amp;&amp; /usr/bin/python2.6 /home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py --outputDir /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore --framework JavaScriptCore /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/CombinedDomains.json &amp;&amp; mkdir -p /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/inspector &amp;&amp; cp /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorBackendDispatchers.h /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorBackendDispatchers.cpp /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorFrontendDispatchers.h /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorFrontendDispatchers.cpp /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorProtocolObjects.h /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorProtocolObjects.cpp /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/inspector &amp;&amp; mkdir -p /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/WebInspectorUI/UserInterface/Protocol &amp;&amp; cp /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/InspectorBackendCommands.js /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/WebInspectorUI/UserInterface/Protocol
Traceback (most recent call last):
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py&quot;, line 206, in &lt;module&gt;
    generate_from_specification(**options)
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py&quot;, line 128, in generate_from_specification
    load_specification(protocol, primary_specification_filepath, isSupplemental=False)
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py&quot;, line 121, in load_specification
    protocol.parse_specification(parsed_json, isSupplemental)
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py&quot;, line 290, in parse_specification
    self.parse_domain(domain, isSupplemental)
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py&quot;, line 303, in parse_domain
    types.extend([self.parse_type_declaration(declaration) for declaration in json[&apos;types&apos;]])
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py&quot;, line 335, in parse_type_declaration
    duplicate_names = find_duplicates([member.member_name for member in type_members])
  File &quot;/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py&quot;, line 38, in find_duplicates
    return [key for key, count in collections.Counter(l).items() if count &gt; 1]
AttributeError: &apos;module&apos; object has no attribute &apos;Counter&apos;
ninja: build stopped: subcommand failed.


The failure is because of http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py?rev=179246#L38 that was introduced on r178599 &lt;http://trac.webkit.org/r178599&gt;

collections.Counter is new on python2.7 (is not available for 2.6): https://docs.python.org/2/library/collections.html

Python 2.7 was released 5 years ago, so any distribution that don&apos;t has it available probably has bigger problems to compile WebKit than the python version (like compiler or library versions).

Also, after r174102 &lt;http://trac.webkit.org/r174102&gt; the Tools require 2.7 for the minimum version of python.

It was also discussed on the mailing lists that we will start requiring python 2.7:

&gt; Discussion about requiring python 2.7 for build and test machines, without any objection:
&gt; https://lists.webkit.org/pipermail/webkit-dev/2014-September/026863.html

So I think we should define 2.7 also as minimum requirement for CMake also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064890</commentid>
    <comment_count>1</comment_count>
      <attachid>245541</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-01-28 07:43:10 -0800</bug_when>
    <thetext>Created attachment 245541
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064903</commentid>
    <comment_count>2</comment_count>
      <attachid>245541</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-01-28 08:30:33 -0800</bug_when>
    <thetext>Comment on attachment 245541
Patch

Clearing flags on attachment: 245541

Committed r179251: &lt;http://trac.webkit.org/changeset/179251&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1064904</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-01-28 08:30:37 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>245541</attachid>
            <date>2015-01-28 07:43:10 -0800</date>
            <delta_ts>2015-01-28 08:30:33 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-140997-20150128164314.patch</filename>
            <type>text/plain</type>
            <size>1121</size>
            <attacher name="Carlos Alberto Lopez Perez">clopez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTc5MjUwCmRpZmYgLS1naXQgYS9DTWFrZUxpc3RzLnR4dCBi
L0NNYWtlTGlzdHMudHh0CmluZGV4IGVmMTdkYzdmOWIxYzM4NjMyMWI3YzI2ZGEzMDg3NjNi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