Skip to content
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

Xcode 9.3 Support? #283

Closed
aidevjoe opened this issue Mar 30, 2018 · 68 comments
Closed

Xcode 9.3 Support? #283

aidevjoe opened this issue Mar 30, 2018 · 68 comments

Comments

@aidevjoe
Copy link

The language of WCDB

Swift

The version of WCDB

v1.0.6

The platform of WCDB

iOS

The installation of WCDB

Cocoapods

What's the issue?

When I use Xcode 9.2 everything works, but after updating to Xcode 9.3, I can't compile it.
See the chart for specific errors

@BBHNation
Copy link

It happens to me too. Maybe the bug comes from Swift 4.1

@RingoD
Copy link
Collaborator

RingoD commented Mar 30, 2018

on going

@nuomi1
Copy link

nuomi1 commented Mar 30, 2018

➜  Carthage git:(master) ✗ carthage update --use-submodules --no-build
*** Fetching SnapKit
*** Fetching Charts
*** Fetching RxSwift
*** Fetching wcdb
*** Checking out wcdb at "v1.0.6.1"
*** Checking out RxSwift at "4.1.2"
*** Checking out Charts at "v3.1.0"
*** Checking out SnapKit at "4.0.0"
➜  Carthage git:(master) ✗ carthage update --cache-builds
*** Fetching SnapKit
*** Fetching Charts
*** Fetching RxSwift
*** Fetching wcdb
*** Checking out wcdb at "v1.0.6.1"
*** Checking out RxSwift at "4.1.2"
*** Checking out Charts at "v3.1.0"
*** Checking out SnapKit at "4.0.0"
*** No cache found for Charts, building with all downstream dependencies
*** No cache found for RxSwift, building with all downstream dependencies
*** No cache found for SnapKit, building with all downstream dependencies
*** No cache found for wcdb, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/carthage-xcodebuild.duSKKz.log
*** Downloading RxSwift.framework binary at "Spread.2"
*** Skipped installing RxSwift.framework binary due to the error:
	"Incompatible Swift version - framework was built with 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) and the local version is 4.1 (swiftlang-902.0.48 clang-902.0.37.1)."
*** Building scheme "Charts" in Charts.xcodeproj
*** Building scheme "RxBlocking-tvOS" in Rx.xcworkspace
*** Building scheme "RxBlocking-macOS" in Rx.xcworkspace
*** Building scheme "RxBlocking-iOS" in Rx.xcworkspace
*** Building scheme "RxBlocking-watchOS" in Rx.xcworkspace
*** Building scheme "RxCocoa-macOS" in Rx.xcworkspace
*** Building scheme "RxCocoa-tvOS" in Rx.xcworkspace
*** Building scheme "RxCocoa-iOS" in Rx.xcworkspace
*** Building scheme "RxCocoa-watchOS" in Rx.xcworkspace
*** Building scheme "RxSwift-watchOS" in Rx.xcworkspace
*** Building scheme "RxSwift-macOS" in Rx.xcworkspace
*** Building scheme "RxSwift-tvOS" in Rx.xcworkspace
*** Building scheme "RxSwift-iOS" in Rx.xcworkspace
*** Building scheme "RxTests-macOS" in Rx.xcworkspace
*** Building scheme "RxTests-iOS" in Rx.xcworkspace
*** Building scheme "RxTests-tvOS" in Rx.xcworkspace
*** Building scheme "SnapKit" in SnapKit.xcworkspace
*** Building scheme "WCDB" in WCDB.xcworkspace
*** Building scheme "sqlcipher.swift" in WCDB.xcworkspace
*** Building scheme "sqliterk.swift" in WCDB.xcworkspace
*** Building scheme "WCDB.swift" in WCDB.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /Users/nuomi/Documents/Carthage/Carthage/Checkouts/wcdb/WCDB.xcworkspace -scheme WCDB.swift -configuration Release -derivedDataPath /Users/nuomi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/wcdb/v1.0.6.1 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/wcdb SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/nuomi/Documents/Carthage/Carthage/Checkouts/wcdb)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/carthage-xcodebuild.duSKKz.log
➜  Carthage git:(master) ✗ carthage update --cache-builds
*** Fetching SnapKit
*** Fetching Charts
*** Fetching RxSwift
*** Fetching wcdb
*** Checking out wcdb at "v1.0.6.1"
*** Checking out RxSwift at "4.1.2"
*** Checking out Charts at "v3.1.0"
*** Checking out SnapKit at "4.0.0"
*** xcodebuild output can be found in /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/carthage-xcodebuild.bPGIbk.log
*** Valid cache found for Charts, skipping build
*** Valid cache found for RxSwift, skipping build
*** Valid cache found for SnapKit, skipping build
*** No cache found for wcdb, building with all downstream dependencies
*** Building scheme "sqlcipher.swift" in WCDB.xcworkspace
*** Building scheme "sqliterk.swift" in WCDB.xcworkspace
*** Building scheme "WCDB" in WCDB.xcworkspace
*** Building scheme "WCDB.swift" in WCDB.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /Users/nuomi/Documents/Carthage/Carthage/Checkouts/wcdb/WCDB.xcworkspace -scheme WCDB.swift -configuration Release -derivedDataPath /Users/nuomi/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/wcdb/v1.0.6.1 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/wcdb SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/nuomi/Documents/Carthage/Carthage/Checkouts/wcdb)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/42/tmk7tyg11vl37yw9btws1gc80000gn/T/carthage-xcodebuild.bPGIbk.log

