https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
z

zalewski.se

03/19/2020, 7:12 AM
I was trying to update kotlin version to
1.3.70
but I’m getting an error:
Copy code
> Task :network:linkDebugFrameworkIosX64 FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
My other dependencies versions are:
Copy code
coroutinesVersion=1.3.5
ktorVersion=1.3.2
serializationVersion=0.20.0
If I set the kotlin version to
1.3.61
and dependencies to:
Copy code
coroutinesVersion=1.1.1
ktorVersion=1.2.4
serializationVersion=0.11.1
It’s building fine 🤔… Has anyone had simial problem? I was trying on many different gradle wrapper versions, right now I’m on the latest one
6.3-rc-3
e

Elena Lepilkina

03/19/2020, 7:16 AM
z

zalewski.se

03/19/2020, 7:19 AM
This is the result:
Copy code
> Task :network:linkDebugFrameworkIosX64 FAILED
Task :network:linkDebugFrameworkIosX64 in bridge Starting
Caching disabled for task ':network:linkDebugFrameworkIosX64' because:
  Build cache is disabled
Task ':network:linkDebugFrameworkIosX64' is not up-to-date because:
  Class path of task ':network:linkDebugFrameworkIosX64' has changed from ca6ba15aa9f334cb104cd9829bf8a4e2 to ca3e45dcee26c55ae5b5e174ba83437e.
Run tool: konanc with args: -g -ea -target ios_x64 -p framework -o /Users/sebastian.zalewski/Repositories/Dynamax/DynamaxMobile/network/build/bin/iosX64/debugFramework/network.framework -Xcache-directory=/Users/sebastian.zalewski/.konan/kotlin-native-macos-1.3.70/klib/cache/ios_x64-gSTATIC -Xmulti-platform -no-endorsed-libs -Xplugin=/Users/sebastian.zalewski/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-serialization-unshaded/1.3.70/5e89c34e2d0cf1c5606096d450c041f8b0020415/kotlin-serialization-unshaded-1.3.70.jar -Xobjc-generics -tr -Xinclude=/Users/sebastian.zalewski/Repositories/Dynamax/DynamaxMobile/network/build/classes/kotlin/iosX64/main/network.klib
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Task :network:linkDebugFrameworkIosX64 in bridge Finished
:network:linkDebugFrameworkIosX64 (Thread[Execution worker for ':' Thread 15,5,main]) completed. Took 2.933 secs.
e

Elena Lepilkina

03/19/2020, 7:22 AM
Could you run from terminal?
Copy code
/Users/sebastian.zalewski/.konan/kotlin-native-macos-1.3.70/bin/konanc -g -ea -target ios_x64 -p framework -o /Users/sebastian.zalewski/Repositories/Dynamax/DynamaxMobile/network/build/bin/iosX64/debugFramework/network.framework -Xcache-directory=/Users/sebastian.zalewski/.konan/kotlin-native-macos-1.3.70/klib/cache/ios_x64-gSTATIC -Xmulti-platform -no-endorsed-libs -Xplugin=/Users/sebastian.zalewski/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-serialization-unshaded/1.3.70/5e89c34e2d0cf1c5606096d450c041f8b0020415/kotlin-serialization-unshaded-1.3.70.jar -Xobjc-generics -tr -Xinclude=/Users/sebastian.zalewski/Repositories/Dynamax/DynamaxMobile/network/build/classes/kotlin/iosX64/main/network.klib
z

zalewski.se

03/19/2020, 7:24 AM
Another error 😓
Copy code
warning: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 2]' from /var/folders/f3/xh3zc36n6gl1t9nz1vdvcz500000gp/T/protocols7985268696936582260.bc with '[2 x i32] [i32 13, i32 0]' from out)
subprogram definitions must have a compile unit
!12 = distinct !DISubprogram(name: "objc2kotlin", linkageName: "objc2kotlin", scope: !13, file: !13, type: !14, spFlags: DISPFlagDefinition, retainedNodes: !15)
subprogram definitions must have a compile unit
!17 = distinct !DISubprogram(name: "objc2kotlin.1", linkageName: "objc2kotlin.1", scope: !13, file: !13, type: !14, spFlags: DISPFlagDefinition, retainedNodes: !15)
subprogram definitions must have a compile unit
!19 = distinct !DISubprogram(name: "objc2kotlin.32", linkageName: "objc2kotlin.32", scope: !13, file: !13, type: !14, spFlags: DISPFlagDefinition, retainedNodes: !15)
subprogram definitions must have a compile unit
!21 = distinct !DISubprogram(name: "objc2kotlin.33", linkageName: "objc2kotlin.33", scope: !13, file: !13, type: !14, spFlags: DISPFlagDefinition, retainedNodes: !15)
subprogram definitions must have a compile unit
!23 = distinct !DISubprogram(name: "objc2kotlin.34", linkageName: "objc2kotlin.34", scope: !13, file: !13, type: !14, spFlags: DISPFlagDefinition, retainedNodes: !15)
warning: ignoring invalid debug info in /var/folders/f3/xh3zc36n6gl1t9nz1vdvcz500000gp/T/konan_temp5220462723787240289/network.kt.bc
Undefined symbols for architecture x86_64:
  "_ktype:io.dynamax.mock.Network", referenced from:
      ___unnamed_17 in result.o
  "__Konan_init_network", referenced from:
      l__Konan_constructors in result.o
  "_kfun:io.dynamax.mock.Network.<get-name>()kotlin.String", referenced from:
      _objc2kotlin.1 in result.o
  "_kfun:io.dynamax.mock.Network.<init>()io.dynamax.mock.Network", referenced from:
      _objc2kotlin in result.o
ld: symbol(s) not found for architecture x86_64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
a

alex009

03/19/2020, 8:06 AM
library io.dynamax.mock.Network conflict with system Network library when new static cache work. I implement this fix - https://github.com/icerockdev/moko-network/commit/d70ddf9a26ec6cad1e820fc4d4a41245b34f7a69
just name conflict - Network your and Network system's 😞
2
z

zalewski.se

03/19/2020, 8:07 AM
Wow, let me check it 😮! It’s weird it’s working with 1.3.61 tho
a

alex009

03/19/2020, 8:08 AM
static cache for debug x64 builds was added in 1.3.70 🙂
z

zalewski.se

03/19/2020, 8:24 AM
It works 😭!! Thanks so much for help! I spent so much time on this… 😫
a

alex009

03/19/2020, 8:42 AM
i too 😫
4 Views