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

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

XMLWordPrintable

    • cc32a691936f37eaaec618a71edd62f896009c9d (qt/qtbase/5.13)

      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)

        1. kross_build.log
          117 kB
        2. libQt5UiTools.prl
          1 kB
        3. Qt5CoreConfig.cmake
          7 kB
        4. Qt5UiToolsConfig.cmake
          11 kB
        For Gerrit Dashboard: QTBUG-76255
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes