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

Adding an Objective-C source to an iOS project on Simulator fails with bitcode error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9
    • Labels:
      None
    • Environment:

      Qt 5.8.0
      Xcode 8.2.1
      macOS 10.12.2

    • Commits:
      840aa67146773d36c98fbdd0c446a1076551efaa

      Description

      Adding a custom Objective-C or Objective-C++ file to an iOS project currently breaks the build. You can reproduce it by adding an empty file with

      ios {
        OBJECTIVE_SOURCES += MyClass.m
      }
      

      to the project file and run it for the simulator target. The resulting error is something like:

      ld: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a(arclite.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      (it might be another library if adding others to the project, so I guess the library itself is irrelevant).

      This only happens for Simulator build targets and not for devices. Probably there is something messed up in the default project configuration from qmake?

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-58754
          # Subject Project Status CR V

            Activity

              People

              • Assignee:
                jakepetroules Jake Petroules
                Reporter:
                alexleutgoeb Alex Leutgöb
              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes