Xcode 13 RC: Failed to build module 'RxCocoa'; this SDK is not supported by the compiler [RxSwift] - TagMerge

Xcode 13 RC: Failed to build module 'RxCocoa'; this SDK is not supported by the compiler [RxSwift]

osmar106Asked 8 months ago

Short description of the issue:

Cannot build app using Xcode 13 RC, we are using Carthage.

Expected outcome:

Be able to build the app

What actually happens:

When Xcode is building we receive the following errors:

"Cannot load underlying module for 'RxCocoa'"

"Failed to build module 'RxCocoa'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)', while this compiler is 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)'). Please select a toolchain which matches the SDK."

"No such module 'RxCocoaRuntime'"

Self contained code example that reproduces the issue:

import RxCocoa

import RxCocoaRuntime

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

6.2.0

Platform/Environment

  • [x] iOS
  • [ ] macOS
  • [ ] tvOS
  • [ ] watchOS
  • [ ] playgrounds

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • [x] easy, 100% repro
  • [ ] sometimes, 10%-100%
  • [ ] hard, 2% - 10%
  • [ ] extremely hard, %0 - 2%

Xcode version:

  Xcode 13 RC

:warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:

Installation method:

  • [ ] CocoaPods
  • [x] Carthage
  • [ ] Git submodules

I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

  • [x] yes (Xcode 13 RC and Xcode 12.5.1)
  • [ ] no

Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

  • [ ] just starting
  • [x] I have a small code base
  • [ ] I have a significant code base

Source: link

yeyocpAnswered 8 months ago

Hello.

I have the same issue. I am receiving the same error that osmar106 mentions:

"Failed to build module 'RxCocoa'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)', while this compiler is 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)'). Please select a toolchain which matches the SDK."

Thank you.

mrcperelloAnswered 8 months ago

Same issue here :(

claralouAnswered 8 months ago

Hi, same issue happens to me, :'(

upeugeneAnswered 7 months ago

same issue

freak4pcAnswered 7 months ago

Please provide a small project reproducing the issue.

Thanks

upeugeneAnswered 7 months ago

Please provide a small project reproducing the issue.

any project with the latest XCode 13

freak4pcAnswered 7 months ago

Again, we ask for people to share their own sample projects. You can't expect a maintainer to spend their free time solving your issue if you won't spend 5 minutes making a repro project to help out, right? :)

osmar106Answered 7 months ago

Check this repo, RxCocoa branch to test this error https://github.com/yeyocp/CarthageTestForXcode13/commits/RxCocoa

Also, if you remove import RxCocoa the app builds but then the simulator crash

dyld[97462]: Library not loaded: @rpath/RxCocoaRuntime.framework/RxCocoaRuntime Referenced from: /Users/orodrgut/Library/Developer/Xcode/DerivedData/CarthageTestForXcode13-gpzicnensoezwphkzlzpurgzykek/Build/Products/Debug-iphonesimulator/RxCocoa.framework/RxCocoa Reason: tried: '/Users/orodrgut/Library/Developer/Xcode/DerivedData/CarthageTestForXcode13-gpzicnensoezwphkzlzpurgzykek/Build/Products/Debug-iphonesimulator/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Downloads/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/usr/lib/swift/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Downloads/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Library/Developer/CoreSimulator/Devices/B0580461-22FF-4AC8-91ED-68BEE713F06F/data/Containers/Bundle/Application/BA4951C1-7D85-49A7-8375-72551FF424FD/CarthageTestForXcode13.app/Frameworks/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Library/Developer/CoreSimulator/Devices/B0580461-22FF-4AC8-91ED-68BEE713F06F/data/Containers/Bundle/Application/BA4951C1-7D85-49A7-8375-72551FF424FD/CarthageTestForXcode13.app/Frameworks/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Downloads/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file) Library not loaded: @rpath/RxCocoaRuntime.framework/RxCocoaRuntime Referenced from: /Users/orodrgut/Library/Developer/Xcode/DerivedData/CarthageTestForXcode13-gpzicnensoezwphkzlzpurgzykek/Build/Products/Debug-iphonesimulator/RxCocoa.framework/RxCocoa Reason: tried: '/Users/orodrgut/Library/Developer/Xcode/DerivedData/CarthageTestForXcode13-gpzicnensoezwphkzlzpurgzykek/Build/Products/Debug-iphonesimulator/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Downloads/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/usr/lib/swift/RxCocoaRuntime.framework/RxCocoaRuntime' (no such file), '/Users/orodrgut/Downloads/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/Xcode.app/Contents/Developer/Tool

freak4pcAnswered 7 months ago

Hey @osmar106 and @upeugene I just checked your sample project and as far as I can tell this is a Carthage issue and not an RxSwift issue.

I opened your project, removed the existing frameworks, dragged the xcframeworks manually like so: image

Everything seems to work fine: image

I couldn't even get Carthage to pull the pre-built xcframeworks correctly from this repo. Unfortunately I'm not a Carthage fan myself and don't have the capacity to support Package Manager-specific issues like this (which seems like some configuration issue).

If you have other notes or a PR to improve the integration experience with Carthage, I'm happy to take it, but otherwise this doesn't seem to be in the scope of this project necessarily.

Recent Issues

    Programming Languages