carthage-xcodebuild.bPGIbk.zip
carthage-xcodebuild.duSKKz.zip

@RingoD
Copy link
Collaborator

RingoD commented Mar 30, 2018

It's said that Swift 4.1 is source compatible to 4.0, which means that developers can recompile the code without any changes.
However, not. :(

@BBHNation
Copy link

We have to call Apple 'Dady'. - -

@JackLSH2016
Copy link

So how to solve this problem? Have any suggesstions ?

@neonio
Copy link

neonio commented Mar 31, 2018

Sorry but I encounter same issue, I try to add

pod 'WCDB.swift', :git => 'https://github.com/Tencent/wcdb.git', :branch => 'feature/swift4.1'

but it is not working. Any update?

@RingoD
Copy link
Collaborator

RingoD commented Mar 31, 2018

As I said, it's on going. It will be released early next week.

@RingoD
Copy link
Collaborator

RingoD commented Apr 2, 2018

WCDB may have encountered a swift bug, which is the conditional conformance in Swift 4.1.
Here is the bug report:
https://bugs.swift.org/browse/SR-7327
https://bugs.swift.org/browse/SR-7329
We are waiting for the reply from the staff.

@Zhaoxinak
Copy link

大概什么时候好啊? 项目玩不动了

@RingoD
Copy link
Collaborator

RingoD commented Apr 2, 2018

Maybe you should revert your Xcode to 9.2 for emergency.
Since it may result in a Swift bug, the communication between us and Swift staffs could be a hard work with unpredictable time.

@acenqiu
Copy link

acenqiu commented Apr 2, 2018

Have reverted to 9.2, but my iPhone has upgraded to 11.3 😭

@RingoD
Copy link
Collaborator

RingoD commented Apr 2, 2018

I have tried to bypass these bugs to be compatible with Swift 4.1.
BUT, The more I tried, the more bugs I encountered.
Here's the additional issues I submitted:
https://bugs.swift.org/browse/SR-7331
https://bugs.swift.org/browse/SR-7330

I recommend you to revert your Xcode to 9.2 until the Swift staffs reply us.

@MrPans
Copy link

MrPans commented Apr 2, 2018

@acenqiu same with you. Both of Swift or WCDB updating for this bug will cost much time. Maybe we have to waiting until Swift 5.0 release.

@wuyuehyang
Copy link

@acenqiu Use Xcode 9.3 with Swift 4.0.3 Toolchain

@RingoD
Copy link
Collaborator

RingoD commented Apr 3, 2018

@wuyuehyang Could you please give us a tutorial about using Xcode 9.3 with Swift 4.0.3 Toolchain?

@wuyuehyang
Copy link

@RingoD Download Swift 4.0.3 Toolchain on https://swift.org/download/#releases, install the pkg file and you may found toolchain options in Xcode menu, or Preferences -> Components->Toolchains

@niyaoyao
Copy link

niyaoyao commented Apr 3, 2018

@RingoD I have faced the same issue, it's seemed that I have to download a Xcode 9.2 for development. Looking forward next release.

@niyaoyao
Copy link

niyaoyao commented Apr 3, 2018

@wuyuehyang It failed with issue: "1. While emitting SIL for 'encode(to:)' in module 'WCDBSwift' " 😢

@RingoD
Copy link
Collaborator

RingoD commented Apr 3, 2018

@wuyuehyang It works. Thanks.

@samzhiwei
Copy link

@niyaoyao
Same issue. Any idea?

@tanpengsccd
Copy link

@niyaoyao So do i

@acenqiu
Copy link

acenqiu commented Apr 3, 2018

I tried to soft link Toolchains of 9.2 to 9.3 but with no luck. It seems like file format has changed in iOS 11.3 SDK.

Auto-Linking supplied '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks//Metal.framework/Metal.tbd', file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks//Metal.framework/Metal.tbd

@RingoD
Copy link
Collaborator

RingoD commented Apr 3, 2018

@acenqiu @tanpengsccd @niyaoyao
Did you try to delete the derived data folder and rebuild?

@neonio
Copy link

neonio commented Apr 3, 2018

@RingoD I tried to delete derived data but it still not working

@RingoD
Copy link
Collaborator

RingoD commented Apr 3, 2018

@amoyio Are you building for simulator or device?

@neonio
Copy link

neonio commented Apr 3, 2018

@RingoD I tried simulator(iPhone X) and device.

@neonio
Copy link

neonio commented Apr 3, 2018

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/buildnode/jenkins/workspace/oss-swift-4.0-package-osx/llvm/include/llvm/Support/Casting.h, line 236. 0 swift 0x000000010617df38 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
...
1. While emitting SIL for 'encode(to:)' in module 'WCDBSwift'

It looks strange because in error log, it still shows oss-swift-4.0-package-osx.

@Pircate
Copy link

Pircate commented Apr 11, 2018

@BBHNation build fail on Xcode9.3 beta.. Must be release?

@fenghudd01
Copy link

as @BBHNation said, swift-4.0.3-toolchain is only works fine without CocoaPods,
@RingoD have any idea to fix the issue below when we use swift-4.0.3-toolchain
1. While emitting SIL for 'encode(to:)' in module 'WCDBSwift'

@RingoD
Copy link
Collaborator

RingoD commented Apr 11, 2018

@hufengdd01 Just revert to 9.2

@ghost
Copy link

ghost commented Apr 11, 2018

Remove Xcode project and swift please

@RingoD
Copy link
Collaborator

RingoD commented Apr 12, 2018

@chulito1 Sorry but I don't know what you mean.

@huangxinyu1213
Copy link

@Just2Archi @BBHNation just restart Xcode, and you will find a Toolchains below Xcode's Preference.

@JackLSH2016
Copy link

@BBHNation your project can run in device? My project run similator can work well,when run in device
have below problem:
dyld: Library not loaded: @rpath/WCDBSwift.framework/WCDBSwift
Referenced from: /var/containers/Bundle/Application/7B294DDD-68DC-4F12-A8EC-1F5D3CED7847/wawameiyan.app/wawameiyan
Reason: image not found
I try to below way to resolve it, but failed.
http://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib

@bianzhifeng
Copy link

hi, when can this problem be solved ?

@RingoD
Copy link
Collaborator

RingoD commented Apr 20, 2018

@bianzhifeng I think I already make it clear. You can use the way above to be compatible with it. Or waiting for the Swift staff.

@wbtvc
Copy link

wbtvc commented May 13, 2018

swift4.1都不支持,还说支持4.0以上,还大厂呢一点小问题这么久了都没解决

@RingoD
Copy link
Collaborator

RingoD commented May 14, 2018

@wbtvc Actually, these are bugs in Swift itself. I don't think we have ideas about fixing a language bug. For further information about those bugs, you can check my comment above.
Or if you think it is just a tiny bug which can be solve easily, we are grateful for your PR. :)

