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. I cannot configure Qt 6.2.0 to build statically. Errors: "opt: zlib val: qt", "Overriding option 'libpng' with 'qt' (was: 'undefined')" and so on

I cannot configure Qt 6.2.0 to build statically. Errors: "opt: zlib val: qt", "Overriding option 'libpng' with 'qt' (was: 'undefined')" and so on

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 2 Posters 1.7k 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.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by 8Observer8
    #1

    Hello,

    I try to configure Qt6 to build statically. I use this configuration command:

    configure -prefix "C:\Qt\Qt6.2.0_MinGW_Static" -static -static-runtime -release -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-odbc -sql-sqlite -nomake tools -nomake examples -nomake tests -no-angle -skip qttools -skip qtquick3d -skip qt5compat -skip qtshadertools -skip qtquicktimeline -skip qtwebengine -skip qtactiveqt -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtimageformats -skip qtlottie -skip qtnetworkauth -skip qtremoteobjects -skip qtvirtualkeyboard -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtwebview -skip qtwayland -skip qtscxml -skip qtmqtt -skip qtopcua -skip qtsvg -skip qtdoc

    But this configuration give me these errors:

    opt: zlib val: qt
    opt: pcre val: qt
    opt: libpng val: qt
    Overriding option 'libpng' with 'qt' (was: 'undefined')
    opt: libjpeg val: qt
    Overriding option 'libjpeg' with 'qt' (was: 'undefined')
    opt: freetype val: qt
    Overriding option 'freetype' with 'qt' (was: 'undefined')
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:251 (message):
    Unknown command line option '-no-angle'.
    Call Stack (most recent call first):
    qtbase/cmake/QtProcessConfigureArgs.cmake:645 (qtConfAddError)
    

    I tried to install CMake 3.21.3 x386 and CMake 3.21.3 x86_64

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

      Hi,

      From the looks of it, you should drop the -no-angle option.

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

      8Observer88 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        From the looks of it, you should drop the -no-angle option.

        8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #3

        @SGaist, thank you for your reply. I will try it later and I will write about the result.

        1 Reply Last reply
        0
        • 8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by
          #4

          I deleted -no-angle:

          configure -prefix "C:\Qt6.2.0_Static" -static -static-runtime -release -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-odbc -sql-sqlite -nomake tools -nomake examples -nomake tests -skip qttools -skip qtquick3d -skip qt5compat -skip qtshadertools -skip qtquicktimeline -skip qtwebengine -skip qtactiveqt -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtimageformats -skip qtlottie -skip qtnetworkauth -skip qtremoteobjects -skip qtvirtualkeyboard -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtwebview -skip qtwayland -skip qtscxml -skip qtmqtt -skip qtopcua -skip qtsvg -skip qtdoc

          I have this error:

          Checking dependencies of 'qtmultimedia'
          CMake Error at CMakeLists.txt:81 (message):
            Module 'qtmultimedia' depends on 'qtshadertools', but building
            'qtshadertools' was explicitly disabled.
          
            Note: Use '-skip qtmultimedia' to exclude it from the build.
          
          -- Configuring incomplete, errors occurred!
          

          I deleted -skip qtshadertools:

          configure -prefix "C:\Qt6.2.0_Static" -static -static-runtime -release -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-odbc -sql-sqlite -nomake tools -nomake examples -nomake tests -skip qttools -skip qtquick3d -skip qt5compat -skip qtquicktimeline -skip qtwebengine -skip qtactiveqt -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtimageformats -skip qtlottie -skip qtnetworkauth -skip qtremoteobjects -skip qtvirtualkeyboard -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtwebview -skip qtwayland -skip qtscxml -skip qtmqtt -skip qtopcua -skip qtsvg -skip qtdoc

          But I have the same error. How to clean the configuration? I use MinGW.

          1 Reply Last reply
          0
          • 8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by
            #5

            How to clean the configuration?

            I just deleted the "CMakeCache.txt" file. Now I have this error:

            Checking dependencies of 'qttranslations'
            CMake Error at CMakeLists.txt:81 (message):
              Module 'qttranslations' depends on 'qttools', but building 'qttools' was
              explicitly disabled.
            
              Note: Use '-skip qttranslations' to exclude it from the build.
            
            -- Configuring incomplete, errors occurred!
            

            I added -skip qttranslations:

            configure -prefix "C:\Qt6.2.0_Static" -static -static-runtime -release -opensource -confirm-license -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-odbc -sql-sqlite -nomake tools -nomake examples -nomake tests -skip qttools -skip qtquick3d -skip qt5compat -skip qtquicktimeline -skip qtwebengine -skip qtactiveqt -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtimageformats -skip qtlottie -skip qtnetworkauth -skip qtremoteobjects -skip qtvirtualkeyboard -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtwebview -skip qtwayland -skip qtscxml -skip qtmqtt -skip qtopcua -skip qtsvg -skip qtdoc -skip qttranslations

            Configuration is running.

            1 Reply Last reply
            0
            • 8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote on last edited by 8Observer8
              #6

              I have this error in 3 minutes:

              -- Found WrapPCRE2: TRUE
              CMake Error at qtbase/cmake/QtSyncQtHelpers.cmake:7 (message):
                Perl needs to be available to build Qt.
              Call Stack (most recent call first):
                qtbase/cmake/QtSyncQtHelpers.cmake:12 (qt_ensure_perl)
                qtbase/cmake/QtModuleHelpers.cmake:285 (qt_ensure_sync_qt)
                qtbase/src/corelib/CMakeLists.txt:33 (qt_internal_add_module)
              
              
              -- Configuring incomplete, errors occurred!
              See also "C:/Temp/qt-everywhere-src-6.2.0/CMakeFiles/CMakeOutput.log".
              See also "C:/Temp/qt-everywhere-src-6.2.0/CMakeFiles/CMakeError.log".
              CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:947 (message):
                CMake exited with code 1.
              

              I will try to setup Perl.

              1 Reply Last reply
              0
              • 8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote on last edited by 8Observer8
                #7

                I installed Perl using this link: https://doc.qt.io/qt-6/windows-building.html

                430cee7f-0815-4853-85b8-5a53ff07e691-image.png

                I used ActiveState Perl but I have the same error above that Perl needs to be available to build Qt.

                I reopend CMD but perl is not available:

                e6fa7ce3-dd56-4ee6-8fbe-732e268aec09-image.png

                I download "Strawberry Perl" from here: https://strawberryperl.com/ I installed strawberry-perl-5.32.1.1-64bit.msi. It requires 542 MB on hard disc.

                Perl is available now:

                1f60e2b1-dbef-45da-be8b-e3759a88a618-image.png

                1 Reply Last reply
                0
                • 8Observer88 Offline
                  8Observer88 Offline
                  8Observer8
                  wrote on last edited by 8Observer8
                  #8

                  Configuration was done! It requires 7 minutes on my laptop.

                  1 Reply Last reply
                  1
                  • 8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote on last edited by 8Observer8
                    #9

                    Some information for people who will build Qt6 to static.

                    This command does not work for me: cmake --build . --parallel:

                    [ 7%] Built target 3DQuickInput_lib_pri [ 7%] Built target Bundled_Clip2Tri_ext_pri [ 7%] Built target PositioningQuick_lib_pri [ 7%] Built target 3DInput_lib_pri [ 7%] [ 7%] Built target 3DRender_lib_pri Built target 3DQuickAnimation_lib_pri mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:571: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qcoreapplication.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:586: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qcoreglobaldata.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:616: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qmetacontainer.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:631: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qmetatype.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:646: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qsharedmemory.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:661: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qsystemerror.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:676: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qsystemsemaphore.cpp.obj] Error -1073741523 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:691: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qvariant.cpp.obj] Error -1073741523 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:706: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/plugin/quuid.cpp.obj] Error 1 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:721: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/serialization/qcborcommon.cpp.obj] Error -1073741523 mingw32-make.exe[2]: *** [qtbase\src\tools\bootstrap\CMakeFiles\Bootstrap.dir\build.make:736: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/serialization/qcborstreamwriter.cpp.obj] Error -1073741523 [ 7%] Built target EntryPointImplementation mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:6543: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/all] Error 2 mingw32-make.exe: *** [Makefile:145: all] Error 2

                    I used mingw32-make and mingw32-make install.

                    mingw32-make requires ~ 7 hours and ~30 GB on hard drive:

                    f7fca5b9-1842-451a-bec2-026965f3c73e-image.png

                    I temporarily removed almost all programs from the C drive on my laptop: Chrome, Antivirus, VSCode, and so on.

                    If it is not enough space you can run mingw32-make again:

                    7cbe09ba-f610-4fb3-a0ab-3dfd6a14b0e9-image.png

                    8bfa9f2f-f63d-4d8f-bab8-36e289716d71-image.png

                    mingw32-make install creates the "Qt6.2.0_Static" folder with size = 822 MB.

                    1 Reply Last reply
                    0
                    • 8Observer88 Offline
                      8Observer88 Offline
                      8Observer8
                      wrote on last edited by 8Observer8
                      #10

                      I have this problem for settings: Qt version is not properly installed, please run make install

                      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