Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.15.2 static build on Windows / MinGW with openssl

Qt 5.15.2 static build on Windows / MinGW with openssl

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 1 Posters 753 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.
  • A Offline
    A Offline
    AxelVienna
    wrote on 12 Aug 2021, 08:14 last edited by
    #1

    Dear all,
    I am trying a static build with openssl linked.
    I am using QT 5.15.2 with OpenSSL 1.1.1 installed.

    Param section of the PowerShell script is

    param(
        $QtSrcUrl = "https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip",
        $QtStaticDir = "C:\Qt\Static", # NO TRAILING SLASH
        $QtVersion = "5.15.2", #If you change this, you'll need to change the URL above to download as well...
        $MingwDir = "",
        $OPENSSL_HOME = "C:\OpenSSL-Win64",
        [switch]$NoPause = $false
    )
    

    The build command is:

        cmd /c "configure.bat -static -release -platform win32-g++ -opensource -confirm-license -prefix $QtDir -qt-zlib -qt-libpng -qt-webp -qt-libjpeg -qt-freetype  -no-opengl -openssl-linked -I $($OPENSSL_HOME)\include\openssl -L$($OPENSSL_HOME)\lib\MinGW -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtsensors -skip qtspeech -skip qtsvg -skip qtwayland -skip qtwebglplugin -skip qtwebview -skip webengine -make libs -nomake tools -nomake examples -nomake tests"
    

    I run into an error which boils down to alloca.h being missing during the checks prior to compiling openssl.
    Needless to say that the OpenSSL bin is in my PATH variable and all paths set in the PowerShell script are correct.

    What am I missing?

    Thanks in advance and brgds
    Axel

    C++ and Python walk into a bar. C++ reuses the first glass.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AxelVienna
      wrote on 13 Aug 2021, 04:28 last edited by
      #2

      This is the output of the powershell script I have downloaded from the internet:

      Running configuration tests...
      Done running configuration tests.
      Configure summary:
      Build type: win32-g++ (x86_64, CPU features: cx16 mmx sse sse2 sse3)
      Compiler: gcc 8.1.0
      Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 compile_examples largefile precompile_header rdrnd shani x86SimdAlways release c++11 c++14 c++17 c++1z concurrent 
      dbus no-pkg-config static stl
      Build options:
        Mode ................................... release
        Optimize release build for size ........ no
        Building shared libraries .............. no
        Using C standard ....................... C11
        Using C++ standard ..................... C++17
        Relocatable ............................ no
        Using precompiled headers .............. yes
        Using LTCG ............................. no
        Target compiler supports:
          SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
          AVX .................................. <none>
          AVX512 ............................... <none>
          Other x86 ............................ AES RDRAND SHA
          Intrinsics without -mXXX option ...... yes
        Build parts ............................ libs
        App store compliance ................... no
      Qt modules and options:
        Qt Concurrent .......................... yes
        Qt D-Bus ............................... yes
        Qt D-Bus directly linked to libdbus .... no
        Qt Gui ................................. yes
        Qt Network ............................. yes
        Qt Sql ................................. yes
        Qt Testlib ............................. yes
        Qt Widgets ............................. yes
        Qt Xml ................................. yes
      Support enabled for:
        Using pkg-config ....................... no
        udev ................................... no
        Using system zlib ...................... no
        Zstandard support ...................... no
      Qt Core:
        DoubleConversion ....................... yes
          Using system DoubleConversion ........ no
        GLib ................................... no
        iconv .................................. no
        ICU .................................... no
        Built-in copy of the MIME database ..... yes
        Tracing backend ........................ <none>
        Logging backends:
          journald ............................. no
          syslog ............................... no
          slog2 ................................ no
        PCRE2 .................................. yes
          Using system PCRE2 ................... no
      Qt Network:
        getifaddrs() ........................... no
        IPv6 ifname ............................ no
        libproxy ............................... no
        Schannel ............................... no
        OpenSSL ................................ no
          Qt directly linked to OpenSSL ........ no
        OpenSSL 1.1 ............................ no
        DTLS ................................... no
        OCSP-stapling .......................... no
        SCTP ................................... no
        Use system proxies ..................... yes
        GSSAPI ................................. no
      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
        Text formats:
          HtmlParser ........................... yes
          CssParser ............................ yes
          OdfWriter ............................ yes
          MarkdownReader ....................... yes
            Using system libmd4c ............... no
          MarkdownWriter ....................... yes
        EGL .................................... no
        OpenVG ................................. no
        OpenGL:
          ANGLE ................................ no
          Desktop OpenGL ....................... no
          Dynamic OpenGL ....................... no
          OpenGL ES 2.0 ........................ no
          OpenGL ES 3.0 ........................ no
          OpenGL ES 3.1 ........................ no
          OpenGL ES 3.2 ........................ no
        Vulkan ................................. no
        Session Management ..................... yes
      Features used by QPA backends:
        evdev .................................. no
        libinput ............................... no
        INTEGRITY HID .......................... no
        mtdev .................................. no
        tslib .................................. no
        xkbcommon .............................. no
        X11 specific:
          XLib ................................. no
          XCB Xlib ............................. no
          EGL on X11 ........................... no
          xkbcommon-x11 ........................ no
      QPA backends:
        DirectFB ............................... no
        EGLFS .................................. no
        LinuxFB ................................ no
        VNC .................................... no
        Windows:
          Direct 2D ............................ yes
          DirectWrite .......................... yes
          DirectWrite 2 ........................ yes
      Qt Sql:
        SQL item models ........................ yes
      Qt Widgets:
        GTK+ ................................... no
        Styles ................................. Fusion Windows WindowsVista
      Qt PrintSupport:
        CUPS ................................... no
      Qt Sql Drivers:
        DB2 (IBM) .............................. no
        InterBase .............................. no
        MySql .................................. no
        OCI (Oracle) ........................... no
        ODBC ................................... yes
        PostgreSQL ............................. no
        SQLite2 ................................ no
        SQLite ................................. yes
          Using system provided SQLite ......... no
        TDS (Sybase) ........................... no
      Qt Testlib:
        Tester for item models ................. yes
      Serial Port:
        ntddmodm ............................... yes
      Qt SerialBus:
        Socket CAN ............................. no
        Socket CAN FD .......................... no
        SerialPort Support ..................... yes
      Further Image Formats:
        JasPer ................................. no
        MNG .................................... no
        TIFF ................................... yes
          Using system libtiff ................. no
        WEBP ................................... yes
          Using system libwebp ................. no
      QtXmlPatterns:
        XML schema support ..................... yes
      Qt Tools:
        Qt Assistant ........................... yes
        Qt Designer ............................ yes
        Qt Distance Field Generator ............ yes
        kmap2qmap .............................. yes
        Qt Linguist ............................ yes
        Mac Deployment Tool .................... no
        makeqpf ................................ yes
        pixeltool .............................. yes
        qdbus .................................. yes
        qev .................................... yes
        Qt Attributions Scanner ................ yes
        qtdiag ................................. yes
        qtpaths ................................ yes
        qtplugininfo ........................... yes
        Windows deployment tool ................ yes
        WinRT Runner Tool ...................... no
      Qt Tools:
        QDoc ................................... no
      Note: Using static linking will disable the use of dynamically
      loaded plugins. Make sure to import all needed static plugins,
      or compile needed modules into the library.
      WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
      Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
      On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
      On macOS, you can use Homebrew's llvm package.
      On Windows, you must set LLVM_INSTALL_DIR to the installation path.
      ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && !features.schannel && libs.openssl' failed.
      Check config.log for details.
      mingw32-make : mingw32-make: *** No targets specified and no makefile found.  Stop.
      In C:\Users\User\Downloads\qt-windows10-static-build.ps1:162 Zeichen:5
      +     mingw32-make #-k -j4
      +     ~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (mingw32-make: *...e found.  Stop.:String) [], RemoteException
          + FullyQualifiedErrorId : NativeCommandError
       
      mingw32-make : mingw32-make: *** No rule to make target 'install'.  Stop.
      In C:\Users\User\Downloads\qt-windows10-static-build.ps1:163 Zeichen:5
      +     mingw32-make install #-k install
      +     ~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (mingw32-make: *...nstall'.  Stop.:String) [], RemoteException
          + FullyQualifiedErrorId : NativeCommandError
       
      Out-File : Ein Teil des Pfades "C:\Qt\Static\5.15.2\mkspecs\win32-g++\qmake.conf" konnte nicht gefunden werden.
      In C:\Users\User\Downloads\qt-windows10-static-build.ps1:170 Zeichen:6
      + "@ | Out-File -Append $File -Encoding Ascii
      +      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OpenError: (:) [Out-File], DirectoryNotFoundException
          + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
      

      C++ and Python walk into a bar. C++ reuses the first glass.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AxelVienna
        wrote on 13 Aug 2021, 04:32 last edited by
        #3

        And this is config.log with the alloca.h error

        Command line: -static -release -platform win32-g++ -opensource -confirm-license -prefix C:\Qt\Static\5.15.2 -qt-zlib -qt-libpng -qt-webp -qt-libjpeg -qt-freetype -openssl-linked -no-opengl -skip qt3d -skip doc -skip webengine -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtsensors -skip qtspeech -skip qtsvg -skip qtwayland -skip qtwebglplugin -skip qtwebview -skip webengine -make libs -nomake tools -nomake examples -nomake tests
        loaded result for config test config.qtbase.tests.verifyspec
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\verifyspec && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/verifyspec
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\verifyspec && set MAKEFLAGS=& mingw32-make
        > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\verifyspec -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++  -o verifyspec.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\verifyspec\verifyspec.cpp
        > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o verifyspec.exe verifyspec.o  
        test config.qtbase.tests.verifyspec succeeded
        loaded result for config test config.qtbase.tests.architecture
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\arch && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/arch
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\arch && set MAKEFLAGS=& mingw32-make
        > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\arch -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++  -o arch.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\arch\arch.cpp
        > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o arch.exe arch.o  
        Detected architecture: x86_64 (cx16 mmx sse sse2 sse3)
        test config.qtbase.tests.architecture gave result x86_64
        loaded result for config test config.qtbase.tests.sse2
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=sse2" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/x86_simd
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && set MAKEFLAGS=& mingw32-make
        > g++ -c -fno-keep-inline-dllexport -msse2 -mstackrealign -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_SSE2 -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++  -o main.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd\main.cpp
        > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o x86_simd.exe main.o  
        test config.qtbase.tests.sse2 succeeded
        loaded result for config test config.qtbase.tests.aesni
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=aesni" C:/Qt/Static/src/qt-everywhere-src-5.15.2/qtbase/config.tests/x86_simd
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\x86_simd && set MAKEFLAGS=& mingw32-make clean && set MAKEFLAGS=& mingw32-make
        > del main.o
        > g++ -c -fno-keep-inline-dllexport -maes -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_AESNI -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++  -o main.o C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\config.tests\x86_simd\main.cpp
        > g++ -static -static-libgcc -Wl,-s -Wl,-subsystem,console -mthreads -o x86_simd.exe main.o  
        test config.qtbase.tests.aesni succeeded
        loaded result for config test config.qtbase.tests.alloca_h
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\alloca_h && C:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" C:/Qt/Static/src/qt-everywhere-src-5.15.2/config.tests/alloca_h
        + cd /d C:\Qt\Static\src\qt-everywhere-src-5.15.2\config.tests\alloca_h && set MAKEFLAGS=& mingw32-make
        > g++ -c -fno-keep-inline-dllexport -O2 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -I. -IC:\Qt\Static\src\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-g++  -o main.o main.cpp
        > main.cpp:2:10: fatal error: alloca.h: No such file or directory
        >  #include <alloca.h>
        >           ^~~~~~~~~~
        > compilation terminated.
        

        C++ and Python walk into a bar. C++ reuses the first glass.

        1 Reply Last reply
        0

        3/3

        13 Aug 2021, 04:32

        • Login

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