@Zhaoxinak
Copy link

目前为止解决了吗?

@tyrad
Copy link

tyrad commented May 15, 2018

等吧 持续关注

@LarrySue
Copy link

emm...how is it now?
Based on your assessment of the situation, what is your suggestion?
Wait for repair or switch xcode version?

@MrPans
Copy link

MrPans commented May 18, 2018

Is there any plan if Apple do not change the mind in Conditional Conformance at Swift5?If it was
unfortunately true, will WCDB make a Refactoring ?

@RingoD
Copy link
Collaborator

RingoD commented May 21, 2018

@DeveloperPans As I mentioned above, Conditional Conformance will be full implemented in Swift 4.2.
Until now, the issues are bugs, not unfinished features. Apple has no reason not to fix it.
But if so, we will redesign WCDB Swift to fit the new feature. No doubt.

@MrPans
Copy link

MrPans commented May 21, 2018

@RingoD That's great. I am looking forward to hearing your good news next time.

@karise-guo
Copy link

Can I use the WCDB OC version in a Swift project? What is the difference in usage?

@neonio
Copy link

neonio commented May 30, 2018

Any update for xcode 9.4?

@RingoD
Copy link
Collaborator

RingoD commented May 31, 2018

@amoyio Xcode 9.4 includes Swift 4.1.2, not Swift 4.2. Currently, the issues I submitted are not fixed.

@neonio
Copy link

neonio commented Jun 4, 2018

@RingoD
Xcode 9.4+Swift 4.2(Dev) is still not working
Xcode 10(Beta) is still not working too.

@Zhaoxinak
Copy link

这就很尴尬了

@Pircate
Copy link

Pircate commented Jun 5, 2018

so bad

@MrPans
Copy link

MrPans commented Jun 5, 2018

Swift 5 won't release at 2018 and it's seems Swift 4.2 dose not fix this issue. What is the next plan? @RingoD

@RingoD
Copy link
Collaborator

RingoD commented Jun 5, 2018

WCDB can't be compiled with Xcode 10(Beta) now.
I'm ongoing to figure out whether the bugs are not fixed or we need more compatible works.
I will reply here as soon as possible.

@RingoD
Copy link
Collaborator

RingoD commented Jun 6, 2018

It's now fixed. Developers can use v1.0.6.2 with Xcode 10(Beta) now.

Note that compatible code is need for ColumnCodable.
Check https://github.com/Tencent/wcdb/releases/tag/v1.0.6.2 for further information.

@RingoD RingoD closed this as completed Jun 6, 2018
@nuomi1
Copy link

nuomi1 commented Jun 14, 2018

WCDB v1.0.6.2 is complied succeed with Xcode 9.4.1 (Swift 4.1.2).

@RingoD
Copy link
Collaborator

RingoD commented Jun 14, 2018

@nuomi1 Don't reply on a closed issue.
By the way, Testcase is not passed with Swift 4.1.2. There is not guarantee for using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests