ttypic / swift-klib-plugin

Gradle Plugin for injecting Swift code into Kotlin Multiplatform Mobile shared module
MIT License
188 stars 8 forks source link

Exception in thread "main" java.lang.Error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/copyfile.h:35:10: fatal error: 'sys/cdefs.h' file not found #43

Open sabin19 opened 1 week ago

sabin19 commented 1 week ago

I am getting this issue after updating the Xcode

Exception in thread "main" java.lang.Error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/copyfile.h:35:10: fatal error: 'sys/cdefs.h' file not found /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:75:10: fatal error: could not build module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/dispatch/dispatch.h:28:10: fatal error: could not build module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/os/object.h:28:10: fatal error: could not build module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/objc/objc-auto.h:36:10: fatal error: could not build module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/os/workgroup_base.h:15:10: fatal error: could not build module 'Darwin' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module 'CoreFoundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10: fatal error: could not build module 'CoreFoundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10: fatal error: could not build module 'CoreFoundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/usr/include/xpc/xpc.h:6:10: fatal error: could not build module 'os_object' at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:80) at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:15) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:568) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:311) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLibSafe(main.kt:247) at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.access$processCLibSafe(main.kt:1) at org.jetbrains.kotlin.native.interop.gen.jvm.Interop.interop(main.kt:105) at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:49) at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:23) at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:44)

Darkrai9x commented 1 week ago

This could be a Kotlin bug, they promised that Kotlin 2.0.21/2.1.0 will fix it. https://youtrack.jetbrains.com/issue/KT-70566/LLVM-11-clang-with-Xcode-16-headers-sys-cdefs.h-file-not-found