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

top-level in-source build detected as prefix build pointing to build dir and removes moc upon install

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.2.1
    • Fix Version/s: 6.3.0 Alpha
    • Component/s: Build System: CMake
    • Labels:
      None
    • Environment:
      Kubuntu 20.04 with CMake version 3.16.3
    • Platform/s:
      Linux/X11
    • Commits:
      7be143f43849dc9a6917d4165a7ec459f53983b8 (qt/qtbase/dev) ab91acb96193f1dfbb0cfcee9874a711ab109a53 (qt/qtbase/6.2)

      Description

      Installed by official Online Installer sources of Qt 6.2.1 failed to install after successful build.

      I do

      ./configure -nomake tests -nomake examples -skip qttest -skip qtwebengine -skip qtwebview -skip qtpositioning -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtnfc -skip qtcharts -skip qt3d -skip qtwayland -skip qtcoap -skip qtdatavis3d -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua -skip qtquick3d -skip qtquicktimeline -skip qtremoteobjects -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwebsockets -release -shared -skip qt5compat -skip qtdoc -skip qtscxml -skip qttranslations -skip qttools

      Then

      cmake --build . --parallel
      

      Build is successful.

      But

      cmake --install .
      

      Failed with removed moc executable.

      The reason is in install scripts, that have

      file(RPATH_CHECK
          FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/./libexec/moc"
          RPATH "\$ORIGIN/../lib")
      

      But actual RPATH in binaries after build in my case is

      ::::::::::::::
      

      And RPATH_CHECK deletes moc, and installation fails.

      I'm on Kubuntu 20.04 with CMake version 3.16.3.

      Not sure, don't remember, I did a lot of builds, but latest CMake release do the same with your projects, as I remember.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              jbornema Joerg Bornemann
              Reporter:
              igor.mironchik Igor Mironchik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes