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

iOS qmake project fails to build with Xcode 14 when build dir is in /tmp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4.2
    • None
    • iOS/tvOS/watchOS

    Description

      When the project build folder is not relative to source folder then iOS build with qmake after switching to Xcode 14 (required to use with official binary Qt 6.4.2 installation).

      Steps to reproduce:

      1. Create a project in the user folder (e.g. Xcode14Min.zip) minimal project
      2. Setup QTDIR and PATH to point to Qt 6.4.2 iOS kit and its `bin` folder retrospectively.
        e.g:
        export QTDIR=${HOME}/Qt/6.4.2/ios/
        export PATH="${QTDIR}/bin":"${PATH}
      3. cd /tmp; mkdir build; cd build
      4. qmake ${HOME}/Xcode14Min/app.pro -spec macx-ios-clang CONFIG+=release CONFIG+=iphone CONFIG+=device
      5. make

      Expected:

      Project builds

      Actual:

      Project build fails

      error: Build input file cannot be found: '/private/tmp/Xcode14Min_build/qrc_resources.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'X14App' from project 'X14App')

      The problem seems to be coming from Xcode shell script build phase in `project.pbxproj`, where the mix of absolute input paths and relative output paths is not accepted anymore.

                  buildActionMask = 2147483647;
                  files = (
                      );
                  isa = PBXShellScriptBuildPhase;
                  runOnlyForDeploymentPostprocessing = 0;
                  name = "Qt Preprocessors";
                  inputPaths = (
                      "/Users/username/Xcode14Min/resources.qrc");
                  outputPaths = (
                      "qrc_resources.cpp");
                  shellPath = "/bin/sh";
                  shellScript = "make -C /private/tmp/Xcode14Min_build -f X14App.xcodeproj/qt_preprocess.mak";
                  showEnvVarsInLog = "0";
                  alwaysOutOfDate = "1";

      Workaround

      Put build folder relative to project source folder.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            pavol Pavol Markovic
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes