ktor icon indicating copy to clipboard operation
ktor copied to clipboard

Incompatibility with Kotlin/Native 1.3.50 for iOS Arm64

Open saschpe opened this issue 7 years ago • 8 comments

Ktor needs an update towards Kotlin 1.3.50:

Please wait while Kotlin/Native compiler 1.3.50 is being installed.
Download https://download.jetbrains.com/kotlin/native/builds/releases/1.3.50/macos/kotlin-native-macos-1.3.50.tar.gz (253.69 MB)
Download https://download.jetbrains.com/kotlin/native/builds/releases/1.3.50/macos/kotlin-native-macos-1.3.50.tar.gz finished, took 28 s 968 ms
Unpack Kotlin/Native compiler to /Users/saschpe/.konan/kotlin-native-macos-1.3.50
Unpack Kotlin/Native compiler to /Users/saschpe/.konan/kotlin-native-macos-1.3.50 finished, took 39 s 498 ms

> Task :core:compileKotlinIosArm64
Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler.
Downloading dependency: https://download.jetbrains.com/kotlin/native/libffi-3.2.1-3-darwin-macos.tar.gz (72.6 kiB/72.6 kiB). Done.
Extracting dependency: /Users/saschpe/.konan/cache/libffi-3.2.1-3-darwin-macos.tar.gz into /Users/saschpe/.konan/dependencies
Downloading dependency: https://download.jetbrains.com/kotlin/native/clang-llvm-6.0.1-darwin-macos.tar.gz (422.6 MiB/422.6 MiB). Done.
Extracting dependency: /Users/saschpe/.konan/cache/clang-llvm-6.0.1-darwin-macos.tar.gz into /Users/saschpe/.konan/dependencies
w: skipping /Users/saschpe/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-ios-iosarm64/1.2.3/a35b95c1d83e1e76050ea1cd938b5cb73a66f354/ktor-client-ios.klib. The abi versions don't match. Expected '[14]', found '9'
w: The compiler versions don't match either. Expected '[]', found '1.3-rc1-11132'
e: Could not find "/Users/saschpe/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-ios-iosarm64/1.2.3/a35b95c1d83e1e76050ea1cd938b5cb73a66f354/ktor-client-ios.klib" in [/Users/saschpe/Projects/Foo, /Users/saschpe/.konan/klib, /Users/saschpe/.konan/kotlin-native-macos-1.3.50/klib/common, /Users/saschpe/.konan/kotlin-native-macos-1.3.50/klib/platform/ios_arm64].

> Task :core:compileKotlinIosArm64 FAILED

saschpe avatar Aug 27 '19 12:08 saschpe

Yes, i have the same, Ktor haven't release 1.3.50 compatibility yet

IgorKey avatar Aug 27 '19 18:08 IgorKey

I don't think this is limited to Arm64....seems like this needs similar change to that just made for SQLDelight https://github.com/square/sqldelight/issues/1443#event-2598030604 ?

joreilly avatar Aug 31 '19 08:08 joreilly

Ah! If this is your first Kotlin Native release cycle, all libraries need to be rebuilt and released with the newest major version. Anything built with 1.3.41 will be incompatible with 1.3.50. It's the same thing each release. I would assume ktor is coming soon.

kpgalligan avatar Aug 31 '19 13:08 kpgalligan

Should work with 1.2.4

cy6erGn0m avatar Sep 03 '19 11:09 cy6erGn0m

@cy6erGn0m Ktor 1.2.4 doesn't work with Kotlin 1.3.50 and gradle 5.4.1. Which version should I use to get it working?

dkej123 avatar Sep 04 '19 10:09 dkej123

Ktor 1.2.4 doesn't work with Kotlin 1.3.50 and gradle 5.4.1. Which version should I use to get it working?

+1

Piasy avatar Nov 21 '19 15:11 Piasy

Just use 1.2.5. However, now that Kotlin 1.3.60 was released, we'd need a 1.2.6 release :-)

saschpe avatar Nov 21 '19 15:11 saschpe

Hi I have similar issue. Trying to use io.ktor:ktor-client-ios-iosarm64:1.2.5 with Kotlin 1.3.50 and get:

Could not resolve io.ktor:ktor-client-ios-iosarm64:1.2.5. Required by: project :SharedCode > Unable to find a matching variant of io.ktor:ktor-client-ios-iosarm64:1.2.5: - Variant 'iosArm64-api' capability io.ktor:ktor-client-ios-iosarm64:1.2.5: - Incompatible attribute: - Required org.jetbrains.kotlin.native.target 'ios_x64' and found incompatible value 'ios_arm64'. - Other attributes: - Found org.gradle.status 'release' but wasn't required. - Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'. - Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'. - Variant 'metadata-api' capability io.ktor:ktor-client-ios-iosarm64:1.2.5: - Incompatible attribute: - Required org.jetbrains.kotlin.platform.type 'native' and found incompatible value 'common'. - Other attributes: - Found org.gradle.status 'release' but wasn't required. - Required org.gradle.usage 'kotlin-api' and found compatible value 'kotlin-api'. - Required org.jetbrains.kotlin.native.target 'ios_x64' but no value provided.

mpelc87 avatar Nov 22 '19 16:11 mpelc87