Matthias
01/15/2025, 3:58 PMRelease Builds since upgrading to Kotlin 2.1.0 with SKIE 0.10.0. I created a StackOverflow question. Anybody an idea?
https://stackoverflow.com/questions/79358761/kmm-app-with-skie-ios-build-with-releaseconfiguration-fails-when-linking-unTadeas Kriz
01/15/2025, 4:05 PMTadeas Kriz
01/15/2025, 4:06 PM-v to other linker flags.Matthias
01/15/2025, 4:07 PMTadeas Kriz
01/15/2025, 4:07 PMTadeas Kriz
01/15/2025, 4:08 PMskie { isEnabled = false } to see if it's SKIE or Kotlin 2.1.0?Matthias
01/15/2025, 5:45 PMTadeas Kriz
01/15/2025, 5:47 PMlink Kotlin Gradle task for the Release configuration
3. if it fails, disable SKIE and run it againMatthias
01/15/2025, 5:47 PM-v linker flag doesn’t provide any additional useful informationTadeas Kriz
01/15/2025, 5:47 PMTadeas Kriz
01/15/2025, 5:48 PMTadeas Kriz
01/15/2025, 5:48 PMMatthias
01/16/2025, 8:42 AMDebug Build is successful, Release build fails
2. Disabling SKIE produces a lot of errors (as mentioned above)Matthias
01/16/2025, 11:06 AM--stacktrace and got the following error:Matthias
01/16/2025, 3:01 PMTadeas Kriz
01/16/2025, 3:03 PMTadeas Kriz
01/16/2025, 3:03 PMTadeas Kriz
01/16/2025, 3:04 PMMatthias
01/16/2025, 3:05 PM./gradlew --stacktrace --debug :shared:linkReleaseFrameworkIosArm64?Tadeas Kriz
01/16/2025, 3:05 PMMatthias
01/16/2025, 3:07 PMTadeas Kriz
01/16/2025, 3:30 PMJames Bowler
01/17/2025, 3:28 AMMatthias
01/17/2025, 9:30 AM-ld_classic the Release build works and via Xcode the app runs. Building on our MacMini CI the Release build is successful but app crashes on startup with following Crashlytics error:Matthias
01/17/2025, 10:47 AMCrashReporting.shared.enable() and Release Build with -ld_classic linker and dynamic shared framework builds and starts successful 😮Matthias
01/17/2025, 12:46 PMclang: error: unable to execute command: Bus error: 10 for Release builds with static shared framework :(
Switched then to dynamic framework by removing isStatic = true and got the following error:
The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 138.
output:
ld: warning: ignoring duplicate libraries: '-ldl', '-lobjc'
> Task :iosFramework:linkReleaseFrameworkIosArm64 FAILED
Found this issue in Kotlin issue tracker:
https://youtrack.jetbrains.com/issue/KT-70202/Xcode-16-Linker-fails-with-SIGBUS-compiling-XCTest-based-tests
As suggested in KT-70202, I added linkerOpts("-ld_classic") and the release build was building successful.
Then run into the issue that the release build (distributed via Firebase AppDistribution) was crashing on app start.
Found out that this was caused by CrashKiOS framework, probably because CrashKiOS has issues with dynamic frameworks, see issue here and still not fixed in latest version 0.9.0:
https://github.com/touchlab/CrashKiOS/issues/69
Than removed CrashKiOS initialization CrashReporting.shared.enable() in AppDelegate and finally the Release build successfully builds local, on CI and starts up with no issues.
So I guess, it is no SKIE issue, but Kotlin 2.1.0 issue.Tadeas Kriz
01/17/2025, 2:04 PMMatthias
01/17/2025, 2:23 PMTadeas Kriz
01/17/2025, 2:24 PM