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

QT_ADDITIONAL_PACKAGES_PREFIX_PATH ignored on certain cross-compilations

    XMLWordPrintable

    Details

    • Commits:
      6b6d42f6b814ab7814c795744fd6212b9b4d54fb (qt/qtbase/dev) 9ffe89393a1c3a0545558454b05dc40168c9bfd8 (qt/qtbase/6.2)

      Description

      Cross-compilation of some modules e.g. qtlottie on conan with all paths provided by 
      QT_ADDITIONAL_PACKAGES_PREFIX_PATH fails to find correct qt libraries.

      This appears to be caused by CMake setting https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PACKAGE.html to "ONLY" by default for cross-compilation. This then causes CMake to ignore the PATHS input to find_package.

      Debug output from find_package with different values on above option. 

      default:
      CMake Debug Log at /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6/Qt6Config.cmake:130 (find_package):
        Paths specified by the find_package HINTS option.    none  
        Paths specified by the find_package PATHS option.    
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake
          /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f
          /home/qt/.conan/data/qtimageformats/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtshadertools/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtsvg/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee    find_package considered the following locations for the Config module:        /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/qt6quicktest-config.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/qt6quicktest-config.cmake  The file was not found.
      
      CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH:
      CMake Debug Log at /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6/Qt6Config.cmake:130 (find_package):
        Paths specified by the find_package HINTS option.    none  
        Paths specified by the find_package PATHS option.    
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake
          /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f
          /home/qt/.conan/data/qtimageformats/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtshadertools/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtsvg/6.2.0-alpha1/qt/everywhere/package/a1177c6ef95af1112af0d0b08ea94485b4173c2d
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee    find_package considered the following locations for the Config module:    /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/qt6quicktest-config.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/qt6quicktest-config.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/qt6quicktest-config.cmake
          /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f/Qt6QuickTestConfig.cmake
          /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f/qt6quicktest-config.cmake
          /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f/lib/cmake/Qt6QuickTest/Qt6QuickTestConfig.cmake  The file was found at    /home/qt/.conan/data/qtdeclarative/6.2.0-alpha1/qt/everywhere/package/f8cb9b34980d021bd231d125c8ba1bd32316303f/lib/cmake/Qt6QuickTest/Qt6QuickTestConfig.cmake
      
      

      build log:

       

      agent:2021/08/13 14:37:16 build.go:394: CMake Error at src/imports/CMakeLists.txt:1 (qt_internal_add_qml_module):
      agent:2021/08/13 14:37:16 build.go:394:   Unknown CMake command "qt_internal_add_qml_module".
      agent:2021/08/13 14:37:16 build.go:394: CMake Error at /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/lib/cmake/Qt6/QtProcessConfigureArgs.cmake:923 (message):
      agent:2021/08/13 14:37:16 build.go:394:   CMake exited with code 1.
      agent:2021/08/13 14:37:16 build.go:394: qtlottie/6.2.0-alpha1@qt/everywhere:
      agent:2021/08/13 14:37:16 build.go:394: qtlottie/6.2.0-alpha1@qt/everywhere: ERROR: Package 'aed27cfff5ada74cf979b3184c1bef1913450ed2' build faileda
      gent:2021/08/13 14:37:16 build.go:394: qtlottie/6.2.0-alpha1@qt/everywhere: WARN: Build folder /home/qt/.conan/data/qtlottie/6.2.0-alpha1/qt/everywhere/build/aed27cfff5ada74cf979b3184c1bef1913450ed2
      agent:2021/08/13 14:37:16 build.go:394: ERROR: qtlottie/6.2.0-alpha1@qt/everywhere: Error in build() method, line 186
      agent:2021/08/13 14:37:16 build.go:394:     build_leaf_qt_module(self)
      agent:2021/08/13 14:37:16 build.go:394: while calling 'build_leaf_qt_module', line 43
      agent:2021/08/13 14:37:16 build.go:394:     run_qt_configure_module_with_additional_packages_prefix(conan_file, build_func=run_qt_configure_module)
      agent:2021/08/13 14:37:16 build.go:394: while calling 'run_qt_configure_module_with_additional_packages_prefix', line 50
      agent:2021/08/13 14:37:16 build.go:394:     build_env_wrap(conan_file, build_func)
      agent:2021/08/13 14:37:16 build.go:394: while calling 'build_env_wrap', line 58
      agent:2021/08/13 14:37:16 build.go:394:     build_func(conan_file)
      agent:2021/08/13 14:37:16 build.go:394: while calling 'run_qt_configure_module', line 77
      agent:2021/08/13 14:37:16 build.go:394:     conan_file.run(cmd, run_environment=True)
      agent:2021/08/13 14:37:16 build.go:394:     ConanException: Error 1 while executing /home/qt/.conan/data/qtbase/6.2.0-alpha1/qt/everywhere/package/0d1e09e061369dc34c51ecf1925c38711ace8eee/bin/qt-configure-module /home/qt/.conan/data/qtlottie/6.2.0-alpha1/qt/everywhere/build/aed27cfff5ada74cf979b3184c1bef1913450ed2  -- -DQT_BUILD_SINGLE_REPO_TARGET_SET=qtlottie -DCMAKE_INSTALL_PREFIX=/home/qt/.conan/data/qtlottie/6.2.0-alpha1/qt/everywhere/package/aed27cfff5ada74cf979b3184c1bef1913450ed2
      agent:2021/08/13 14:37:16 build.go:445: Process finished with error: exit status 1
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              alexandru.croitor Alexandru Croitor
              Reporter:
              tosaario Toni Saario
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes