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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 5.8.0
    • Build tools: qmake
    • None
    • Qt 5.8.0
      Xcode 8.2.1
      macOS 10.12.2
    • iOS/tvOS/watchOS
    • 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

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

          Activity

            People

              jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
              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