Noticed that the KotlinX Coroutines library provid...
# coroutines
n
Noticed that the KotlinX Coroutines library provides artifacts for the linuxX64 target but not for the other Linux targets (eg linuxArm32Hfp). Why is linuxX64 the only supported Linux target?
d
They're not able to setup testing infrastructure for the other Linux targets.
n
Sounds like the comment is referring to the Android targets. The plain Linux targets (excluding the Android ones) do software builds differently. With the Linux Arm based targets (not the Android ones) testing can either be done via QEMU, or on a Arm based computer (eg a SBC like a Raspberry Pi, or Beagle Bone Black for instance) via SSH. The testing method that is used will heavily depend on the software being tested (aka a "*depends"* type answer simple smile).
For the QEMU option the buildroot would be setup in a similar way as described in this article: http://shallowsky.com/blog/linux/raspbian-virtual-on-x86.html
A basic shell script for setting up a Linux Arm buildroot for a Kotlin Native project that targets a Linux Arm based target (eg linuxArm32Hfp).
A basic shell script for cleaning up a Linux Arm buildroot.
Setting up a Linux Arm buildroot is easier than many people might think. If anything it is a reasonably straightforward process. After the image is mounted the def files in a Kotlin Native project use the mount point as the base for include and linker paths.
Below is a def file example for the curl library:
Copy code
headers = curl.h
linkerOpts.linux = -lcurl
linkerOpts.linux_arm32_hfp = -L/mnt/pi_image/usr/lib/arm-linux-gnueabihf
linkerOpts.linux_x64 = -L/usr/lib/x86_64-linux-gnu
Below is a Gradle build example:
Copy code
// ...
linuxArm32Hfp("linuxArm32") {
        compilations.getByName("main") {
            cinterops.create("modbus") {
                includeDirs("/mnt/pi_image/usr/include/modbus")
            }
            cinterops.create("curl") {
                includeDirs("/mnt/pi_image/usr/include/arm-linux-gnueabihf/curl")
            }
// ...
        }
        // ...
    }
// ...
l
@napperley You might want to submit a PR referencing the issue posted above
☝️ 2
n
There is a related issue in the Issue Tracker about the missing support for the Arm targets: https://github.com/Kotlin/kotlinx.coroutines/issues/855