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. Trying to build Qt 5.5.1 on Ubuntu 18.04
Forum Updated to NodeBB v4.3 + New Features

Trying to build Qt 5.5.1 on Ubuntu 18.04

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
ubuntu 18.045.5.1
8 Posts 4 Posters 2.7k Views 2 Watching
  • 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.
  • M Offline
    M Offline
    mastroj
    wrote on last edited by mastroj
    #1

    Hello everyone.

    Sorry for the over-abused question but I'm not able to successfully build Qt 5.5.1 on my Ubuntu 18.04 laptop (I need this specific version because of dependencies with other software).

    System configuration:

    • Ubuntu 18.04.2 LTS bionic
    • gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
    • GNU Make 4.1 built for x86_64-pc-linux-gnu
    • Postgres 9.6.2 (libs)
    • Qt 5.5.1
    • OpenSSL 1.0.2r
    • No leveldb folder under qtwebkit/Tools/qmake/config.tests
    • Using make -j4
    • Python 2.7.15rc1 [GCC 7.3.0]

    Configure settings:

    ./configure -opensource -confirm-license -qt-sql-psql -qt-sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -release -nomake examples -nomake tests -openssl -I /usr/local/ssl/include -L /usr/local/ssl/lib -I /usr/local/postgres/9.6.12/include -L /usr/local/postgres/9.6.12/lib -qt-xcb -no-use-gold-linker
    

    Error:

    API/JSStringRef.cpp: In function ‘OpaqueJSString* JSStringCreateWithCharacters(const JSChar*, size_t)’:
    API/JSStringRef.cpp:40:50: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive]
         return OpaqueJSString::create(chars, numChars).leakRef();
                                                      ^
    In file included from API/JSStringRef.cpp:31:0:
    API/OpaqueJSString.h:49:39: note:   initializing argument 1 of ‘static WTF::PassRefPtr<OpaqueJSString> OpaqueJSString::create(const UChar*, unsigned int)’
         static PassRefPtr<OpaqueJSString> create(const UChar* characters, unsigned length)
                                           ^~~~~~
    API/JSStringRef.cpp: In function ‘OpaqueJSString* JSStringCreateWithCharactersNoCopy(const JSChar*, size_t)’:
    API/JSStringRef.cpp:65:125: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive]
         return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
                                                                                                                                 ^
    In file included from ../WTF/wtf/text/WTFString.h:29:0,
                     from API/OpaqueJSString.h:30,
                     from API/JSStringRef.cpp:31:
    ../WTF/wtf/text/StringImpl.h:431:57: note:   initializing argument 1 of ‘static WTF::PassRefPtr<WTF::StringImpl> WTF::StringImpl::createWithoutCopying(const UChar*, unsigned int, WTF::HasTerminatingNullCharacter)’
         WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> createWithoutCopying(const UChar* characters, unsigned length, HasTerminatingNullCharacter);
                                                             ^~~~~~~~~~~~~~~~~~~~
    API/JSStringRef.cpp: In function ‘const JSChar* JSStringGetCharactersPtr(JSStringRef)’:
    API/JSStringRef.cpp:86:30: error: invalid conversion from ‘const UChar* {aka const char16_t*}’ to ‘const JSChar* {aka const short unsigned int*}’ [-fpermissive]
         return string->characters();
                ~~~~~~~~~~~~~~~~~~^~
    make[3]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit/Source/JavaScriptCore'
    Makefile.JavaScriptCore:98: recipe for target 'sub-Target-pri-make_first-ordered' failed
    make[2]: *** [sub-Target-pri-make_first-ordered] Error 2
    make[2]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit/Source/JavaScriptCore'
    Makefile:93: recipe for target 'sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered' failed
    make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered] Error 2
    make[1]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit'
    Makefile:490: recipe for target 'module-qtwebkit-make_first' failed
    make: *** [module-qtwebkit-make_first] Error 2
    

    Extra question(s): are there any know issues by using make -jX? can warnings be disabled? (using -w does nothing)

    I'm out of ideas, any thoughts?

    Thanks in advance.

    Further investigations:

    #1 Maybe it's something related to ICU but I'm still not sure.
    #2 Applied patch found in QTBUG-35971 to no avail
    #3 Applied patch found here.. testing
    #4 Compiled with no errors with the aforementioned patch, but getting errors on install (see post)

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome to the forums
      Yes. Seems to something with ICU
      https://bugreports.qt.io/browse/QTBUG-35971
      and webkit

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mastroj
        wrote on last edited by mastroj
        #3

        Tried to apply the patch but it didn't work unfortunately.

        Just for reference

        • libicu-dev is already the newest version (60.2-3ubuntu3)
        • icu-devtools is already the newest version (60.2-3ubuntu3)

        Further updates added to original post.

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          Before losing too much time with it, do you really need to build QtWebkit ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • M Offline
            M Offline
            mastroj
            wrote on last edited by mastroj
            #5

            Hi, yes, I need QtWebkit. :(

            Small update: I applied the patch mentioned in the original post and it compiled with no errors.

            Unfortunately after launching make install I get the following errors

            compiler_version.py failed to execute: c++ -dumpversion
            'NoneType' object has no attribute 'group'
            Exception: Failed to extract compiler version for args: ['host', 'compiler']
            Traceback (most recent call last):
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 484, in CallLoadTargetBuildFile
                includes, depth, check, False)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile
                build_file_data, PHASE_EARLY, variables, build_file_path)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1193, in ProcessVariablesAndConditionsInDict
                variables, build_file, 'variables')
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict
                ProcessConditionsInDict(the_dict, phase, variables, build_file)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict
                variables, build_file)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict
                ProcessConditionsInDict(the_dict, phase, variables, build_file)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict
                variables, build_file)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1200, in ProcessVariablesAndConditionsInDict
                expanded = ExpandVariables(value, phase, variables, build_file)
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 897, in ExpandVariables
                replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
              File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/build/compiler_version.py", line 122, in DoMain
                raise Exception("Failed to extract compiler version for args: %s" % args)
            Exception: Failed to extract compiler version for args: ['host', 'compiler']
            
            Project ERROR: -- running gyp_qtwebengine failed --
            Makefile:71: recipe for target 'sub-gyp_run-pro-install_subtargets' failed
            make[3]: *** [sub-gyp_run-pro-install_subtargets] Error 3
            make[3]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/core'
            Makefile:60: recipe for target 'sub-core-install_subtargets' failed
            make[2]: *** [sub-core-install_subtargets] Error 2
            make[2]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src'
            Makefile:56: recipe for target 'sub-src-install_subtargets' failed
            make[1]: *** [sub-src-install_subtargets] Error 2
            make[1]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine'
            Makefile:815: recipe for target 'module-qtwebengine-install_subtargets' failed
            make: *** [module-qtwebengine-install_subtargets] Error 2
            
            

            Seems something related to Python. For reference I'm using Python 2.7.15rc1 [GCC 7.3.0].

            A 1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              That's QtWebEngine that is failing. Which module do you need ? QtWebkit or QtWebEngine ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • M Offline
                M Offline
                mastroj
                wrote on last edited by mastroj
                #7

                I think I can probably skip it. I'm going to clean up everything, re-configure skipping QtWebEngine and try re-compiling.

                1 Reply Last reply
                0
                • M mastroj

                  Hi, yes, I need QtWebkit. :(

                  Small update: I applied the patch mentioned in the original post and it compiled with no errors.

                  Unfortunately after launching make install I get the following errors

                  compiler_version.py failed to execute: c++ -dumpversion
                  'NoneType' object has no attribute 'group'
                  Exception: Failed to extract compiler version for args: ['host', 'compiler']
                  Traceback (most recent call last):
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 484, in CallLoadTargetBuildFile
                      includes, depth, check, False)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile
                      build_file_data, PHASE_EARLY, variables, build_file_path)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1193, in ProcessVariablesAndConditionsInDict
                      variables, build_file, 'variables')
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict
                      ProcessConditionsInDict(the_dict, phase, variables, build_file)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict
                      variables, build_file)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict
                      ProcessConditionsInDict(the_dict, phase, variables, build_file)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict
                      variables, build_file)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1200, in ProcessVariablesAndConditionsInDict
                      expanded = ExpandVariables(value, phase, variables, build_file)
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 897, in ExpandVariables
                      replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
                    File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/build/compiler_version.py", line 122, in DoMain
                      raise Exception("Failed to extract compiler version for args: %s" % args)
                  Exception: Failed to extract compiler version for args: ['host', 'compiler']
                  
                  Project ERROR: -- running gyp_qtwebengine failed --
                  Makefile:71: recipe for target 'sub-gyp_run-pro-install_subtargets' failed
                  make[3]: *** [sub-gyp_run-pro-install_subtargets] Error 3
                  make[3]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/core'
                  Makefile:60: recipe for target 'sub-core-install_subtargets' failed
                  make[2]: *** [sub-core-install_subtargets] Error 2
                  make[2]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src'
                  Makefile:56: recipe for target 'sub-src-install_subtargets' failed
                  make[1]: *** [sub-src-install_subtargets] Error 2
                  make[1]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine'
                  Makefile:815: recipe for target 'module-qtwebengine-install_subtargets' failed
                  make: *** [module-qtwebengine-install_subtargets] Error 2
                  
                  

                  Seems something related to Python. For reference I'm using Python 2.7.15rc1 [GCC 7.3.0].

                  A Offline
                  A Offline
                  Anselmo
                  wrote on last edited by
                  #8

                  @mastroj I met similar issue when building CEF(Chromium Embedded Framework). It uses compiler_version.py, too.
                  In my case, near line 54, the below source codes exist:

                  def GetVersion(compiler, tool):
                    tool_output = tool_error = None
                    cache_key = (compiler, tool)
                    cached_version = compiler_version_cache.get(cache_key)
                    if cached_version:
                      return cached_version
                    try:
                      # Note that compiler could be something tricky like "distcc g++".
                      if tool == "compiler":
                        compiler = compiler + " -dumpversion"
                        # 4.6
                        version_re = re.compile(r"(\d+)\.(\d+)")
                  

                  Maybe, from g++(or gcc) version 7, -dumpversion option shows only major version such as 7, so that the regular expression of compiler_version.py raises an exception because it expects the version including minor one.
                  So, I modified the option from -dumpversion to -dumpfullversion, and then it works well.

                  1 Reply Last reply
                  1

                  • Login

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