Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. 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

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

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 4 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    odelaune
    wrote on 13 Jul 2022, 13:25 last edited by
    #1

    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?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mac_
      wrote on 2 Aug 2022, 17:24 last edited by
      #2

      Do you have python2 installed and did you use update-alternatives to set the OS to use python2? That's what I had to do to get past that error.

      1 Reply Last reply
      0
      • O Offline
        O Offline
        odelaune
        wrote on 16 Aug 2022, 08:34 last edited by odelaune
        #3

        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?

        S 1 Reply Last reply 25 Sept 2022, 15:36
        0
        • O odelaune
          16 Aug 2022, 08:34

          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?

          S Offline
          S Offline
          svatyvabin
          wrote on 25 Sept 2022, 15:36 last edited by
          #4

          @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
          change defualt=False to default=True in line 19.

          K 1 Reply Last reply 31 Oct 2022, 13:00
          2
          • S svatyvabin
            25 Sept 2022, 15:36

            @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
            change defualt=False to default=True in line 19.

            K Offline
            K Offline
            Krogoth
            wrote on 31 Oct 2022, 13:00 last edited by
            #5

            @svatyvabin Thanks! This also worked for me!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved