-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile under Xcode 8 beta 1 #302
Conversation
It seems likely that this is just a bug in the beta's handling of Swift 2.3, so I'll probably file a radar. |
Awesome, thanks for getting this started! Let me know if I can do anything to help. |
I just realised there's a problem with the tvOS target under Xcode 8. When I compile for tvOS, I get this warning:
This means that the target is always compiled under Swift 3, which doesn't work at all. I haven't been able to work out a way to disable this, looks like it could be a bug specific to the tvOS 10 SDK. |
@jckarter and @ddunbar on Twitter have suggested some alternative workarounds:
Raising the deployment targets to latest resolves the issue for iOS and macOS. I can't really verify with tvOS at this point. However it's not really a change that's appropriate to push onto users, so I'm not sure we can move ahead with it. I also tried disabling linking with standard libraries (i.e., |
It seems that #304 should fix the issue. See also Quick/Quick#548. |
Sets "Use Legacy Swift Language Version" to YES, i.e., `SWIFT_VERSION = 2.3`. This change alone causes the following linker error: duplicate symbol __non_lazy_classes in: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/arc/libarclite_macosx.a(arclite.o) /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a(arclite.o) duplicate symbol _OBJC_METACLASS_$___ARCLite__ in: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/arc/libarclite_macosx.a(arclite.o) /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a(arclite.o) ld: 2 duplicate symbols for architecture x86_64 This appears to be caused by the "Implicitly Link Objective-C Runtime Support" build setting (a.k.a. `CLANG_LINK_OBJC_RUNTIME`). Disabling just this setting doesn't resolve the error, but disabling the project-level ARC setting does resolve the linker error. As a result the `-fobjc-arc` compiler flag has to be set on each Objective-C file to ensure it is compiled with ARC enabled.
Thanks @ikesyo tvOS is working now! |
Alright, CI is looking good on Xcode 7.3 on all platforms. I've just pushed another commit that adds Xcode 8 to the CI matrix. |
@Quick/contributors what are your thoughts about the idea of tagging v4.0.2 to include these changes? |
Ugh, both CI failures seem to be related to code signing for iOS under Xcode 8. |
I haven't been able to reproduce the failure locally. Not sure why it fails on Xcode 8 but not Xcode 7.3. |
What happens if we apply the patch, removing diff --git a/Nimble.xcodeproj/project.pbxproj b/Nimble.xcodeproj/project.pbxproj
index 1f929f9..099d0cb 100644
--- a/Nimble.xcodeproj/project.pbxproj
+++ b/Nimble.xcodeproj/project.pbxproj
@@ -1595,7 +1595,6 @@
METAL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = NimbleTests;
- SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
@@ -1613,7 +1612,6 @@
METAL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = NimbleTests;
- SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos";
};
name = Release;
}; |
:fingers_crossed: |
😩
|
Ok, so everything is fine on CI for all platforms except iOS on Xcode 8. Everything is peachy on my machine. @Quick/contributors what do you say we go ahead and merge this then push a new release? |
Let's do it! 🚀 On Sat, Jun 18, 2016 at 4:14 PM -0400, "Adam Sharp" notifications@github.com wrote: Ok, so everything is fine on CI for all platforms except iOS on Xcode 8. Everything is peachy on my machine. @Quick/contributors what do you say we go ahead and merge this then push a new release? — |
Awesome! |
👏🏻 |
After checking the changes since v4.0.1, I think it would be best to bump to v4.1.0. Working on the release notes now! |
Compile under Xcode 8 beta 1
Bridge example metadata to Objective-C
Sets "Use Legacy Swift Language Version" to YES, i.e.,
SWIFT_VERSION = 2.3
.This change alone causes the following linker error:
This appears to be caused by the "Implicitly Link Objective-C Runtime Support" build setting (a.k.a.
CLANG_LINK_OBJC_RUNTIME
). Disabling just this setting doesn't resolve the error, but disabling theproject-level ARC setting does resolve the linker error. As a result the
-fobjc-arc
compiler flag has to be set on each Objective-C file to ensure it is compiled with ARC enabled.