Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building Qt 5.15.16 from source
Forum Updated to NodeBB v4.3 + New Features

Building Qt 5.15.16 from source

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 1.0k 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.
  • P Offline
    P Offline
    Pouriya
    wrote on last edited by
    #1

    I tried to build Qt 5.15.16 from source on Windows 10 with MinGW 8.1.0 64-bit.
    after some time I get this error:

    Capture.JPG

    Is it a bug in Qt or in Mingw?

    1 Reply Last reply
    0
    • piervalliP Offline
      piervalliP Offline
      piervalli
      wrote on last edited by
      #6

      The build with Mingw 8.1 works with 5.15.16
      There was a post with binary 10 days ago.
      https://bin.ceicer.com/qt/ . Probably there is missing requires.

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

        Hi,

        Usually, when a compiler crashes, it means there's an issue with the compiler.

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

        P 1 Reply Last reply
        2
        • SGaistS SGaist

          Hi,

          Usually, when a compiler crashes, it means there's an issue with the compiler.

          P Offline
          P Offline
          Pouriya
          wrote on last edited by
          #3

          @SGaist Hi,
          In this url it is mentioned that Qt 5.15 is compatible with Mingw 8.1.0:
          https://wiki.qt.io/MinGW
          If there is a bug in the compiler how the previous Qt binaries were built? like Qt 5.15.2 which was available in the online installer.

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

            You realise that between 5.15.2 and 5.15.16 there are 14 patch releases that have occurred ?
            I don't know which version of MinGW is used to provide the commercial binaries but it's likely a more recent one.
            You can check the bug report system to see if there's something related to such a crash.

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

            P 1 Reply Last reply
            1
            • SGaistS SGaist

              You realise that between 5.15.2 and 5.15.16 there are 14 patch releases that have occurred ?
              I don't know which version of MinGW is used to provide the commercial binaries but it's likely a more recent one.
              You can check the bug report system to see if there's something related to such a crash.

              P Offline
              P Offline
              Pouriya
              wrote on last edited by Pouriya
              #5

              @SGaist
              Yes, I understand but I mean if the url says that mingw 8.1 is for qt 5.15, is it possible to become incompatible after some patches?

              1 Reply Last reply
              0
              • piervalliP Offline
                piervalliP Offline
                piervalli
                wrote on last edited by
                #6

                The build with Mingw 8.1 works with 5.15.16
                There was a post with binary 10 days ago.
                https://bin.ceicer.com/qt/ . Probably there is missing requires.

                P 1 Reply Last reply
                2
                • piervalliP Offline
                  piervalliP Offline
                  piervalli
                  wrote on last edited by
                  #7

                  To build with Qt install Jenkins CI/CD, it saves all logs, some time errors should be before.

                  1 Reply Last reply
                  0
                  • piervalliP piervalli

                    The build with Mingw 8.1 works with 5.15.16
                    There was a post with binary 10 days ago.
                    https://bin.ceicer.com/qt/ . Probably there is missing requires.

                    P Offline
                    P Offline
                    Pouriya
                    wrote on last edited by
                    #8

                    @piervalli Hi, thanks for your help. The openssl was missing.
                    Now I could build both x86 and x64 version of Qt with Mingw 8.1.
                    But there is a problem that I couldn't figure out.
                    When I call x64 version of windeployqt, it copies the libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll from 64-bit mingw folder which is ok, but when I call x86 version of windeployqt it copies the same mentioned libraries instead of 32-bit version of libgcc_s_dw2-1.dll, libstdc++-6.dll and libwinpthread-1.dll to the folder of .exe file.

                    B 1 Reply Last reply
                    0
                    • P Pouriya has marked this topic as solved on
                    • P Pouriya

                      @piervalli Hi, thanks for your help. The openssl was missing.
                      Now I could build both x86 and x64 version of Qt with Mingw 8.1.
                      But there is a problem that I couldn't figure out.
                      When I call x64 version of windeployqt, it copies the libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll from 64-bit mingw folder which is ok, but when I call x86 version of windeployqt it copies the same mentioned libraries instead of 32-bit version of libgcc_s_dw2-1.dll, libstdc++-6.dll and libwinpthread-1.dll to the folder of .exe file.

                      B Offline
                      B Offline
                      Bonnie
                      wrote on last edited by Bonnie
                      #9

                      @Pouriya From checking the source code of winployqt tool:

                      static QStringList compilerRunTimeLibs(const QString &qtBinDir, Platform platform, bool isDebug, unsigned short machineArch)
                          {
                              QStringList result;
                              switch (platform) {
                              case WindowsDesktopMinGW: {
                                  const QStringList minGWRuntimes = { "*gcc_"_L1, "*stdc++"_L1, "*winpthread"_L1 };
                                  result.append(findMinGWRuntimePaths(qtBinDir, platform, minGWRuntimes));
                                  break;
                              }
                          ......
                      
                      static QStringList findMinGWRuntimePaths(const QString &qtBinDir, Platform platform, const QStringList &runtimeFilters)
                      {
                          //MinGW: Add runtime libraries. Check first for the Qt binary directory, and default to path if nothing is found.
                          QStringList result;
                          const bool isClang = platform == WindowsDesktopClangMinGW;
                          QStringList filters;
                          const QString suffix = u'*' + sharedLibrarySuffix();
                          for (const auto &minGWRuntime : runtimeFilters)
                              filters.append(minGWRuntime + suffix);
                      
                          QFileInfoList dlls = QDir(qtBinDir).entryInfoList(filters, QDir::Files);
                          if (dlls.isEmpty()) {
                              std::wcerr << "Warning: Runtime libraries not found in Qt binary folder, defaulting to looking in path\n";
                              const QString binaryPath = isClang ? findInPath("clang++.exe"_L1) : findInPath("g++.exe"_L1);
                              if (binaryPath.isEmpty()) {
                                  std::wcerr << "Warning: Cannot find " << (isClang ? "Clang" : "GCC") << " installation directory, " << (isClang ? "clang++" : "g++") << ".exe must be in the path\n";
                                  return {};
                              }
                              const QString binaryFolder = QFileInfo(binaryPath).absolutePath();
                              dlls = QDir(binaryFolder).entryInfoList(filters, QDir::Files);
                          }
                      
                          for (const QFileInfo &dllFi : dlls)
                              result.append(dllFi.absoluteFilePath());
                      
                          return result;
                      }
                      

                      So it just searches for filename matches "*gcc_*.dll" from qt bin folder (or the PATH), not from corresponding mingw folder.

                      1 Reply Last reply
                      0
                      • piervalliP Offline
                        piervalliP Offline
                        piervalli
                        wrote on last edited by
                        #10

                        Removed mingw32 from path is not necessary to build with Qt.

                        create a file deploy64.bat
                        PATH=%PATH%;C:\Qt\Tools\mingw810_64\bin

                        end the corrisponding for 32bit
                        create a file deploy32.bat
                        PATH=%PATH%;C:\Qt\Tools\mingw810_..

                        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