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

FindGn: fix search path to find Gn when installed on the host with custom install dirs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0
    • Build System, PDF, WebEngine
    • None

    Description

      I install the host build with custom install dirs like this

        -DCMAKE_INSTALL_PREFIX=/usr \
        -DINSTALL_BINDIR=lib/qt-android-6.7-host/bin \
        -DINSTALL_LIBDIR=lib/x86_64-linux-gnu/qt-android-6.7-host \
        -DINSTALL_LIBEXECDIR=lib/x86_64-linux-gnu/qt-android-6.7-host/libexec \ 

      And the android build is configured like this.

        -DCMAKE_INSTALL_PREFIX=/usr \
        -DINSTALL_BINDIR=lib/arm-linux-gnueabihf/qt-android-6.7-armeabi-v7a/bin \
        -DINSTALL_LIBDIR=lib/arm-linux-gnueabihf/qt-android-6.7-armeabi-v7a \
        -DINSTALL_LIBEXECDIR=lib/arm-linux-gnueabihf/qt-android-6.7-armeabi-v7a/libexec \
       

      This causes a problem because FindGn will search in /usr/lib/arm-linux-gnueabihf/qt-android-6.7-armeabi-v7a/libexec (where it will definitely not be since it requires the host Gn), instead of at the location of the host Gn which is /usr/lib/x86_64-linux-gnu/qt-android-6.7-host/libexec

       

      The patch below will fix this. Could you please consider merging it?

      --- a/qtwebengine/cmake/FindGn.cmake
      +++ b/qtwebengine/cmake/FindGn.cmake
      @@ -6,11 +6,11 @@
       endif()
       find_program(Gn_EXECUTABLE NAMES gn PATHS "${WEBENGINE_ROOT_BUILD_DIR}/install/bin" NO_DEFAULT_PATH)
       if(NOT QT_HOST_PATH STREQUAL "")
      -   find_program(Gn_EXECUTABLE NAMES gn PATHS ${QT_HOST_PATH}/${INSTALL_LIBEXECDIR} NO_DEFAULT_PATH)
      +   find_program(Gn_EXECUTABLE NAMES gn PATHS ${QT_HOST_PATH}/${QT6_HOST_INFO_LIBEXECDIR} NO_DEFAULT_PATH)
          # note: mingw installs with INSTALL_LIBEXECDIR = bin,
          # however android on windows has INSTALL_LIBEXECDIR = libexec,
          # so cover this case also
      -   find_program(Gn_EXECUTABLE NAMES gn PATHS ${QT_HOST_PATH}/${INSTALL_BINDIR} NO_DEFAULT_PATH)
      +   find_program(Gn_EXECUTABLE NAMES gn PATHS ${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR} NO_DEFAULT_PATH)
       endif()
       find_program(Gn_EXECUTABLE NAMES gn)
       
      --- a/qtwebengine/cmake/Functions.cmake
      +++ b/qtwebengine/cmake/Functions.cmake
      @@ -1262,8 +1262,8 @@
                    -DSOURCE_DIR=${CMAKE_CURRENT_LIST_DIR}
                    -DMODULE=${arg_MODULE}
                    -DQT_HOST_PATH=${QT_HOST_PATH}
      -             -DINSTALL_LIBEXECDIR=${INSTALL_LIBEXECDIR}
      -             -DINSTALL_BINDIR=${INSTALL_BINDIR}
      +             -DQT6_HOST_INFO_LIBEXECDIR=${QT6_HOST_INFO_LIBEXECDIR}
      +             -DQT6_HOST_INFO_BINDIR=${QT6_HOST_INFO_BINDIR}
                    -DPython3_EXECUTABLE=${Python3_EXECUTABLE}
                    -DGN_THREADS=$ENV{QTWEBENGINE_GN_THREADS}
                    -DQT_ALLOW_SYMLINK_IN_PATHS=${QT_ALLOW_SYMLINK_IN_PATHS}
       

      Attachments

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

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            ban F S
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes