Hello to everyone. Trying to build `ktor-client` a...
# ktor
d
Hello to everyone. Trying to build
ktor-client
app for linuxArm64, building on Windows. To use curl-engine I should provide curl lib binaries targeted to linuxArm64. For that I am using VM with cross-compile env and was able to successfully build openssl and curl libs. But then when I am trying to build ktor-client gradle reporting about a lot of errors, will paste error log below. Now I am curious, maybe I am using wrong versions of openssl or curl library and ktor depending on some specific verson? Any recomendations?
p
It looks to me like this is what is reported in https://youtrack.jetbrains.com/issue/KTOR-4307 Cross compiling with ktor-client-curl is currently diffiult due to the way the library is included. There has been a request to provide a statically linked curl module but the ticket has been declined: https://youtrack.jetbrains.com/issue/KTOR-2186/Statically-link-curl-in-published-klibs As a workaround I run the relevant gradle tasks (
linkDebugExecutableLinuxX64
etc.) within WSL (Ubuntu on Windows ->
sudo apt install libcurl4-openssl-dev
) when using ktor-client-curl in linuxX64. ARM64 is currently not supported, as you can see in the ticket history the arm64 target has recently been reactivated but then they realized it still doesn't work so the ticket was reopened last week. https://github.com/ktorio/ktor/pull/3881 https://youtrack.jetbrains.com/issue/KTOR-6173/Support-ktor-client-curl-for-linuxArm64
d
Thanks, I will dig into and maybe I will find a workaround. Btw, I was able to use my VM with cross compile env to build openssl and curl from sources for linuxX64 and then link them using my gradle project on windows to get at least a build for linuxX64, so at least some part of work is done.
👍 1