Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73217

Qt Quick Applications fail to start when Qt is built with -static -static-runtime options

    XMLWordPrintable

Details

    • Windows
    • 15525d2a309a6028d548797bc777e38905f36c46 c642f44448752972f89a121b125873f187e088b3 (qt/qtdeclarative/5.12)

    Description

      I'm trying to build Qt 5.12 from source with -static and - static-runtime options as I've been building in the last 4 years since Qt 5.8 without success. 

      The build happens smoothly but when I try to run a app, the app simply crashes without anykind of feedback on console or if ran by double clicking the exe in windows explorer. Dependency Walker stays a long time (>5minutes) to display the output and displays a lot of missing files but those I believe are mean't to be resolved at run time.

      Curiously, a simple Qt console application works correctly. However, a simple Qt Quick application template from Qt Creator fails to start and reproduces the problem.

      My last production kit was based on Qt 5.10 and I have been using it until today on both Windows and Mac OSX. I'm currently trying to adopt 5.12. It is working perfectly on Mac OSX so far. It is important to refer that if I compile without -static -static-runtime options, it works as expected. Unfortunately my line or products required this to be compiled static as I'm producing plugins that are embedded into third party software hosts.

      This is what I am doing to build it with -static -static-runtime options on Windows: 

      // on a git bash console
      > git clone git://code.qt.io/qt/qt5.git src
      > perl init-repository -f --module-subset=qtbase,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols,qtquickcontrols2,qtwinextras,qtsvg,qtwebsockets
      
      // on a windows msvc2017 command prompt
      > "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
      > SET _ROOT=C:\Qt\5.12.0\src\
      > SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%;C:\Python\Python37-32\
      > configure -confirm-license -recheck -prefix c:\Qt\5.12.0\msvc2017_static_64 -commercial -static -static-runtime -nomake examples -nomake tools -nomake tests -opengl dynamic
      > jom.exe
      > nmake install

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ulherman Ulf Hermann
              sinosoidal Nuno Santos
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes