Kotlin-native: compileKonan<frameworkname>Ios_x64 not building with Xcode 10

Created on 18 Sep 2018  路  4Comments  路  Source: JetBrains/kotlin-native

I have specified the 'iphone_sim' in the konan.targets list, which makes gradle run the compileKonan<frameworkname>Ios_x64 task. It has stopped working after I upgraded Xcode to version 10.

It fails with this error:

> Task :ios:compileKonan<frameworkname>Ios_x64
ld: targeted OS version does not support use of thread local variables in _kfun:com.<packages>.Engine.lifestyleProgram(com.<packages>.<class_name>)com.<packages>.<class_name> for architecture x86_64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

> Task :ios:compileKonan<frameworkname>Ios_x64 FAILED

FAILURE: Build failed with an exception.

I am running kotlin-native-gradle-plugin:0.9.1 and kotlin_version = '1.2.70'

Most helpful comment

Yes, it will be fixed with the next release. Quick fix is to set osVersionMin.ios_x64 = 9.0 in konan.properties.

All 4 comments

Yes, it will be fixed with the next release. Quick fix is to set osVersionMin.ios_x64 = 9.0 in konan.properties.

@olonho
How would you setup the konan.properties file ? i cannot seem to get it picked up in any way ?, are you saying we have to compile kotlin native ? or how are we to setup konan.properties ? (there are no documentation hereof, and all i can find in the repo is the one inside of kotlin native, not any external one overwriting a setting )

Find it in $HOME/.konan directory.

I made it work by changing the Kotlin/Native version to a nightly build, where you guys fixed it.

classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.9.2-dev-4008" //when 9.2 comes , use that

Thanks!

Was this page helpful?
0 / 5 - 0 ratings