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. Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler
Servers for Qt installer are currently down

Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
buildqt6mingw 64 bit
19 Posts 4 Posters 4.6k 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.
  • K Offline
    K Offline
    kyrlon
    wrote on 13 Mar 2024, 20:05 last edited by kyrlon
    #9

    Attempt # 7 for building on windows

    Decided to use ninja that had fix in it, so I compiled from source on windows and replaced with new ninja in PATH

    1. Cleared out the build folder and ran the configure.bat like the following:
    PS C:\Users\kyrlon\Downloads\qt-everywhere-src-6.6.2\build> ..\configure.bat
    
    1. Ran the command cmake --build . --parallel
      Got another output fail due to missing header:
    C:/Users/kyrlon/Downloads/qt-everywhere-src-6.6.2/qtmultimedia/src/multimedia/windows/qwindowsmediadevices_p.h:19:10: fatal error: qplatformmediadevices_p.h: No such file or directory
       19 | #include <qplatformmediadevices_p.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    

    Attempt # 8 for building on windows [SUCCESS!!]

    Trying the suggestion by Christian Ehrlicher, and decided to build in the C:\ path directly, but this required a terminal with ADMIN priv.

    1. Cleared out the build folder and ran the configure.bat like the following:
    PS C:\qt6\build> ..\configure.bat
    
    1. Ran the command cmake --build . --parallel
      SUCCESS!
    2. Ran the command:
    PS C:\qt6\build> cmake --install .
    

    No issues and everything was installed.

    This attempt appears to be successful, but I'm not sure if trying to build from source every time from different machines would allow me to always have access to C:\.

    J 1 Reply Last reply 14 Mar 2024, 06:46
    0
    • K kyrlon
      13 Mar 2024, 20:05

      Attempt # 7 for building on windows

      Decided to use ninja that had fix in it, so I compiled from source on windows and replaced with new ninja in PATH

      1. Cleared out the build folder and ran the configure.bat like the following:
      PS C:\Users\kyrlon\Downloads\qt-everywhere-src-6.6.2\build> ..\configure.bat
      
      1. Ran the command cmake --build . --parallel
        Got another output fail due to missing header:
      C:/Users/kyrlon/Downloads/qt-everywhere-src-6.6.2/qtmultimedia/src/multimedia/windows/qwindowsmediadevices_p.h:19:10: fatal error: qplatformmediadevices_p.h: No such file or directory
         19 | #include <qplatformmediadevices_p.h>
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      

      Attempt # 8 for building on windows [SUCCESS!!]

      Trying the suggestion by Christian Ehrlicher, and decided to build in the C:\ path directly, but this required a terminal with ADMIN priv.

      1. Cleared out the build folder and ran the configure.bat like the following:
      PS C:\qt6\build> ..\configure.bat
      
      1. Ran the command cmake --build . --parallel
        SUCCESS!
      2. Ran the command:
      PS C:\qt6\build> cmake --install .
      

      No issues and everything was installed.

      This attempt appears to be successful, but I'm not sure if trying to build from source every time from different machines would allow me to always have access to C:\.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 14 Mar 2024, 06:46 last edited by
      #10

      @kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

      allow me to always have access to C:.

      You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 2 Replies Last reply 14 Mar 2024, 21:56
      0
      • J jsulm
        14 Mar 2024, 06:46

        @kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

        allow me to always have access to C:.

        You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER

        K Offline
        K Offline
        kyrlon
        wrote on 14 Mar 2024, 21:56 last edited by
        #11

        @jsulm Good point. In general, I am aware that this is a Windows problem, but tampering with registry keys to disable the character path limit is not the ideal solution for different systems in use. Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?

        J C 2 Replies Last reply 15 Mar 2024, 06:34
        0
        • K kyrlon
          14 Mar 2024, 21:56

          @jsulm Good point. In general, I am aware that this is a Windows problem, but tampering with registry keys to disable the character path limit is not the ideal solution for different systems in use. Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 15 Mar 2024, 06:34 last edited by
          #12

          @kyrlon Too long paths is a Windows limitation

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          C 1 Reply Last reply 15 Mar 2024, 08:41
          0
          • K kyrlon
            14 Mar 2024, 21:56

            @jsulm Good point. In general, I am aware that this is a Windows problem, but tampering with registry keys to disable the character path limit is not the ideal solution for different systems in use. Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 15 Mar 2024, 06:38 last edited by
            #13

            @kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

            Since I don't do much development on Windows, I was just wondering if this was a gcc or cmake limitation?

            Because the path is to long. Use a shorter source and build path and blame MS

            Already answered two days ago...

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • J jsulm
              15 Mar 2024, 06:34

              @kyrlon Too long paths is a Windows limitation

              C Offline
              C Offline
              cristian-adam
              wrote on 15 Mar 2024, 08:41 last edited by
              #14

              @jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

              Too long paths is a Windows limitation

              Not quite. Windows has support for long paths (>255 characters) since Windows 10 version 1607 released on August 2015.

              But the applications need to opt-in in order to use the new functionality.

              It's a tooling problem:

              • Ninja - Is fixed but waiting for an official release (1.12)
              • GCC - Not fixed.
              • Visual C++ - Not fixed.
              • moc - Fixed since Qt 6.5.
              • make - Not fixed, but forgot to open a bug report.
              • clang - Works out of the box.
              • cmake - Works out of the box.

              So on Windows if you take llvm-mingw and a patched ninja you would be able to compile with clang and Qt 6.5+ just fine.

              J K 2 Replies Last reply 15 Mar 2024, 09:21
              3
              • C cristian-adam
                15 Mar 2024, 08:41

                @jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

                Too long paths is a Windows limitation

                Not quite. Windows has support for long paths (>255 characters) since Windows 10 version 1607 released on August 2015.

                But the applications need to opt-in in order to use the new functionality.

                It's a tooling problem:

                • Ninja - Is fixed but waiting for an official release (1.12)
                • GCC - Not fixed.
                • Visual C++ - Not fixed.
                • moc - Fixed since Qt 6.5.
                • make - Not fixed, but forgot to open a bug report.
                • clang - Works out of the box.
                • cmake - Works out of the box.

                So on Windows if you take llvm-mingw and a patched ninja you would be able to compile with clang and Qt 6.5+ just fine.

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 15 Mar 2024, 09:21 last edited by
                #15

                @cristian-adam said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

                But the applications need to opt-in in order to use the new functionality

                Well, yes. But you can also see it as on OS problem if user has to do something special just to be able to use long paths. And I think this is a system wide setting and not per-application.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • C cristian-adam
                  15 Mar 2024, 08:41

                  @jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

                  Too long paths is a Windows limitation

                  Not quite. Windows has support for long paths (>255 characters) since Windows 10 version 1607 released on August 2015.

                  But the applications need to opt-in in order to use the new functionality.

                  It's a tooling problem:

                  • Ninja - Is fixed but waiting for an official release (1.12)
                  • GCC - Not fixed.
                  • Visual C++ - Not fixed.
                  • moc - Fixed since Qt 6.5.
                  • make - Not fixed, but forgot to open a bug report.
                  • clang - Works out of the box.
                  • cmake - Works out of the box.

                  So on Windows if you take llvm-mingw and a patched ninja you would be able to compile with clang and Qt 6.5+ just fine.

                  K Offline
                  K Offline
                  kyrlon
                  wrote on 15 Mar 2024, 17:53 last edited by
                  #16

                  @cristian-adam

                  Attempt # 9 for building on windows

                  Tried your suggestion, but got the same error of missing file of qplatformmediadevices_p.h

                  1. Cleared out the build folder and ran the configure.bat like the following:
                  PS C:\qt6\build> ..\configure.bat
                  
                  1. Ran the command cmake --build . --parallel

                  Buikld stop with missing header file: https://pastebin.com/AZ7zDM2d

                  I used the version of llvm-mingw:

                  version of ninja used:

                  PS C:\Users\kyrlon\Downloads\qt-everywhere-src-6.6.2\build> ninja --version
                  1.12.0.git
                  
                  C 1 Reply Last reply 17 Mar 2024, 13:45
                  1
                  • J jsulm
                    14 Mar 2024, 06:46

                    @kyrlon said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

                    allow me to always have access to C:.

                    You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER

                    K Offline
                    K Offline
                    kyrlon
                    wrote on 16 Mar 2024, 15:37 last edited by
                    #17

                    @jsulm said in Failing to build Qt 6.6.2 from source on Windows 10 with MinGW64 compiler:

                    You can also build in your user home folder like c:\users\USER_NAME\QT_BUILD_FOLDER

                    Another alternative is to use a virtual drive using the subst command. I might make this attempt later.

                    1 Reply Last reply
                    0
                    • K kyrlon
                      15 Mar 2024, 17:53

                      @cristian-adam

                      Attempt # 9 for building on windows

                      Tried your suggestion, but got the same error of missing file of qplatformmediadevices_p.h

                      1. Cleared out the build folder and ran the configure.bat like the following:
                      PS C:\qt6\build> ..\configure.bat
                      
                      1. Ran the command cmake --build . --parallel

                      Buikld stop with missing header file: https://pastebin.com/AZ7zDM2d

                      I used the version of llvm-mingw:

                      version of ninja used:

                      PS C:\Users\kyrlon\Downloads\qt-everywhere-src-6.6.2\build> ninja --version
                      1.12.0.git
                      
                      C Offline
                      C Offline
                      cristian-adam
                      wrote on 17 Mar 2024, 13:45 last edited by
                      #18

                      @kyrlon thank you for trying out llvm-mingw.

                      I'll have a look at this since from my point of view all of the tools should allow for long paths.

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kyrlon
                        wrote on 3 Apr 2024, 04:22 last edited by
                        #19

                        Attempt # 10 for building on windows [SUCCESS!!]

                        Started from scratch by re-downloading the source and used the subst command to make a new path to build with.

                        1. Created a virtual drive to avoid the PATH length limit:
                        subst a: .\qt-everywhere-src-6.6.2\
                        
                        1. created the build folder and ran the configure.bat like the following:
                        PS a:\build> ..\configure.bat
                        
                        1. Ran the command cmake --build . --parallel

                        2. Ran the install command afterwards

                        PS a:\build> cmake --build . --parallel
                        

                        No issues and everything was installed.

                        1 Reply Last reply
                        0
                        • CesarC Cesar referenced this topic on 16 May 2024, 20:41

                        • Login

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