Thread
#multiplatform
    b

    Brian Estrada

    4 months ago
    Has anyone been able to get cross compilation running (MacOS-ARM => Linux64)?
    I’m using the ktor curl client, not having too much luck there as it requires the curl lib but that isn’t being found
    ld.lld: error: unable to find library -lcurl
    mbonnin

    mbonnin

    4 months ago
    I'm afraid it's not possible because it uses the host dynamic lib. See https://youtrack.jetbrains.com/issue/KTOR-2186/Statically-link-curl-in-published-klibs
    b

    Brian Estrada

    4 months ago
    (it is a trauma coming from the Maven + JVM ecosystem).
    this explained the last 2 hours for me 😆
    thank you for linking this 🙏
    m

    msink

    4 months ago
    It should be possible to run docker container with linux, and make libs directory from it available for K/N compiler.
    b

    Brian Estrada

    4 months ago
    yeah I tried somethnig like this
    FROM gradle:7.4.2-jdk17-alpine AS build
    COPY --chown=gradle:gradle . /home/gradle/src
    WORKDIR /home/gradle/src
    RUN gradle linuxX64Binaries --no-daemon
    didn’t really work out tho, it was just stuck building but not sure if gradle is the correct way to be building it
    hfhbd

    hfhbd

    4 months ago
    You still need to install libcurl in the dockerfile
    m

    msink

    4 months ago
    of course - install libcurl with all dependencies in docker, then copy
    /lib
    ,
    /usr/lib
    (or whatever that linux distribution uses for libs) to host fs, and then point K/N to it by
    -L
    option.