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. Cannot build static Qt6 from source.

Cannot build static Qt6 from source.

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 3 Posters 528 Views 1 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.
  • F Offline
    F Offline
    FulLT
    wrote on last edited by
    #1

    In order to build I use this .cmd file :

    SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
    SET SRC_DIR="C:\Qt\6.4.2\Src"
    SET BUILD_DIR="C:\Qt\6.4.2\Build2"
    SET INSTALL_DIR="C:\Qt\6.4.2.msvc2019_64_static_size"
    SET CONFIGURE_OPTIONS=-debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
    
    call %VS_ENVIRONMENT%
    mkdir %BUILD_DIR%
    mkdir %INSTALL_DIR%
    cd %BUILD_DIR%
    call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
    cmake --build . --parallel
    cmake --install .
    cmake --install . --config Debug
    cd %INSTALL_DIR%
    rmdir %BUILD_DIR% /Q /S
    pause
    

    When I executed this in Developer Command Prompt for VS 2022 output is :

    C:\Qt\6.4.2\Build2>call "C:\Qt\6.4.2\Src"\configure -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
    + cd qtbase
    + C:\Qt\6.4.2\Src\qtbase\configure.bat -top-level -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
    -- Windows 10 SDK version: 10.0.22621.0
    'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.4.2.msvc2019_64_static_size' '-DCMAKE_CONFIGURATION_TYPES=Release;Debug' '-DINPUT_msvc_mp=yes' '-DINPUT_static_runtime=yes' '-DINPUT_optimize_size=yes' '-G' 'Ninja Multi-Config' 'C:/Qt/6.4.2/Src'
    -- The CXX compiler identification is MSVC 19.33.31630.0
    -- The C compiler identification is MSVC 19.33.31630.0
    -- The ASM compiler identification is MSVC
    -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    Checking dependencies of submodule 'qtbase'
    Checking dependencies of submodule 'qtimageformats'
    Checking dependencies of submodule 'qtlanguageserver'
    Checking dependencies of submodule 'qtshadertools'
    Checking dependencies of submodule 'qtsvg'
    Checking dependencies of submodule 'qtdeclarative'
    Checking dependencies of submodule 'qtquicktimeline'
    Checking dependencies of submodule 'qtquick3d'
    Checking dependencies of submodule 'qtmultimedia'
    Checking dependencies of submodule 'qt3d'
    Checking dependencies of submodule 'qt5compat'
    Checking dependencies of submodule 'qtactiveqt'
    Checking dependencies of submodule 'qtcharts'
    Checking dependencies of submodule 'qtcoap'
    Checking dependencies of submodule 'qtconnectivity'
    Checking dependencies of submodule 'qtdatavis3d'
    Checking dependencies of submodule 'qtwebsockets'
    Checking dependencies of submodule 'qthttpserver'
    Checking dependencies of submodule 'qttools'
    Checking dependencies of submodule 'qtdoc'
    Checking dependencies of submodule 'qtlottie'
    Checking dependencies of submodule 'qtmqtt'
    Checking dependencies of submodule 'qtnetworkauth'
    Checking dependencies of submodule 'qtopcua'
    Checking dependencies of submodule 'qtserialport'
    Checking dependencies of submodule 'qtpositioning'
    Checking dependencies of submodule 'qtquick3dphysics'
    Checking dependencies of submodule 'qtremoteobjects'
    Checking dependencies of submodule 'qtscxml'
    Checking dependencies of submodule 'qtsensors'
    Checking dependencies of submodule 'qtserialbus'
    Checking dependencies of submodule 'qtspeech'
    Checking dependencies of submodule 'qttranslations'
    Checking dependencies of submodule 'qtvirtualkeyboard'
    Checking dependencies of submodule 'qtwayland'
    Checking dependencies of submodule 'qtwebchannel'
    Checking dependencies of submodule 'qtwebengine'
    Checking dependencies of submodule 'qtwebview'
    Configuring submodule 'qtbase'
    CMake Error at C:/Qt/6.4.2/Src/qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
      CMake exited with code Access violation.
    
    Christian EhrlicherC SGaistS 2 Replies Last reply
    0
    • F FulLT

      In order to build I use this .cmd file :

      SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
      SET SRC_DIR="C:\Qt\6.4.2\Src"
      SET BUILD_DIR="C:\Qt\6.4.2\Build2"
      SET INSTALL_DIR="C:\Qt\6.4.2.msvc2019_64_static_size"
      SET CONFIGURE_OPTIONS=-debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
      
      call %VS_ENVIRONMENT%
      mkdir %BUILD_DIR%
      mkdir %INSTALL_DIR%
      cd %BUILD_DIR%
      call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
      cmake --build . --parallel
      cmake --install .
      cmake --install . --config Debug
      cd %INSTALL_DIR%
      rmdir %BUILD_DIR% /Q /S
      pause
      

      When I executed this in Developer Command Prompt for VS 2022 output is :

      C:\Qt\6.4.2\Build2>call "C:\Qt\6.4.2\Src"\configure -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
      + cd qtbase
      + C:\Qt\6.4.2\Src\qtbase\configure.bat -top-level -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
      -- Windows 10 SDK version: 10.0.22621.0
      'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.4.2.msvc2019_64_static_size' '-DCMAKE_CONFIGURATION_TYPES=Release;Debug' '-DINPUT_msvc_mp=yes' '-DINPUT_static_runtime=yes' '-DINPUT_optimize_size=yes' '-G' 'Ninja Multi-Config' 'C:/Qt/6.4.2/Src'
      -- The CXX compiler identification is MSVC 19.33.31630.0
      -- The C compiler identification is MSVC 19.33.31630.0
      -- The ASM compiler identification is MSVC
      -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      Checking dependencies of submodule 'qtbase'
      Checking dependencies of submodule 'qtimageformats'
      Checking dependencies of submodule 'qtlanguageserver'
      Checking dependencies of submodule 'qtshadertools'
      Checking dependencies of submodule 'qtsvg'
      Checking dependencies of submodule 'qtdeclarative'
      Checking dependencies of submodule 'qtquicktimeline'
      Checking dependencies of submodule 'qtquick3d'
      Checking dependencies of submodule 'qtmultimedia'
      Checking dependencies of submodule 'qt3d'
      Checking dependencies of submodule 'qt5compat'
      Checking dependencies of submodule 'qtactiveqt'
      Checking dependencies of submodule 'qtcharts'
      Checking dependencies of submodule 'qtcoap'
      Checking dependencies of submodule 'qtconnectivity'
      Checking dependencies of submodule 'qtdatavis3d'
      Checking dependencies of submodule 'qtwebsockets'
      Checking dependencies of submodule 'qthttpserver'
      Checking dependencies of submodule 'qttools'
      Checking dependencies of submodule 'qtdoc'
      Checking dependencies of submodule 'qtlottie'
      Checking dependencies of submodule 'qtmqtt'
      Checking dependencies of submodule 'qtnetworkauth'
      Checking dependencies of submodule 'qtopcua'
      Checking dependencies of submodule 'qtserialport'
      Checking dependencies of submodule 'qtpositioning'
      Checking dependencies of submodule 'qtquick3dphysics'
      Checking dependencies of submodule 'qtremoteobjects'
      Checking dependencies of submodule 'qtscxml'
      Checking dependencies of submodule 'qtsensors'
      Checking dependencies of submodule 'qtserialbus'
      Checking dependencies of submodule 'qtspeech'
      Checking dependencies of submodule 'qttranslations'
      Checking dependencies of submodule 'qtvirtualkeyboard'
      Checking dependencies of submodule 'qtwayland'
      Checking dependencies of submodule 'qtwebchannel'
      Checking dependencies of submodule 'qtwebengine'
      Checking dependencies of submodule 'qtwebview'
      Configuring submodule 'qtbase'
      CMake Error at C:/Qt/6.4.2/Src/qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
        CMake exited with code Access violation.
      
      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What cmake version do you use? Looks like cmake has some problems. Try upgrading to the latest version.

      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
      • F FulLT

        In order to build I use this .cmd file :

        SET VS_ENVIRONMENT="C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
        SET SRC_DIR="C:\Qt\6.4.2\Src"
        SET BUILD_DIR="C:\Qt\6.4.2\Build2"
        SET INSTALL_DIR="C:\Qt\6.4.2.msvc2019_64_static_size"
        SET CONFIGURE_OPTIONS=-debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
        
        call %VS_ENVIRONMENT%
        mkdir %BUILD_DIR%
        mkdir %INSTALL_DIR%
        cd %BUILD_DIR%
        call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
        cmake --build . --parallel
        cmake --install .
        cmake --install . --config Debug
        cd %INSTALL_DIR%
        rmdir %BUILD_DIR% /Q /S
        pause
        

        When I executed this in Developer Command Prompt for VS 2022 output is :

        C:\Qt\6.4.2\Build2>call "C:\Qt\6.4.2\Src"\configure -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
        + cd qtbase
        + C:\Qt\6.4.2\Src\qtbase\configure.bat -top-level -prefix "C:\Qt\6.4.2.msvc2019_64_static_size" -debug-and-release -top-level -mp -opensource -confirm-license -static -static-runtime -optimize-size
        -- Windows 10 SDK version: 10.0.22621.0
        'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.4.2.msvc2019_64_static_size' '-DCMAKE_CONFIGURATION_TYPES=Release;Debug' '-DINPUT_msvc_mp=yes' '-DINPUT_static_runtime=yes' '-DINPUT_optimize_size=yes' '-G' 'Ninja Multi-Config' 'C:/Qt/6.4.2/Src'
        -- The CXX compiler identification is MSVC 19.33.31630.0
        -- The C compiler identification is MSVC 19.33.31630.0
        -- The ASM compiler identification is MSVC
        -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe
        -- Detecting CXX compiler ABI info
        -- Detecting CXX compiler ABI info - done
        -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
        -- Detecting CXX compile features
        -- Detecting CXX compile features - done
        -- Detecting C compiler ABI info
        -- Detecting C compiler ABI info - done
        -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
        -- Detecting C compile features
        -- Detecting C compile features - done
        Checking dependencies of submodule 'qtbase'
        Checking dependencies of submodule 'qtimageformats'
        Checking dependencies of submodule 'qtlanguageserver'
        Checking dependencies of submodule 'qtshadertools'
        Checking dependencies of submodule 'qtsvg'
        Checking dependencies of submodule 'qtdeclarative'
        Checking dependencies of submodule 'qtquicktimeline'
        Checking dependencies of submodule 'qtquick3d'
        Checking dependencies of submodule 'qtmultimedia'
        Checking dependencies of submodule 'qt3d'
        Checking dependencies of submodule 'qt5compat'
        Checking dependencies of submodule 'qtactiveqt'
        Checking dependencies of submodule 'qtcharts'
        Checking dependencies of submodule 'qtcoap'
        Checking dependencies of submodule 'qtconnectivity'
        Checking dependencies of submodule 'qtdatavis3d'
        Checking dependencies of submodule 'qtwebsockets'
        Checking dependencies of submodule 'qthttpserver'
        Checking dependencies of submodule 'qttools'
        Checking dependencies of submodule 'qtdoc'
        Checking dependencies of submodule 'qtlottie'
        Checking dependencies of submodule 'qtmqtt'
        Checking dependencies of submodule 'qtnetworkauth'
        Checking dependencies of submodule 'qtopcua'
        Checking dependencies of submodule 'qtserialport'
        Checking dependencies of submodule 'qtpositioning'
        Checking dependencies of submodule 'qtquick3dphysics'
        Checking dependencies of submodule 'qtremoteobjects'
        Checking dependencies of submodule 'qtscxml'
        Checking dependencies of submodule 'qtsensors'
        Checking dependencies of submodule 'qtserialbus'
        Checking dependencies of submodule 'qtspeech'
        Checking dependencies of submodule 'qttranslations'
        Checking dependencies of submodule 'qtvirtualkeyboard'
        Checking dependencies of submodule 'qtwayland'
        Checking dependencies of submodule 'qtwebchannel'
        Checking dependencies of submodule 'qtwebengine'
        Checking dependencies of submodule 'qtwebview'
        Configuring submodule 'qtbase'
        CMake Error at C:/Qt/6.4.2/Src/qtbase/cmake/QtProcessConfigureArgs.cmake:965 (message):
          CMake exited with code Access violation.
        
        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Did you also try with the CMake provided with Qt ?

        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
        • F Offline
          F Offline
          FulLT
          wrote on last edited by
          #4

          I tried but error message was same. As @Christian-Ehrlicher said, I was using cmake version 3.24.0-rc3. After upgrading the version to cmake version 3.26.0-rc5(latest) it fixed. Thank you for your time

          1 Reply Last reply
          1
          • F FulLT has marked this topic as solved on

          • Login

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