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

Shadow builds on Windows with -prefix incorrectly build Qt libs to <prefix>\bin during build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0
    • 4.8.1
    • Build System
    • None
    • Windows, Visual Studio 2010

    Description

      Configure Qt for a shadow build and with -prefix and -bindir options passed to configure, the EXEs are built in the shadow directory but the DLLs are built to the <prefix>\bin. The DLLs are also built to <shadowdir>\lib so I assume that they are then copied during build to <prefix>\bin.

      For example:

      Qt Source is in \builds\qt\4.8.1\source
      <shadowdir> is \builds\qt\4.8.1\shadow-vc10-x64
      <prefix> is C:\Qt\4.8.1
      <bindir> is C:\Qt\4.8.1\bin64

      > cd \builds\qt\4.8.1
      > mkdir shadow-vc10-x64
      > cd shadow-vc10-x64
      > ..\source\configure -prefix C:\Qt\4.8.1 -bindir C:\Qt\4.8.1\bin64 -libdir C:\Qt\4.8.1\lib64 -nomake examples -nomake demos -no-qt3support (and other options)
      > nmake

      The Qt*.dll files are output to <prefix>\bin during the build process, while executables such as qmake.exe, designer.exe, etc., are correctly built to <shadowdir>\bin.

      Two exceptions are QtDesigner4.dll and QtDesignerComponents4.dll, which are correctly built to <shadowdir>\bin.

      > nmake install

      Most files are then copied to C:\Qt\4.8.1\bin64, as specified by -bindir.

      Additional issues with this type of build:

      • In order to build this way, that is by specifying alternate <prefix>, you must manually copy the "mkspecs" directory to <prefix>.
      • "dumpcpp.exe" is not copied to <bindir> by "nmake install".
      • The DLLs which were placed in <prefix>\bin can be manually moved to <shadowdir>\bin and the "nmake install" process will still complete successfully.

      Ideally, nothing should exist in <prefix> until "nmake install" is run, and all files generated by the build should be within the <shadowdir> hierarchy.

      In this example I use 64-bit build but the same behaviour is observed whether building for 32-bit, debug-only, release-only or debug-and-release.

      A full list of files in <prefix>\bin after building but before installing:

      • phonon4.dll
      • QtCore4.dll
      • QtDeclarative4.dll
      • QtGui4.dll
      • QtMultimedia4.dll
      • QtNetwork4.dll
      • QtOpenGL4.dll
      • QtScript4.dll
      • QtScriptTools4.dll
      • QtSql4.dll
      • QtSvg4.dll
      • QtTest4.dll
      • QtWebkit4.dll
      • QtXml4.dll
      • QtXmlPatterns4.dll

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            meheler Mike Eheler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes