Kotlin/Native won't link a C library under Linux

Hey all, got this error when linking a C library to a Kotlin Native app:

Task :linkDebugExecutableNativeLinuxX64

e: /home/runner/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86_64-unknown-linux-gnu/bin/ld.gold invocation reported errors
The /home/runner/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86_64-unknown-linux-gnu/bin/ld.gold command returned non-zero exit code: 1.
output:
/usr/lib/x86_64-linux-gnu/libtinfo.so: error: undefined reference to 'stat', version 'GLIBC_2.33'
/usr/lib/x86_64-linux-gnu/libncurses.so.6: error: undefined reference to 'dlopen', version 'GLIBC_2.34'
/usr/lib/x86_64-linux-gnu/libncurses.so.6: error: undefined reference to 'dlclose', version 'GLIBC_2.34'
/usr/lib/x86_64-linux-gnu/libncurses.so.6: error: undefined reference to 'dlsym', version 'GLIBC_2.34'

Task :linkDebugExecutableNativeLinuxX64 FAILED

Apparently, glibc bundled with Kotlin Native toolchain (2.19 in x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2) is of lower version than might be required (GLIBC_2.33 ).

Any clues on how to resolve that would be welcome. Thanks!

1 Like