Closed aidevjoe closed 6 years ago
It happens to me too. Maybe the bug comes from Swift 4.1
on going
➜ 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
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. :(
We have to call Apple 'Dady'. - -
So how to solve this problem? Have any suggesstions ?
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?
As I said, it's on going. It will be released early next week.
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.
大概什么时候好啊? 项目玩不动了
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.
Have reverted to 9.2, but my iPhone has upgraded to 11.3 😭
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.
@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.
@acenqiu Use Xcode 9.3 with Swift 4.0.3 Toolchain
@wuyuehyang Could you please give us a tutorial about using Xcode 9.3 with Swift 4.0.3 Toolchain?
@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
@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.
@wuyuehyang It failed with issue: "1. While emitting SIL for 'encode(to:)' in module 'WCDBSwift' " 😢
@wuyuehyang It works. Thanks.
@niyaoyao Same issue. Any idea?
@niyaoyao So do i
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
@acenqiu @tanpengsccd @niyaoyao
Did you try to delete the derived data folder and rebuild?
@RingoD I tried to delete derived data but it still not working
@amoyio Are you building for simulator or device?
@RingoD I tried simulator(iPhone X) and device.
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
.
@amoyio What about compiling WCDB only? Will you also get this error?
@RingoD Yes, same error.
delete the derived data folder ,the error still appear
Sorry but I have no idea why it happens. Swift 4.0.3 toolchains work fine here and all the WCDB testcases are passed.
@wuyuehyang Unlucky for me, I download swift-4.0.3-toolchain and installed it, select swift-4.0.3-toolchain in Xcode 9.3 performance,but Xcode can NOT compile it. The Error shows like this:
Help Please
update: error comes from Cocoapods, Xcode 9.3 work fine with swift-4.0.3-toolchain in a project without Cocoapods.
-remove-runtime-asserts
Unfortunately, Xcode 9.3
with swift-4.0.3-toolchain
dose not work for everybody.
I use two versions of Xcode which work like a charm.
You can download Xcode 9.2
from Apple Developer Center
for me , only Xcode 9.2 can work!
Here's the summary of the 4 issues I submitted:
Three of them may be the bugs of conditional conformance, which is the new feature of Swift 4.1. According to the SE-0143, it would be full implemented in Swift 4.2.
BUT, Codable
forces us to use this feature. So code will be safe from these bugs if they don't use that.
Unfortunately, Codable
is the basic dependency of ORM feature in WCDB. So, we are helpless.
Followed by details:
CFStringCreateCopy
in Foundation
framework. Maybe it will be fixed in Swift 4.2.(I hope.)@niyaoyao As I said, reverting your Xcode to 9.2 or using the Swift 4.0.3 toolchains.
@BBHNation how to do that? can you give me a example?
@JackLSH2016 Here is how to using the Swift 4.0.3 toolchains in Xcode 9.3:
@BBHNation Thanks,It's really useful.
@BBHNation build fail on Xcode9.3 beta.. Must be release?
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'
@hufengdd01 Just revert to 9.2
Remove Xcode project and swift please
@chulito1 Sorry but I don't know what you mean.
@Just2Archi @BBHNation just restart Xcode, and you will find a Toolchains below Xcode's Preference.
@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
hi, when can this problem be solved ?
@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.
swift4.1都不支持,还说支持4.0以上,还大厂呢一点小问题这么久了都没解决
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