I'm having trouble in fixing the linker error occu...
# kotlin-native
c
I'm having trouble in fixing the linker error occurring in Xcode when building an iOS app like the following after upgrading from Kotlin 2.0.20 to 2.1.0 (or 2.1.10):
Copy code
Unable to execute command: Bus error: 10
Linker command failed due to signal (use -v to see invocation)
This error happens only when LTO is enabled. I think this issue is related: https://developer.apple.com/forums/thread/697492 I've tried to debug
/usr/bin/ld
, but for some reason the system doesn't allow it, so blaming libLTO for this issue is just my assumption. Does anyone encounter the same problem?
This does not happen in a fresh project using Kotlin 2.1.0; I'm trying to make a minimal reproducible example.
t
TL;DR: Add -ld_classic to your Other Linker Flags
c
Thanks a thousand! It worked 😄
👍 1