Building static Qt using Mingw32 including openssl fails
-
Hi,
Im having an issue when building Qt statically. Specifically Im getting the following error during the installation
mingw32-make[1]: Target 'install' not remade because of errors. mingw32-make[1]: Leaving directory 'C:/Qt/Static5113OpenSSL/src/qt-everywhere-src-5.11.3/qtbase' Makefile:91: recipe for target 'module-qtbase-install_subtargets' failed mingw32-make: *** [module-qtbase-install_subtargets] Error 2 mingw32-make: Target 'install' not remade because of errors.
Notes: python installed , ActiveState Perl installed, cmd is running with admin privs
the following command is executed from
qt-windows-static-build.ps1
powershell scriptcmd /c "configure -static -debug-and-release -opensource -confirm-license -ssl -openssl -openssl-linked -opengl desktop -platform win32-g++ -prefix 'C:\Qt\Static5113OpenSSL\StaticOpenSSL64' -no-compile-examples -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -qt-sqlite -webengine-pepper-plugins -webengine-proprietary-codecs -make libs -nomake tools -nomake examples -nomake tests -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib\VC\static OPENSSL_LIBS="" -lUser32 -lAdvapi32 -lGdi32 -lCrypt32"" OPENSSL_LIBS_DEBUG="" -lssleay32MTd -llibeay32MTd"" OPENSSL_LIBS_RELEASE=""-lssleay32MT -llibeay32MT"" "
Can anyone help with this issue ?
-
@xenovas said in Building static Qt using Mingw32 including openssl fails:
mingw32-make[1]: Target 'install' not remade because of errors.
You forgot to post the actual errors (which are somewhere above that line)...
-
@jsulm thank you for your response. There are multiple errors. Everything is failing... the entire build process is failing.
Nevertheless looking at
config.log
i see the followingloaded result for config test config.qtwebengine.tests.webengine-winversion + cd /d C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\config.tests\winversion && C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" "QMAKE_LIBDIR += \'C:\\OpenSSL-Win32\\lib\\VC\\static\'" "INCLUDEPATH += \'C:\\OpenSSL-Win32\\include\'" C:/Qt/Static5113OpenSSL/src/qt-everywhere-src-5.11.3/qtwebengine/config.tests/winversion + cd /d C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\config.tests\winversion && set MAKEFLAGS=& mingw32-make > g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -IC:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtwebengine\config.tests\winversion -I. -I'C:\OpenSSL-Win32\include' -IC:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtbase\mkspecs\win32-g++ -o winversion.o C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtwebengine\config.tests\winversion\winversion.cpp > C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3\qtwebengine\config.tests\winversion\winversion.cpp:30:2: error: #error unsupported Visual Studio version > #error unsupported Visual Studio version > ^ > Makefile:165: recipe for target 'winversion.o' failed > mingw32-make: *** [winversion.o] Error 1 test config.qtwebengine.tests.webengine-winversion FAILED
I have visual studio 2017 community edition installed..
Qt 5.11.3 installations
mingw53_32 msvc2015 msvc2015_64 msvc2017_64
-
@jsulm Well, i have set the Mingw32\bin to the windows path. then inside the powershell script i run the following
mingw32-make -k -j8 mingw32-make -k install
but before running the powershell script i run the following
@echo off REM Set up \Microsoft Visual Studio 2015, where <arch> is \c amd64, \c x86, etc. CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" REM Edit this location to point to the source code of Qt SET _ROOT=C:\Qt\Static5113OpenSSL\src\qt-everywhere-src-5.11.3 SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% REM Uncomment the below line when using a git checkout of the source repository REM SET PATH=%_ROOT%\qtrepotools\bin;%PATH% REM Uncomment the below line when building with OpenSSL enabled. If so, make sure the directory points REM to the correct location (binaries for OpenSSL). REM SET PATH=C:\openssl\x86\release\bin;%PATH% SET PATH=C:\openssl\x64\release\bin;%PATH% REM When compiling with ICU, uncomment the lines below and change <icupath> appropriately: REM SET INCLUDE=<icupath>\include;%INCLUDE% REM SET LIB=<icupath>\lib;%LIB% REM SET PATH=<icupath>\lib;%PATH% REM uncomment the following line to use multiple cores on compile time SET CL=/MP REM Contrary to earlier recommendations, do NOT set QMAKESPEC. SET _ROOT= REM Keeps the command line open when this script is run. cmd /k
I have followed the exact same process some time ago and everything went fine. ..
-
@xenovas said in Building static Qt using Mingw32 including openssl fails:
but before running the powershell script i run the following
Why are you setting up Microsoft compiler if you want to use MinGW?!
If you want to use MinGW to build simply start the MinGW terminal (you can find it in start menu).
-
@xenovas Make sure you're building in a clean build folder (without build artefacts from previous tries).
So, create a new build folder, change to that folder and do all the steps again (like calling configure, make, make install).