Trying to build the current dev branch (with 67-based) on Archlinux (which has Python 3 as /usr/bin/python) fails:
[124/124] LINK ./gn ERROR at //build/util/branding.gni:26:11: Script returned non-zero exit code. _result = exec_script("version.py", ^---------- Current dir: /home/florian/code/qt/dev/qtwebengine/src/3rdparty/chromium/tools/gn/out/Release/ Command: python -- /home/florian/code/qt/dev/qtwebengine/src/3rdparty/chromium/build/util/version.py -f ../../../../chrome/app/theme/chromium/BRANDING -t full_name = "@PRODUCT_FULLNAME@" short_name = "@PRODUCT_SHORTNAME@" bundle_id = "@MAC_BUNDLE_ID@" creator_code = "@MAC_CREATOR_CODE@" installer_full_name = "@PRODUCT_INSTALLER_FULLNAME@" installer_short_name = "@PRODUCT_INSTALLER_SHORTNAME@" Returned 1. stderr: File "/home/florian/code/qt/dev/qtwebengine/src/3rdparty/chromium/build/util/version.py", line 71 print repr(key), repr(val) ^ SyntaxError: invalid syntax See //ui/base/BUILD.gn:10:1: whence it was imported. import("//build/util/branding.gni") ^--------------------------------- See //BUILD.gn:74:5: which caused the file to be included. "//ui/base:ui_base_unittests", ^---------------------------- Command '['/home/florian/code/qt/dev/qtwebengine/src/3rdparty/chromium/tools/gn/out/Release/gn', 'gen', '/home/florian/code/qt/dev/qtwebengine/src/3rdparty/chromium/tools/gn/out/Release', '--args=use_qt=true is_component_build=false is_shared=true enable_nacl=false enable_remoting=false enable_reporting=false enable_web_speech=false enable_widevine=true use_allocator_shim=false use_allocator="none" v8_use_external_startup_data=false treat_warnings_as_errors=false enable_swiftshader=false use_custom_libcxx=false use_jumbo_build=true jumbo_file_merge_limit=8 jumbo_build_excluded=["browser","renderer"] enable_basic_printing=true enable_print_preview=true enable_pdf=true enable_plugins=true enable_spellcheck=true enable_webrtc=true proprietary_codecs=true ffmpeg_branding="Chrome" enable_precompiled_headers=true is_debug=false symbol_level=0 remove_webcore_debug_symbols=true remove_v8base_debug_symbols=true v8_use_snapshot=true enable_iterator_debugging=false use_cups=false use_gio=false use_gnome_keyring=false use_kerberos=false linux_use_bundled_binutils=false use_udev=true use_bundled_fontconfig=false is_clang=false custom_toolchain="/home/florian/code/qt/dev/qtwebengine/src/toolchain:host" host_cpu="x64" use_glib=false use_sysroot=false enable_session_service=false toolkit_views=false is_debug=false']' returned non-zero exit status 1 Project ERROR: GN build error! make[3]: *** [Makefile:96: sub-gn-pro-make_first] Error 3 make[3]: Leaving directory '/home/florian/code/qt/dev/qtwebengine/src/buildtools'
Possible solution which would still behave the same on Python 2 has slightly different output on Python 2, but this is debug output anyways I think?
diff --git a/chromium/build/util/version.py b/chromium/build/util/version.py index 767412e93d..704e826488 100755 --- a/chromium/build/util/version.py +++ b/chromium/build/util/version.py @@ -68,7 +68,7 @@ def subst_template(contents, values): try: contents = contents.replace('@' + key + '@', val) except TypeError: - print repr(key), repr(val) + print(repr(key), repr(val)) return contents
Not sure how this is handled for the other scripts (which seem to work fine).
For Gerrit Dashboard: QTBUG-69145 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
233999,3 | FIXUP: gn-build gn with exactly the python it was bootstrapped with | 67-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |