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

Building against Qt in /usr/lib64 (anything != $prefix/lib) with CMake fails

    XMLWordPrintable

Details

    • cc32a691936f37eaaec618a71edd62f896009c9d (qt/qtbase/5.13)

    Description

      Qt adds wrong file paths into the linker call in CMake project builds:

      [ 66s] c++: error: /usr/lib/libQt5Widgets.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libQt5Gui.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libQt5Core.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libQt5Widgets.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libQt5Gui.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libQt5Core.so: No such file or directory
      [ 66s] c++: error: /usr/lib/libGL.so: No such file or directory

      This seems to be because "/lib" is hardcoded in Qt5BasicConfig.cmake.in:

      get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)

      Attachments

        1. kross_build.log
          117 kB
        2. libQt5UiTools.prl
          1 kB
        3. Qt5CoreConfig.cmake
          7 kB
        4. Qt5UiToolsConfig.cmake
          11 kB

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              vogtinator Fabian Vogt
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes