Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. problems creating static Qt (was "5.10.1 broke one of my builds")
Forum Updated to NodeBB v4.3 + New Features

problems creating static Qt (was "5.10.1 broke one of my builds")

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
28 Posts 5 Posters 12.2k Views 4 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #15

    That makes sense, but it seems that the configure command was ignoring my "-opengl desktop" option when it was part of this command:

        cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
            -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl `
            -opensource -confirm-license `
            -make libs -nomake tools -nomake examples -nomake tests"
    

    It was only when I re-ran configure with only the -opengl option, that it appeared to work. But, I just discovered that doing so failed to re-use my -prefix command, so it installed into /usr/local (on a Windows system). So, I'm running it again, using the "-redo" option.

    I wonder if the -opengl option is incompatible with one of the other options in that long command line...

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

      The options looks correct.

      However, what you should do is re-run from a clean state. Changing the OpenGL option is typically something that modifies the build setup.

      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
      2
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #17

        So, what exactly does it mean to "re-run from a clean slate?" What all do I have to delete or uninstall? The target directory was empty when I did this the first time.

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

          It means that if you are using an out of source build, then delete folder in which you called configure. Otherwise, you have to cleanup the sources before calling configure again.

          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
          4
          • mzimmersM mzimmers

            So, what exactly does it mean to "re-run from a clean slate?" What all do I have to delete or uninstall? The target directory was empty when I did this the first time.

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #19

            @mzimmers said in 5.10.1 broke one of my builds:

            So, what exactly does it mean to "re-run from a clean slate?" What all do I have to delete or uninstall?

            Delete all the files that were not part of the source code package. These are created the moment configure.bat starts running.

            Out-of-source builds, as mentioned by @SGaist, are the easiest to clean: You just delete the entire build folder.

            If you didn't use an out-of-source build but you did get the code via git, run this from the same folder as configure.bat to preserve your source files but remove all other files:

            > git clean -dfx
            > git submodule foreach "git clean -dfx"

            The target directory was empty when I did this the first time.

            The configuration files are created in your build directory, not your target (PREFIX) directory.

            P.S. Using -opengl desktop means that your end-user needs OpenGL drivers provided by their graphics card vendor to run apps built with Qt Quick. The drivers provided by Windows itself are too old.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            3
            • mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #20

              Thanks, JKSH - I need static builds for delivering utility programs to customers. Your last paragraph suggests that opengl desktop probably isn't a good idea for me, then. What is the best approach for producing static builds?

              JKSHJ 1 Reply Last reply
              0
              • mzimmersM mzimmers

                Thanks, JKSH - I need static builds for delivering utility programs to customers. Your last paragraph suggests that opengl desktop probably isn't a good idea for me, then. What is the best approach for producing static builds?

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #21

                @mzimmers said in 5.10.1 broke one of my builds:

                Thanks, JKSH - I need static builds for delivering utility programs to customers. Your last paragraph suggests that opengl desktop probably isn't a good idea for me, then. What is the best approach for producing static builds?

                Hi @mzimmers, I'm afraid I don't have much experience with static builds of Qt -- I only use dynamic linking.

                Which GUI technologies do your programs use? If it's Qt Widgets or the Graphics View Framework, then the OpenGL setting won't matter because those technologies don't use OpenGL.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • mzimmersM Offline
                  mzimmersM Offline
                  mzimmers
                  wrote on last edited by
                  #22

                  I use mainly widgets, so I guess this doesn't matter too much, but I'd like to get to the bottom of the problem.

                  This is my configure command:

                      cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
                          -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl `
                          -opensource -confirm-license `
                          -make libs -nomake tools -nomake examples -nomake tests"
                  

                  Here are some extracts of the output from the static build script. I get the same results when building 5.9.4 or 5.10.1. (These were clean builds; I deleted the source directories and let the script re-extract.)

                  Running configuration tests...
                  Checking for valid makespec... yes
                  Checking for alloca() in alloca.h... no
                  Checking for alloca() in malloc.h... yes
                  Checking for target architecture... i386
                  Checking for SSE2 instructions... yes
                  Checking for SSE3 instructions... yes
                  Checking for SSSE3 instructions... yes
                  Checking for SSE4.1 instructions... yes
                  Checking for SSE4.2 instructions... yes
                  Checking for AVX instructions... yes
                  Checking for AVX2 instructions... yes
                  Checking for AVX512 F instructions... yes
                  Checking for AVX512 BW instructions... yes
                  Checking for AVX512 CD instructions... yes
                  Checking for AVX512 DQ instructions... yes
                  Checking for AVX512 ER instructions... yes
                  Checking for AVX512 IFMA instructions... yes
                  Checking for AVX512 PF instructions... yes
                  Checking for AVX512 VBMI instructions... yes
                  Checking for AVX512 VL instructions... yes
                  Checking for C++14 support... yes
                  Checking for C++1z support... yes
                  Checking for D-Bus >= 1.2... no
                  Checking for F16C instructions... yes
                  Checking for D-Bus >= 1.2 (host)... yes
                  Checking for IncrediBuild... no
                  Checking for udev... no
                  Checking for -Og support... yes
                  Checking for POSIX fallocate()... no
                  Checking for precompiled header support... yes
                  Checking for STL compatibility... yes
                  Checking for zlib... yes
                  Checking for eventfd... no
                  Checking for inotify... no
                  Checking for slog2... no
                  Checking for 64 bit atomics... yes
                  Checking for DoubleConversion... no
                  Checking for PCRE2... no
                  Checking for O_CLOEXEC... no
                  Checking for working std::atomic for function pointers... yes
                  Checking for getaddrinfo()... yes
                  Checking for getifaddrs()... no
                  Checking for IPv6 ifname... no
                  Checking for OpenSSL Headers... no
                  Checking for XCB >= 1.5 (core)... no
                  Checking for DirectX SDK... no
                  Checking for Direct 2D... no
                  Checking for DirectWrite... yes
                  Checking for DirectWrite 2... no
                  Checking for EGL... no
                  Checking for evdev... no
                  Checking for GBM... no
                  Checking for KMS... no
                  Checking for LinuxFB... no
                  Checking for mtdev... no
                  Checking for OpenGL ES 2.0... no
                  Checking for OpenVG... no
                  Checking for default QPA platform... windows
                  Checking for libjpeg... no
                  Checking for libpng... no
                  Checking for tslib... no
                  Checking for xkbcommon... no
                  Checking for XLib... no
                  Checking for uxtheme.h... yes
                  Checking for CUPS... no
                  Checking for DB2 (IBM)... no
                  Checking for InterBase... no
                  Checking for MySQL... no
                  Checking for OCI (Oracle)... no
                  Checking for ODBC... yes
                  Checking for PostgreSQL... no
                  Checking for SQLite (version 2)... no
                  Checking for TDS (Sybase)... no
                  Checking for Direct3D 12... no
                  Checking for SDL2... no
                  Checking for Assimp... no
                  Checking for Autodesk FBX... no
                  Checking for Wayland EGL library... no
                  Checking for BlueZ... no
                  Checking for sensorfw... no
                  Checking for Gypsy... no
                  Checking for WinRT Geolocation API... no
                  Checking for DirectShow... yes
                  Checking for evr.h... yes
                  Checking for Vivante GPU... no
                  Checking for GStreamer 1.0... no
                  Checking for GStreamer 0.10... no
                  Checking for OpenAL... no
                  Checking for libresourceqt5... no
                  Checking for Windows Audio Services... no
                  Checking for WMF... no
                  Checking for wmsdk.h... no
                  Checking for WShellItem... yes
                  Checking for embedded... no
                  Checking for Python 2... C:/Qt/Tools/mingw530_32/opt/bin/python2.exe
                  Checking for system ninja... no
                  Done running configuration tests.
                  
                  Configure summary:
                  
                  Build type: win32-g++ (i386, CPU features: <none>)
                  Configuration: sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx
                  nt dbus no-pkg-config release_tools static stl
                  Build options:
                    Mode ................................... debug and release; default link: debug; optimized tools
                    Optimize debug build ................... yes
                    Optimize release build for size ........ no
                    Building shared libraries .............. no
                    Using C++ standard ..................... C++1z
                    Using gold linker ...................... no
                    Using precompiled headers .............. yes
                    Using LTCG ............................. no
                    Target compiler supports:
                      SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
                      AVX .................................. AVX AVX2 F16C
                      AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
                    Build parts ............................ libs examples tools
                    App store compliance ................... no
                  .
                  .
                  .
                    Qt Gui ................................. yes
                  .
                  .
                  .
                  Qt Gui:
                    Accessibility .......................... yes
                    FreeType ............................... yes
                      Using system FreeType ................ no
                    HarfBuzz ............................... yes
                      Using system HarfBuzz ................ no
                    Fontconfig ............................. no
                    Image formats:
                      GIF .................................. yes
                      ICO .................................. yes
                      JPEG ................................. yes
                        Using system libjpeg ............... no
                      PNG .................................. yes
                        Using system libpng ................ no
                    EGL .................................... no
                    OpenVG ................................. no
                    OpenGL:
                      ANGLE ................................ no
                      Desktop OpenGL ....................... no
                      Dynamic OpenGL ....................... no
                      OpenGL ES 2.0 ........................ yes
                      OpenGL ES 3.0 ........................ no
                      OpenGL ES 3.1 ........................ no
                    Session Management ..................... yes
                  .
                  .
                  .
                  Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
                  
                  WARNING: Using OpenGL ES 2.0 on Windows without ANGLE.
                  The build will most likely fail.
                  Specify -opengl desktop to use regular OpenGL.
                  

                  Any suggestions?

                  Thanks...

                  kshegunovK 1 Reply Last reply
                  0
                  • mzimmersM mzimmers

                    I use mainly widgets, so I guess this doesn't matter too much, but I'd like to get to the bottom of the problem.

                    This is my configure command:

                        cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
                            -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl `
                            -opensource -confirm-license `
                            -make libs -nomake tools -nomake examples -nomake tests"
                    

                    Here are some extracts of the output from the static build script. I get the same results when building 5.9.4 or 5.10.1. (These were clean builds; I deleted the source directories and let the script re-extract.)

                    Running configuration tests...
                    Checking for valid makespec... yes
                    Checking for alloca() in alloca.h... no
                    Checking for alloca() in malloc.h... yes
                    Checking for target architecture... i386
                    Checking for SSE2 instructions... yes
                    Checking for SSE3 instructions... yes
                    Checking for SSSE3 instructions... yes
                    Checking for SSE4.1 instructions... yes
                    Checking for SSE4.2 instructions... yes
                    Checking for AVX instructions... yes
                    Checking for AVX2 instructions... yes
                    Checking for AVX512 F instructions... yes
                    Checking for AVX512 BW instructions... yes
                    Checking for AVX512 CD instructions... yes
                    Checking for AVX512 DQ instructions... yes
                    Checking for AVX512 ER instructions... yes
                    Checking for AVX512 IFMA instructions... yes
                    Checking for AVX512 PF instructions... yes
                    Checking for AVX512 VBMI instructions... yes
                    Checking for AVX512 VL instructions... yes
                    Checking for C++14 support... yes
                    Checking for C++1z support... yes
                    Checking for D-Bus >= 1.2... no
                    Checking for F16C instructions... yes
                    Checking for D-Bus >= 1.2 (host)... yes
                    Checking for IncrediBuild... no
                    Checking for udev... no
                    Checking for -Og support... yes
                    Checking for POSIX fallocate()... no
                    Checking for precompiled header support... yes
                    Checking for STL compatibility... yes
                    Checking for zlib... yes
                    Checking for eventfd... no
                    Checking for inotify... no
                    Checking for slog2... no
                    Checking for 64 bit atomics... yes
                    Checking for DoubleConversion... no
                    Checking for PCRE2... no
                    Checking for O_CLOEXEC... no
                    Checking for working std::atomic for function pointers... yes
                    Checking for getaddrinfo()... yes
                    Checking for getifaddrs()... no
                    Checking for IPv6 ifname... no
                    Checking for OpenSSL Headers... no
                    Checking for XCB >= 1.5 (core)... no
                    Checking for DirectX SDK... no
                    Checking for Direct 2D... no
                    Checking for DirectWrite... yes
                    Checking for DirectWrite 2... no
                    Checking for EGL... no
                    Checking for evdev... no
                    Checking for GBM... no
                    Checking for KMS... no
                    Checking for LinuxFB... no
                    Checking for mtdev... no
                    Checking for OpenGL ES 2.0... no
                    Checking for OpenVG... no
                    Checking for default QPA platform... windows
                    Checking for libjpeg... no
                    Checking for libpng... no
                    Checking for tslib... no
                    Checking for xkbcommon... no
                    Checking for XLib... no
                    Checking for uxtheme.h... yes
                    Checking for CUPS... no
                    Checking for DB2 (IBM)... no
                    Checking for InterBase... no
                    Checking for MySQL... no
                    Checking for OCI (Oracle)... no
                    Checking for ODBC... yes
                    Checking for PostgreSQL... no
                    Checking for SQLite (version 2)... no
                    Checking for TDS (Sybase)... no
                    Checking for Direct3D 12... no
                    Checking for SDL2... no
                    Checking for Assimp... no
                    Checking for Autodesk FBX... no
                    Checking for Wayland EGL library... no
                    Checking for BlueZ... no
                    Checking for sensorfw... no
                    Checking for Gypsy... no
                    Checking for WinRT Geolocation API... no
                    Checking for DirectShow... yes
                    Checking for evr.h... yes
                    Checking for Vivante GPU... no
                    Checking for GStreamer 1.0... no
                    Checking for GStreamer 0.10... no
                    Checking for OpenAL... no
                    Checking for libresourceqt5... no
                    Checking for Windows Audio Services... no
                    Checking for WMF... no
                    Checking for wmsdk.h... no
                    Checking for WShellItem... yes
                    Checking for embedded... no
                    Checking for Python 2... C:/Qt/Tools/mingw530_32/opt/bin/python2.exe
                    Checking for system ninja... no
                    Done running configuration tests.
                    
                    Configure summary:
                    
                    Build type: win32-g++ (i386, CPU features: <none>)
                    Configuration: sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx
                    nt dbus no-pkg-config release_tools static stl
                    Build options:
                      Mode ................................... debug and release; default link: debug; optimized tools
                      Optimize debug build ................... yes
                      Optimize release build for size ........ no
                      Building shared libraries .............. no
                      Using C++ standard ..................... C++1z
                      Using gold linker ...................... no
                      Using precompiled headers .............. yes
                      Using LTCG ............................. no
                      Target compiler supports:
                        SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
                        AVX .................................. AVX AVX2 F16C
                        AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
                      Build parts ............................ libs examples tools
                      App store compliance ................... no
                    .
                    .
                    .
                      Qt Gui ................................. yes
                    .
                    .
                    .
                    Qt Gui:
                      Accessibility .......................... yes
                      FreeType ............................... yes
                        Using system FreeType ................ no
                      HarfBuzz ............................... yes
                        Using system HarfBuzz ................ no
                      Fontconfig ............................. no
                      Image formats:
                        GIF .................................. yes
                        ICO .................................. yes
                        JPEG ................................. yes
                          Using system libjpeg ............... no
                        PNG .................................. yes
                          Using system libpng ................ no
                      EGL .................................... no
                      OpenVG ................................. no
                      OpenGL:
                        ANGLE ................................ no
                        Desktop OpenGL ....................... no
                        Dynamic OpenGL ....................... no
                        OpenGL ES 2.0 ........................ yes
                        OpenGL ES 3.0 ........................ no
                        OpenGL ES 3.1 ........................ no
                      Session Management ..................... yes
                    .
                    .
                    .
                    Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
                    
                    WARNING: Using OpenGL ES 2.0 on Windows without ANGLE.
                    The build will most likely fail.
                    Specify -opengl desktop to use regular OpenGL.
                    

                    Any suggestions?

                    Thanks...

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #23

                    Do you have the DirectX SDK installed? If not, you should try that to have ANGLE enabled (and hopefully to make away with your problem).

                    Read and abide by the Qt Code of Conduct

                    mzimmersM 1 Reply Last reply
                    1
                    • kshegunovK kshegunov

                      Do you have the DirectX SDK installed? If not, you should try that to have ANGLE enabled (and hopefully to make away with your problem).

                      mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #24

                      @kshegunov I have no idea, but I'm actually less interested in finding an alternative to -opengl desktop, and more interested in finding out why the -opengl desktop option doesn't "take" unless it's specified by itself (separate configure command). But I'll look into the ANGLE alternative if I can't figure this out.

                      I'm seeing all kinds of weirdness with this build attempt. My attempts to build on my system drive used up over 260GB of space before failing, so I installed an old HD I had, moved the installer over there, and it built, using only 30GB. As usual, I have absolutely no explanation why this would be the case.

                      Thanks...

                      kshegunovK 1 Reply Last reply
                      0
                      • mzimmersM mzimmers

                        @kshegunov I have no idea, but I'm actually less interested in finding an alternative to -opengl desktop, and more interested in finding out why the -opengl desktop option doesn't "take" unless it's specified by itself (separate configure command). But I'll look into the ANGLE alternative if I can't figure this out.

                        I'm seeing all kinds of weirdness with this build attempt. My attempts to build on my system drive used up over 260GB of space before failing, so I installed an old HD I had, moved the installer over there, and it built, using only 30GB. As usual, I have absolutely no explanation why this would be the case.

                        Thanks...

                        kshegunovK Offline
                        kshegunovK Offline
                        kshegunov
                        Moderators
                        wrote on last edited by
                        #25

                        @mzimmers said in problems creating static Qt (was "5.10.1 broke one of my builds"):

                        I have no idea, but I'm actually less interested in finding an alternative to -opengl desktop

                        Well, my asking is because ANGLE as far as I know interfaces with the D3D API and should make your build problem go away. Again, I'm speculating, but it's worth a try I think.

                        Read and abide by the Qt Code of Conduct

                        mzimmersM 1 Reply Last reply
                        0
                        • kshegunovK kshegunov

                          @mzimmers said in problems creating static Qt (was "5.10.1 broke one of my builds"):

                          I have no idea, but I'm actually less interested in finding an alternative to -opengl desktop

                          Well, my asking is because ANGLE as far as I know interfaces with the D3D API and should make your build problem go away. Again, I'm speculating, but it's worth a try I think.

                          mzimmersM Offline
                          mzimmersM Offline
                          mzimmers
                          wrote on last edited by
                          #26

                          @kshegunov the build no longer fails, now that I'm using the 2nd configure command. But I'll look into your suggestion. If it results in a smaller footprint, it's worth doing.

                          1 Reply Last reply
                          1
                          • mzimmersM Offline
                            mzimmersM Offline
                            mzimmers
                            wrote on last edited by mzimmers
                            #27

                            I've come to the conclusion that my original problem stemmed from an odd issue with Powershell. A step in the script invokes an DOS script which in turn invokes the configure.exe program, passing through all arguments it received. At some point, at least one of the arguments "-opengl desktop" is lost. This occurs with Windows PowerShell 5.1 as well as PowerShell Core 6.0.2.

                            My workaround is to change the script. This area:

                                # Configure, compile and install Qt.
                                Push-Location $QtSrcDir
                                cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
                                    -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -no-openssl `
                                    -opensource -confirm-license `
                                    -make libs -nomake tools -nomake examples -nomake tests"
                                mingw32-make -k -j4
                                mingw32-make -k install
                                Pop-Location
                            

                            Should be changed to:

                                # Configure, compile and install Qt.
                                Push-Location $QtSrcDir
                                cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
                                    -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl `
                                    -opensource -confirm-license -skip qtwebengine`
                                    -make libs -nomake tools -nomake examples -nomake tests"
                                cmd /c "configure.bat -redo -opengl desktop"
                                mingw32-make -k -j4
                                mingw32-make -k install
                                Pop-Location
                            

                            Note that I also removed the "-qt-sql-sqlite" option due to other errors. I'd also recommend that you consider changing "-debug-and-release" to "-release."

                            Thanks to all who looked at this with me.

                            1 Reply Last reply
                            4
                            • S Offline
                              S Offline
                              sbaeder
                              wrote on last edited by
                              #28

                              To me, looking at the most current (1903) version of Windows 10, that you have to sent the whole thing as ONE line to the cmd process. The log I captured showed it only doing the first line (partial command). This caused it to try to do the examples, etc.

                              Sent it over as ONE long line in the powershell file, and seems to be working better!

                              But having this all on one is great! Thanks

                              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