Open cltnschlosser opened 4 years ago
@cltnschlosser I have also run into this Thanks for mentioning the workaround
Same issue here.
⚠️: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX': module 'Swift' was created for incompatible target
🛑: x86_64-apple-ios13.0: /var/folders/95/56dg4mm10hq3gh4ks84qf41h0000gn/C/org.llvm.clang/ModuleCache/Swift-XC2YA6783J4B.swiftmodule
unset SDKROOT
works indeed. Not sure though if this has any side effects
Same issue here too with Xcode 11.6.
unset SDKROOT
works indeed too. Thank you :)
But I'm wondering if there are any side effects:sweat_smile:
There shouldn't be, the goal is just to get the swift compiler execution by spm to avoid this branch https://github.com/apple/swift/blame/c7da0f2f658db600ff43af49dd204eaa625e858f/lib/Driver/Driver.cpp#L1711 It's been there for a long time, so maybe spm changed something in 5.2.
Same issue here.
I have just resolved using the version 0.40.3 of SwiftLint and adding the line unset SDKROOT
at the beginning.
Running unset SDKROOT
sometimes results in 'Missing value for SDKROOT
'.
Because tools built in Mint are run on macOS, It's good to specify the SDK as xcrun --sdk macosx mint run ...
.
Given xcode environment variables the swift compiler gets confused because sysroot is set for iOS and target is macOS. I don't have the exact error message anymore, but adding
unset SDKROOT
before calling mint fixes it.Even if this isn't something mint wants to handle, figured I'd leave this here to help anyone else that runs into this issue.