Have an odd one - getting an issue while compiling...
# kotlin-native
a
Have an odd one - getting an issue while compiling a sharedLib() binary for macosArm64(“native”). I am getting this from doing a
./gradlew linkNative
It’s obviously something to do with the header files used from the toolchain but I have no idea how to specify anything different.
Copy code
2 errors generated.

 * Source files:
 * Compiler version info: Konan: 1.7.21 / Kotlin: 1.7.21
 * Output kind: DYNAMIC

e: org.jetbrains.kotlin.konan.KonanExternalToolFailure: The /Users/ahelbling/.konan/dependencies/apple-llvm-20200714-macos-aarch64-essentials/bin/clang++ command returned non-zero exit code: 1.
output:
In file included from /var/folders/08/mqm71ljs6qsct07_r9qxd9vc0000gn/T/konan_temp15784896127495882400/api.cpp:165:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/exception:84:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/cstdlib:135:9: error: no member named 'at_quick_exit' in the global namespace
using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/cstdlib:136:9: error: no member named 'quick_exit' in the global namespace
using ::quick_exit _LIBCPP_USING_IF_EXISTS;
      ~~^
2 errors generated.
Not sure if it helps, but googling the error message yielded an interesting result.
They updated Android studio to solve it.
a
I literally did that before here - I am using IntelliJ and just command line for builds
So yeah not sure this result is helpful sadly 😞
The most relevant and recent entry I’ve found is this: https://youtrack.jetbrains.com/issue/KT-57848
Does the default / standard linking change in this version of Xcode?
The C++ linker needs to know where to find the third party (dynamic ) libraries. They usually have the .dylib extension and are located by default on macOS in the folder /usr/local/lib or /usr/local/Cellar/<library-name>/../lib for a library built with Homebrew.
Does this gradle build produce an .xcodeproj somewhere?
a
Pretty sure it’s an issue with newer Xcode env + Kotlin compiler support. I’m downloading an older version of Xcode to see if it can resolve it
Looks like it’s only in Kotlin 1.8.0+ that added support for Xcode 14.1
116 Views