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

qt5_make_output_file creates bad paths

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.0
    • Fix Version/s: 5.15.1
    • Component/s: Build System: CMake
    • Labels:
      None
    • Environment:
      Windows 10 host targeting Android
    • Platform/s:
      Windows
    • Commits:
      57b928a1a5d98adc8c4ac0b1a241d87cbc7c43c3 (qt/qtbase/dev) 4ed94dcf65b916290d1bd725997d45b24d22ca3b (qt/qtbase/5.15)

      Description

      The qt5_make_output_file routine joins paths together improperly on Windows (seems similar to https://bugreports.qt.io/browse/QTBUG-81715 but this patch is applied so it cannot be the same bug.

      Here is the call to add the resources


      qt5_add_resources(RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/../kirigami.qrc )

      The paths get joined together improperly by the call Qt5CoreMacros.cmake(61) below. For reference, before expansion:
      file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}).

      Trace-Expanded output


      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(256): qt5_make_output_file(C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc qrc.depends out_depends )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(51): _qt5_warn_deprecated(qt5_make_output_file )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(43): if(NOT DEFINED _QT5_INTERNAL_SCOPE )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(53): string(LENGTH C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src _binlength )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(54): string(LENGTH C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc _infileLength )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(55): set(_checkinfile D:/myapp/Kirigami/src/kirigami/src )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(56): if(_infileLength GREATER _binlength )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(57): string(SUBSTRING C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc 0 73 _checkinfile )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(58): if(_checkinfile STREQUAL C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(60): else()
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(61): file(RELATIVE_PATH rel D:/myapp/Kirigami/src/kirigami/src C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(66): if(WIN32 AND rel MATCHES ^([a-zA-Z]).*)$ )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(69): set(_outfile C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(70): string(REPLACE .. __ _outfile C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(71): get_filename_component(outpath C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc PATH )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(72): if(CMAKE_VERSION VERSION_LESS 3.14 )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(77): else()
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(78): get_filename_component(_outfile C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/kirigami.qrc NAME_WLE )
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake(80): file(MAKE_DIRECTORY C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami )
      CMake Error at D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:80 (file):
      file problem creating directory:
      C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami/src/C:/Users/mtmcp/Documents/LibKirigami/Debug/android/x86/build/kirigami
      Call Stack (most recent call first):
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:256 (qt5_make_output_file)
      D:/Qt_Pro/5.15.0/android/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:339 (_qt5_parse_qrc_file)
      src/CMakeLists.txt:65 (qt5_add_resources)

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            mtmcp Mason McParlane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes