Xcode 8: Swift 2.3: Duplicate symbols when using SWIFT_VERSION=2.3

Originator:apsharp
Number:rdar://26782485 Date Originated:2016-06-13
Status:Open Resolved:
Product:Xcode-beta Product Version:Xcode-beta (8S128d)
Classification:Other Bug Reproducible:Always
 
Summary:
When compiling with Swift 2.3 in Xcode 8, two versions of libarclite are linked, causing duplicate symbol errors when linking.

Steps to Reproduce:
1. Clone https://github.com/Quick/Nimble.git @ d8900634c5ae69bf0cdf24b97096fa599d9890d7
2. Enable the "Use Legacy Swift Language Version" build setting
3. Compile.

Expected Results:
Expected the project to successfully build.

Actual Results:
The framework seems to be linked with two versions of Objective-C runtime, in both XcodeDefault.xctoolchain and Swift_2.3.xctoolchain. This results in duplicate symbol errors.

Version:
Xcode-beta (8S128d)

Notes:
A workaround is to disable implicit linking of the Objective-C runtime and turn of ARC at the project level, then apply the -fobjc-arc compiler flag to any applicable Objective-C files: https://github.com/Quick/Nimble/pull/302

Comments

+1

By allan.boyd at June 23, 2016, 7:27 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!