Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Error on Qt 6 Building from source for Windows Based
Forum Updated to NodeBB v4.3 + New Features

Error on Qt 6 Building from source for Windows Based

Scheduled Pinned Locked Moved Solved Qt 6
59 Posts 9 Posters 18.9k Views 3 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.
  • L Lemat
    25 Jan 2021, 20:22

    i followed this link' instructions to build Qt 6.0.0 from qt-everywhere-src.zip, but i get these errors:
    https://doc.qt.io/qt-6/windows-building.html

    I am using MSVC 2019.

    error:

    C:\Qt\Qt-6>configure.bat -prefix c:\Qt\Qt6

    • cd qtbase

    • C:\Qt\Qt-6\qtbase\configure.bat -top-level -prefix c:\Qt\Qt6
      'C:/Program Files/CMake/bin/cmake.exe' '-DCMAKE_INSTALL_PREFIX=c://Qt//Qt6' '-G' 'Ninja' 'C:/Qt/Qt-6'
      -- The C compiler identification is MSVC 19.28.29336.0
      -- The ASM compiler identification is MSVC
      -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - broken
      CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
      The C compiler

      "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe"

      is not able to compile a simple test program.

      It fails with the following output:

      Change Dir: C:/Qt/Qt-6/CMakeFiles/CMakeTmp

      Run Build Command(s):C:/ninja-win/ninja.exe cmTC_00c4b && [1/2] Building C object CMakeFiles\cmTC_00c4b.dir\testCCompiler.c.obj
      [2/2] Linking C executable cmTC_00c4b.exe
      FAILED: cmTC_00c4b.exe
      cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_00c4b.dir --rc=rc --mt="" --manifests -- "C:\PROGRA~2\Microsoft Visual Studio\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe" /nologo CMakeFiles\cmTC_00c4b.dir\testCCompiler.c.obj /out:cmTC_00c4b.exe /implib:cmTC_00c4b.lib /pdb:cmTC_00c4b.pdb /version:0.0 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
      RC Pass 1: command "rc /fo CMakeFiles\cmTC_00c4b.dir/manifest.res CMakeFiles\cmTC_00c4b.dir/manifest.rc" failed (exit code 0) with the following output:
      Le fichier sp├®cifi├® est introuvable
      ninja: build -- Configuring incomplete, errors occurred!
      stopped: subcommand failed.

      CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
      CMakeLists.txt:11 (project)

    See also "C:/Qt/Qt-6/CMakeFiles/CMakeOutput.log".
    See also "C:/Qt/Qt-6/CMakeFiles/CMakeError.log".
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:788 (message):
    CMake exited with code 1.

    C:\Qt\Qt-6>

    P Offline
    P Offline
    Pablo J. Rogina
    wrote on 26 Jan 2021, 11:39 last edited by
    #12

    @Lemat said in Error on Qt 6 Building from source for Windows Based:

    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe

    I'm not very familiar with Windows build environment, but is that OK?
    I mean, it looks like the 64 bit version of cl.exe is being used, but it's strange that the Visual Studio installation went to the x86 folder, as a 32 bit application?

    Could you please describe your environment? i.e. Windows OS version and platform, same for Visual Studio.

    Upvote the answer(s) that helped you solve the issue
    Use "Topic Tools" button to mark your post as Solved
    Add screenshots via postimage.org
    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

    L 1 Reply Last reply 26 Jan 2021, 11:46
    0
    • L Offline
      L Offline
      Lemat
      wrote on 26 Jan 2021, 11:39 last edited by Lemat
      #13

      @jsulm
      owww !!, that is the CXX variable i set in system environment. i should change it to vcvarsall.bat

      Time to elevate.

      L 1 Reply Last reply 26 Jan 2021, 11:41
      0
      • L Lemat
        26 Jan 2021, 11:39

        @jsulm
        owww !!, that is the CXX variable i set in system environment. i should change it to vcvarsall.bat

        L Offline
        L Offline
        Lemat
        wrote on 26 Jan 2021, 11:41 last edited by
        #14

        @Lemat
        right ? you agree ?

        Time to elevate.

        1 Reply Last reply
        0
        • P Pablo J. Rogina
          26 Jan 2021, 11:39

          @Lemat said in Error on Qt 6 Building from source for Windows Based:

          C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe

          I'm not very familiar with Windows build environment, but is that OK?
          I mean, it looks like the 64 bit version of cl.exe is being used, but it's strange that the Visual Studio installation went to the x86 folder, as a 32 bit application?

          Could you please describe your environment? i.e. Windows OS version and platform, same for Visual Studio.

          L Offline
          L Offline
          Lemat
          wrote on 26 Jan 2021, 11:46 last edited by
          #15

          @Pablo-J-Rogina

          Windows 10 Professional 20H2 19042.685 X64

          Microsoft Visual Studio Community 2019
          Version 16.8.4

          i use this same MSVC version to build my Qt x64 apps.

          Time to elevate.

          1 Reply Last reply
          0
          • J jsulm
            26 Jan 2021, 11:35

            @Lemat said in Error on Qt 6 Building from source for Windows Based:

            "C:\PROGRA~2\Microsoft Visual Studio\2019\COMMUN~1\VC\AUXILI~1\Build\vcvars64.bat" -o CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\Program Files\CMake\share\cmake-3.18\Modules\CMakeCXXCompilerABI.cpp"

            This looks strange. This should be the call to the compiler, but instead vcvars64.bat is called. Can you show your script you created as described in the link (qt6vars.cmd)?

            L Offline
            L Offline
            Lemat
            wrote on 26 Jan 2021, 11:48 last edited by
            #16

            @jsulm

            or what is the right compiler path ? this one ?: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64

            Time to elevate.

            J 1 Reply Last reply 26 Jan 2021, 11:54
            0
            • L Lemat
              26 Jan 2021, 11:48

              @jsulm

              or what is the right compiler path ? this one ?: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 26 Jan 2021, 11:54 last edited by
              #17

              @Lemat I think that path is correct. Visual Studio itself is a x86 application, but it has compiler which generates x86_64 binaries.

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

              L 1 Reply Last reply 26 Jan 2021, 11:56
              1
              • J jsulm
                26 Jan 2021, 11:54

                @Lemat I think that path is correct. Visual Studio itself is a x86 application, but it has compiler which generates x86_64 binaries.

                L Offline
                L Offline
                Lemat
                wrote on 26 Jan 2021, 11:56 last edited by
                #18

                @jsulm all right

                Time to elevate.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Lemat
                  wrote on 26 Jan 2021, 12:00 last edited by
                  #19

                  should i set a real compiler path in the system environment variable CXX ?? i don't know the real compiler file name. my actual Qt 5.15.2 has detected it automatically. i am looking in her settings to find the compiler file name, but nothing.

                  Time to elevate.

                  J 1 Reply Last reply 26 Jan 2021, 12:01
                  0
                  • L Lemat
                    26 Jan 2021, 12:00

                    should i set a real compiler path in the system environment variable CXX ?? i don't know the real compiler file name. my actual Qt 5.15.2 has detected it automatically. i am looking in her settings to find the compiler file name, but nothing.

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 26 Jan 2021, 12:01 last edited by
                    #20

                    @Lemat I don't think so. It should work as described on that web page. I don't know why it doesn't work for you.

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

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      Lemat
                      wrote on 26 Jan 2021, 16:23 last edited by
                      #21

                      i really need help for that. i tried anything, but nothing. Maybe cmake version ?

                      Time to elevate.

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        Lemat
                        wrote on 26 Jan 2021, 16:27 last edited by
                        #22

                        Tools used:
                        Cmake version: 3.18.4 x64
                        Python: 3.7.3 x64
                        ActivePerl: 5.28 x64
                        Ninja: 1.10.2

                        Time to elevate.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 26 Jan 2021, 16:31 last edited by
                          #23

                          Hi,

                          IIRC, cmake 3.19.2 or newer is recommended but I don't have the source at hand.

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

                          L 1 Reply Last reply 26 Jan 2021, 19:25
                          0
                          • SGaistS SGaist
                            26 Jan 2021, 16:31

                            Hi,

                            IIRC, cmake 3.19.2 or newer is recommended but I don't have the source at hand.

                            L Offline
                            L Offline
                            Lemat
                            wrote on 26 Jan 2021, 19:25 last edited by
                            #24

                            @SGaist

                            Can you explain more ?

                            Time to elevate.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 26 Jan 2021, 19:46 last edited by
                              #25

                              You should update your cmake version.

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

                              L 1 Reply Last reply 26 Jan 2021, 20:59
                              0
                              • SGaistS SGaist
                                26 Jan 2021, 19:46

                                You should update your cmake version.

                                L Offline
                                L Offline
                                Lemat
                                wrote on 26 Jan 2021, 20:59 last edited by
                                #26

                                @SGaist

                                Okay. let me try. i am downloading cmake 3.19.3

                                Time to elevate.

                                1 Reply Last reply
                                0
                                • L Offline
                                  L Offline
                                  Lemat
                                  wrote on 27 Jan 2021, 11:12 last edited by
                                  #27

                                  i tried with cmake 3.19.3, problem still exist

                                  Time to elevate.

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 27 Jan 2021, 18:29 last edited by
                                    #28

                                    Did you restart from a clean state ?

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

                                    L 1 Reply Last reply 28 Jan 2021, 18:53
                                    0
                                    • SGaistS SGaist
                                      27 Jan 2021, 18:29

                                      Did you restart from a clean state ?

                                      L Offline
                                      L Offline
                                      Lemat
                                      wrote on 28 Jan 2021, 18:53 last edited by
                                      #29

                                      @SGaist yes. i did it. but the problem still exist

                                      Time to elevate.

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 28 Jan 2021, 19:06 last edited by
                                        #30

                                        What did you do to ensure a clean state ?

                                        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
                                        0
                                        • L Offline
                                          L Offline
                                          Lemat
                                          wrote on 12 Feb 2021, 22:29 last edited by
                                          #31

                                          I Installed Qt 6.0.1 with the online Installer. Too bad for me. Many features such as QWebEngine are removed

                                          Time to elevate.

                                          eyllanescE 1 Reply Last reply 13 Feb 2021, 00:51
                                          0

                                          • Login

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