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. Build Static Qt fails with Project Error
Forum Updated to NodeBB v4.3 + New Features

Build Static Qt fails with Project Error

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 2 Posters 3.5k Views 2 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.
  • xenovasX Offline
    xenovasX Offline
    xenovas
    wrote on last edited by
    #1

    Hello , im trying to build a static Qt on windows 10 but i get the following error. i have to mention though that Python 2.7 is on my env path. Can anyone help me with this ?

    ImportError: No module named site
    Project ERROR: Building QtQml requires Python.
    Makefile:342: recipe for target 'module-qtdeclarative-install_subtargets' failed
    mingw32-make: *** [module-qtdeclarative-install_subtargets] Error 3
    mingw32-make: Target 'install' not remade because of errors.
    Press Enter to continue...:
    

    @xen0vas

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

      Hi,

      Check this Stack Overflow thread, your issue seems similar.

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

      xenovasX 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Check this Stack Overflow thread, your issue seems similar.

        xenovasX Offline
        xenovasX Offline
        xenovas
        wrote on last edited by
        #3

        @SGaist ok it seems i have managed to define the environmental variables correctly but the build process takes forever.. too many hours and still going..

        @xen0vas

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

          Are you using all your computer's processors for the build ?

          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
          • xenovasX Offline
            xenovasX Offline
            xenovas
            wrote on last edited by
            #5

            @SGaist not sure , ive just used info from this site https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW and choosed the powershell option.. Then i did some modifications to the powershell script in order to include openssl paths into build process according to this thread https://forum.qt.io/topic/94328/qt-static-with-openssl-issue/20 .. don't know got a bit lost , any help would be appreciated..

            @xen0vas

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

              What version of python 2.7 are you using ?

              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
              • xenovasX Offline
                xenovasX Offline
                xenovas
                wrote on last edited by xenovas
                #7

                @SGaist im back.. So im trying to find my steps around static building and luckily i think im in the right way... no prob with python anymore as well as perl as they are all in the right path now.. regarding your question, im using python 2.7.15 version but this is not the case. Anyway, many things arising that require specific knowledge as for example the OpenSSL lib which i want to use in my project... So what i did is the following.. i took the powershell script from here https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW and i did some modifications.. for example i have changed the configuration process as follows

                cmd /c "configure -static -debug-and-release -opensource -confirm-license -ssl -openssl -openssl-linked -opengl desktop -platform win32-g++ -prefix $QtDir -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"" "
                

                When all the above finish the building process will continue using the two following commands

                mingw32-make -k -j8
                mingw32-make -k install
                

                the -j8 option indicates that there will be multiple parallel jobs in compilation process....

                before running the script i have created the following batch script qt5vars.bat to run before all other scripts in order to create the environment in Windows 10

                @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\vcvarsall.bat" x86_amd64
                
                REM Edit this location to point to the source code of Qt
                SET _ROOT=C:\Qt\Static5113\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).
                SET PATH=C:\OpenSSL-Win32\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
                

                The run.bat script has been taken from here https://www.youtube.com/watch?v=lwX_urJJOf8

                Anywayz... after all the above the building process still takes forever and eventually fails as well as it also cannot check for OpenSSL libs which i have included them inside the scripts

                Why there is not a straight forward working process for all these ? ? Why we have to go to through all this pain and time consuming process in order to do one static build in Qt ?

                @xen0vas

                1 Reply Last reply
                0
                • xenovasX Offline
                  xenovasX Offline
                  xenovas
                  wrote on last edited by
                  #8

                  ok build finished with errors

                  mingw32-make: Target 'install' not remade because of errors.
                  

                  now what ... . ?

                  @xen0vas

                  1 Reply Last reply
                  0
                  • xenovasX Offline
                    xenovasX Offline
                    xenovas
                    wrote on last edited by xenovas
                    #9
                    [.......]
                    
                         1 file(s) copied.
                    C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install qinstall C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtsvg\lib\cmake\Qt5Svg\Qt5Svg_QSvgIconPlugin.cmake C:\Qt\Static5113\5.11.3_Static\lib\cmake\Qt5Svg\Qt5Svg_QSvgIconPlugin.cmake
                    mingw32-make[6]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins/iconengines/svgiconengine'
                    C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Release install
                    mingw32-make[6]: Entering directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins/iconengines/svgiconengine'
                    C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install qinstall C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtsvg\mkspecs\modules-inst\qt_plugin_qsvgicon.pri C:\Qt\Static5113\5.11.3_Static\mkspecs\modules\qt_plugin_qsvgicon.pri
                    C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install sed -e "s,C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/[^/][^/]*/lib,$$[QT_INSTALL_LIBS],g" -e "s,C:\\\\Qt\\\\Static5113\\\\src\\\\qt-everywhere-src-5.11.3\\\\[^\\\\][^\\\\]*\\\\lib,$$[QT_INSTALL_LIBS],gi" ..\..\..\..\plugins\iconengines\qsvgicon.prl > C:\Qt\Static5113\5.11.3_Static\plugins\iconengines\qsvgicon.prl
                    copy /y ..\..\..\..\plugins\iconengines\libqsvgicon.a C:\Qt\Static5113\5.11.3_Static\plugins\iconengines\libqsvgicon.a
                            1 file(s) copied.
                    C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtbase\bin\qmake.exe -install qinstall C:\Qt\Static5113\src\qt-everywhere-src-5.11.3\qtsvg\lib\cmake\Qt5Svg\Qt5Svg_QSvgIconPlugin.cmake C:\Qt\Static5113\5.11.3_Static\lib\cmake\Qt5Svg\Qt5Svg_QSvgIconPlugin.cmake
                    mingw32-make[6]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins/iconengines/svgiconengine'
                    mingw32-make[5]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins/iconengines/svgiconengine'
                    mingw32-make[4]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins/iconengines'
                    mingw32-make[3]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src/plugins'
                    mingw32-make[2]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg/src'
                    mingw32-make[1]: Leaving directory 'C:/Qt/Static5113/src/qt-everywhere-src-5.11.3/qtsvg'
                    mingw32-make: Target 'install' not remade because of errors.
                    Press Enter to continue...:
                    

                    @SGaist Any suggestions ?

                    @xen0vas

                    1 Reply Last reply
                    0
                    • xenovasX Offline
                      xenovasX Offline
                      xenovas
                      wrote on last edited by xenovas
                      #10

                      @xenovas said in Build Static Qt fails with Project Error:

                      mingw32-make: Target 'install' not remade because of errors

                      i was wondering if there is no need to worry about this error ...?

                      @xen0vas

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

                        Well, if there's an error somewhere, better fix it. However you don't show said error in what you posted.

                        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
                        • xenovasX Offline
                          xenovasX Offline
                          xenovas
                          wrote on last edited by
                          #12

                          Yes you are right.. Anyway i finally made it !!! i have a standalone exe running .. ! Static build is done Yeah Wooohoo.. Thanks @SGaist

                          @xen0vas

                          xenovasX 1 Reply Last reply
                          0
                          • xenovasX xenovas

                            Yes you are right.. Anyway i finally made it !!! i have a standalone exe running .. ! Static build is done Yeah Wooohoo.. Thanks @SGaist

                            xenovasX Offline
                            xenovasX Offline
                            xenovas
                            wrote on last edited by
                            #13

                            @SGaist i also have OpenSSL included to my projects now !

                            @xen0vas

                            1 Reply Last reply
                            0
                            • xenovasX Offline
                              xenovasX Offline
                              xenovas
                              wrote on last edited by
                              #14

                              Ok and for those who want to know how to include OpenSSL lib and headers to their projects

                              add the following lines to your .pro file in your project

                              LIBS += -LC:/OpenSSL-Win32/lib -lssleay32
                              INCLUDEPATH += C:/OpenSSL-Win32/include
                              

                              @xen0vas

                              1 Reply Last reply
                              1

                              • Login

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