Qt 5.15.5 compilation failure on Ubuntu 22.04: FAILED: gen/content/browser/tracing/about_tracing.js gen/content/browser/tracing/about_tracing.html
Unsolved
Installation and Deployment
-
On Ubuntu 22.04, I try to compile Qt 5.15.5 from sources. I get this error when Qt is compiling QtWebEngine
[299/18556] /usr/bin/python2 ../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents --outdir gen/content/browser/tracing FAILED: gen/content/browser/tracing/about_tracing.js gen/content/browser/tracing/about_tracing.html /usr/bin/python2 ../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents --outdir gen/content/browser/tracing Traceback (most recent call last): File "../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents", line 14, in <module> sys.exit(generate_about_tracing_contents.Main(sys.argv[1:])) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py", line 46, in Main minify=not args.no_min) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 287, in GenerateStandaloneHTMLToFile module.AppendHTMLContentsToFile(output_file, controller, minify=minify) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_module.py", line 72, in AppendHTMLContentsToFile for piece in self._parser_results.YieldHTMLInPieces(ctl, minify=minify): File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py", line 198, in YieldHTMLInPieces yield self.GenerateHTML(controller, minify) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py", line 242, in GenerateHTML html = controller.GetHTMLForStylesheetHRef(stylesheet_link['href']) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 282, in GetHTMLForStylesheetHRef text = _MinifyCSS(text) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 210, in _MinifyCSS stderr=subprocess.PIPE) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
Does anyone know how to fix that?
-
Because I have no root right on my machine, here is how I do
- create $HOME/bin/python with this content
#!/bin/sh /usr/bin/python2.7
- make it exectuable using
chmod +x $HOME/bin/python
- add $HOME/bin in $PATH by adding the following in ~/.bash_aliases
export PATH=$HOME/bin:$PATH
Then, I restart the compilation and here is what I get (a new error):
[25/15743] /usr/bin/python2 ../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents --outdir gen/content/browser/tracing FAILED: gen/content/browser/tracing/about_tracing.js gen/content/browser/tracing/about_tracing.html /usr/bin/python2 ../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents --outdir gen/content/browser/tracing rCSSmin exited with error code 1 File "<stdin>", line 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. ^ SyntaxError: invalid syntax Traceback (most recent call last): File "../../3rdparty/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents", line 14, in <module> sys.exit(generate_about_tracing_contents.Main(sys.argv[1:])) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py", line 46, in Main minify=not args.no_min) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 309, in GenerateStandaloneHTMLToFile module.AppendHTMLContentsToFile(output_file, controller, minify=minify) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_module.py", line 72, in AppendHTMLContentsToFile for piece in self._parser_results.YieldHTMLInPieces(ctl, minify=minify): File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py", line 198, in YieldHTMLInPieces yield self.GenerateHTML(controller, minify) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py", line 242, in GenerateHTML html = controller.GetHTMLForStylesheetHRef(stylesheet_link['href']) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 304, in GetHTMLForStylesheetHRef text = _MinifyCSS(text) File "/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py", line 238, in _MinifyCSS raise Exception('Failed to generate css for %s.' % css_text) Exception: Failed to generate css for /* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ .track-button { background-color: rgba(255, 255, 255, 0.5); border: 1px solid rgba(0, 0, 0, 0.1); color: rgba(0,0,0,0.2); font-size: 10px; height: 12px; text-align: center; width: 12px; } .track-button:hover { background-color: rgba(255, 255, 255, 1.0); border: 1px solid rgba(0, 0, 0, 0.5); box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 1); } .track-close-button { left: 2px; position: absolute; top: 2px; } .track-collapse-button { left: 3px; position: absolute; top: 2px; } .
It seems that rcssmin.py (in py_vulcanize/third_party/rcssmin/) is boggued. Any idea?
-
@odelaune I had the same error while add python to PATH and rebuild.
this error solution is ignore this build.
edit file/home/odelaune/qt-everywhere-src-5.15.5/qtwebengine/src/3rdparty/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py
changedefualt=False
todefault=True
in line 19. -
@svatyvabin Thanks! This also worked for me!