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

Reconfiguring a top-level build without an explicit prefix turns it into a non-prefix build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 Beta3
    • Fix Version/s: 6.2.2, 6.3.0
    • Component/s: Build System: CMake
    • Labels:
      None
    • Commits:
      7be143f43849dc9a6917d4165a7ec459f53983b8

      Description

      Configure qt5.git with

      ./../worktrees/dev/configure -- -DQT_BUILD_SUBMODULES="qtsvg"
      

      Make sure you don't have any Preload.cmake file or anything else that would set an explicit prefix or enable developer-build feature (non-prefix build).

      Upon the end of configuration, you get the following output

      Once everything is built, you must run 'cmake --install .'
      

      If you reconfigure with same args in the same folder again a second time, you get

      Once everything is built, Qt is installed. You should NOT run 'cmake --install .'
      

      The build turns into a non-prefix build, as evidenced by checking that QT_WILL_INSTALL is set to OFF in CMakeCache.txt.

      The symptomatic flip is observed in the second cmake call, but the reason is in the first call.

      With --trace-redirect --trace-expand at the first configure call, one can see that when QtBuildInternalsExtra.cmake is loaded during qtsvg configuration, CMAKE_INSTALL_PREFIX is reset from /usr/local to the qtbase build folder.

      /Users/alex/Dev/cmake/Modules/CMakeGenericSystem.cmake(169):  set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH Install path prefix, prepended onto install directories. )
      
      ....
      
      /Volumes/T3/Dev/qt/qt5_cmake/worktrees/dev/qtbase/cmake/QtSetup.cmake(83):  set(CMAKE_INSTALL_PREFIX /usr/local/Qt-6.2.0 CACHE PATH Install path prefix, prepended onto install directories. FORCE )
      
      ....
      
      /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-mac-super-reconfigure/qtbase/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake(37):  set(CMAKE_INSTALL_PREFIX /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-mac-super-reconfigure/qtbase CACHE PATH Install path prefix, prepended onto install directories. FORCE )
      

      This only happens in a top-level build with more than 1 repo.

      Doesn't seem to happen if an explicit -prefix or CMAKE_INSTALL_PREFIX is passed when configuring, but not sure, maybe it's just not observable in the output and something might still go wrong.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes