Ian Botsford
04/29/2025, 4:21 PMlinux_arm64
on a linux_x64
host. The cinterop task fails with UnsatisfiedLinkError
looking for some newer version of glibc than exists on my host (full error in 🧵). I don't understand why it would be trying to use my host OS libs instead of the corresponding libs from the Konan distribution. 🤔 Anyone have experience debugging cinterops?Ian Botsford
04/29/2025, 4:21 PMIan Botsford
04/29/2025, 4:45 PMjava
binary, which is Corretto 16 x64. I'm not sure if that's what should be happening if it's trying to cross-compile for linux_arm64
. 🤷♂️
• The Java program it runs is the K/N cli-runner from Konan's kotlin-native-prebuilt-linux-x86_64-2.1.0
distribution. I think that's fine?
• The cinterop generator tries to load libclang from Konan's llvm-16.0.0-x86_64-linux-essentials-80
dependency.
• That libclang requires libm which seems to be picked up from my host's /lib64
which does not seem correct since I'd expect the cinterop/Konan work to be contained to files from the Konan distribution.
• That libclang also requires GLIBC_2.29
which my host doesn't have. The only version of libc I can find from Konan is in the aarch64-unknown-linux-gnu-gcc-8.3.0-glibc-2.25-kernel-4.9-2
dependency but, as the name indicates, it's 2.25 not 2.29. This also seems incorrect since I'd expect the libclang to rely on a version of libc that's bundled with Konan. 😖ephemient
04/30/2025, 3:24 PMephemient
04/30/2025, 3:25 PMIan Botsford
04/30/2025, 3:42 PMllvm-16.0.0-x86_64-linux-essentials-80
) then why isn't glibc also?