RESOLVED FIXED 140997
[CMake] Minimum python version should be 2.7
https://bugs.webkit.org/show_bug.cgi?id=140997
Summary [CMake] Minimum python version should be 2.7
Carlos Alberto Lopez Perez
Reported 2015-01-28 07:38:21 PST
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 "5.20.1", minimum required is "5.10.0") -- Found PythonInterp: /usr/bin/python2.6 (found suitable version "2.6.8", minimum required is "2.6.0") -- Found Ruby: /usr/bin/ruby1.8 (found suitable version "1.8.7", minimum required is "1.8.7") [...] 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 && /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 && mkdir -p /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/inspector && 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 && mkdir -p /home/clopez/webkit/webkit/WebKitBuild/Release/DerivedSources/WebInspectorUI/UserInterface/Protocol && 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 "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py", line 206, in <module> generate_from_specification(**options) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py", line 128, in generate_from_specification load_specification(protocol, primary_specification_filepath, isSupplemental=False) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py", line 121, in load_specification protocol.parse_specification(parsed_json, isSupplemental) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py", line 290, in parse_specification self.parse_domain(domain, isSupplemental) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py", line 303, in parse_domain types.extend([self.parse_type_declaration(declaration) for declaration in json['types']]) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py", line 335, in parse_type_declaration duplicate_names = find_duplicates([member.member_name for member in type_members]) File "/home/clopez/webkit/webkit/Source/JavaScriptCore/inspector/scripts/codegen/models.py", line 38, in find_duplicates return [key for key, count in collections.Counter(l).items() if count > 1] AttributeError: 'module' object has no attribute 'Counter' 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 <http://trac.webkit.org/r178599> 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't has it available probably has bigger problems to compile WebKit than the python version (like compiler or library versions). Also, after r174102 <http://trac.webkit.org/r174102> 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: > Discussion about requiring python 2.7 for build and test machines, without any objection: > 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.
Attachments
Patch (1.09 KB, patch)
2015-01-28 07:43 PST, Carlos Alberto Lopez Perez
no flags
Carlos Alberto Lopez Perez
Comment 1 2015-01-28 07:43:10 PST
WebKit Commit Bot
Comment 2 2015-01-28 08:30:33 PST
Comment on attachment 245541 [details] Patch Clearing flags on attachment: 245541 Committed r179251: <http://trac.webkit.org/changeset/179251>
WebKit Commit Bot
Comment 3 2015-01-28 08:30:37 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.