Stewart Matheson
06/28/2021, 10:55 PMBig Chungus
06/28/2021, 11:06 PMStewart Matheson
06/28/2021, 11:15 PMmsink
06/29/2021, 5:02 AMpacman
as package manager.
As for examples - https://github.com/msink/hello-curl builds static app for both 32 and 64 bit native Windows, locally and on GitHub CI.Stewart Matheson
06/29/2021, 5:45 AMe: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\errors\PosixErrors.kt: (11, 30): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (78, 27): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (78, 27): Type mismatch: inferred type is KX_SOCKET /* = SOCKET */ but Int was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (93, 17): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (93, 17): Type mismatch: inferred type is KX_SOCKET /* = SOCKET */ but Int was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (98, 12): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (98, 17): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (174, 27): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (174, 27): Type mismatch: inferred type is KX_SOCKET /* = SOCKET */ but Int was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (196, 31): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (196, 31): Type mismatch: inferred type is KX_SOCKET /* = SOCKET */ but Int was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (196, 94): Type mismatch: inferred type is CValuesRef<IntVarOf<KX_SOCKADDR_LEN /* = Int */>> but CValuesRef<socklen_tVar /* = UIntVarOf<UInt> */>? was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (218, 29): Cannot access class 'platform.posix.SOCKET'. Check your module classpath for missing or conflicting dependencies
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (218, 29): Type mismatch: inferred type is KX_SOCKET /* = SOCKET */ but Int was expected
e: C:\Users\StewartMatheson\Documents\NotInventedHere\ktor\ktor-io\posix\src\io\ktor\utils\io\streams\PosixIo.kt: (218, 91): Type mismatch: inferred type is KX_SOCKADDR_LEN /* = Int */ but socklen_t /* = UInt */ was expected
> Task :cinteropLibcurlMingw32 FAILED
Exception in thread "main" java.lang.Error: C:\Users\STEWAR~1\AppData\Local\Temp\1473305343316438614.c:1:10: fatal error: 'curl/curl.h' file not found
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1003)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:992)
at org.jetbrains.kotlin.native.interop.indexer.NativeIndexKt.buildNativeIndex(NativeIndex.kt:91)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:268)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
msink
06/29/2021, 5:59 AMpacman -S mingw-w64-x86_64-curl mingw-w64-i686-curl
in MSYS2 shell.Stewart Matheson
06/29/2021, 10:41 PM.def
file in kotlin native. Perhaps the cinterops are not even running. This might happen if nativeTargets
in build.gradle.kts
in the ktor-io project is not set. I will start debugging that today. Any other suggests are more than welcome.
nativeTargets.forEach {
it.compilations {
val main by getting {
cinterops {
val bits by creating { defFile = file("posix/interop/bits.def") }
val sockets by creating { defFile = file("posix/interop/sockets.def") }
}
}
val test by getting {
cinterops {
val testSockets by creating { defFile = file("posix/interop/testSockets.def") }
}
}
}
}
msink
06/30/2021, 12:20 PMmain
and 1.6.0
- build failed with exactly same errors, on tag 1.5.4
- build passed.1.6.0
for windows was published...:ktor-io:compilePosixMainKotlinMetadata
failed on 1.5.4
too, but after 30 minutes of various tests.