03/07/2023, 2:43 AM
An issue has been encountered with generating a static library file using the K/N compiler with the unofficial rp2040 target. In the original Kotlin code base it is hard coded to use JetBrains servers to download dependencies for each K/N target like the target tool chain for instance, which is very bad design (tight coupling). Is there a way to work around this so that local dependencies (via absolute paths) are used instead? Below is the error:
~/repos/kotlin/kotlin-native/dist/bin/kotlinc-native -p static -target rp2040 src
Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler.
error: compilation failed: Server returned HTTP response code: 404 for URL: <>

 * Source files: kotlinLib.kt
 * Compiler version info: Konan: 1.6.0-dev / Kotlin: 1.8.255
 * Output kind: STATIC

exception: org.jetbrains.kotlin.konan.util.DependencyDownloader$HTTPResponseException: Server returned HTTP response code: 404 for URL: <>
Is there documentation available that covers how to use to customise a Kotlin target?
Attached is a customised version of


03/07/2023, 8:47 AM
I don’t know if it solves your problem, but you can use the compiler option