Yorgos S.
02/17/2025, 11:02 AM> Task :examples:sqlite:linkDebugExecutableLinuxArm64 FAILED
e: /Users/xxx/.konan/dependencies/llvm-16.0.0-aarch64-macos-essentials-63/bin/ld.lld invocation reported errors
The /Users/xxx/.konan/dependencies/llvm-16.0.0-aarch64-macos-essentials-63/bin/ld.lld command returned non-zero exit code: 1.
output:
ld.lld: error: undefined symbol: fcntl64
>>> referenced by sqlite3.c
>>> 0343851c9008f270-sqlite3.o:(aSyscall) in archive /Users/xxx/dev/projects/test/sqlx4k/sqlx4k-sqlite/build/classes/kotlin/linuxArm64/main/cinterop/sqlx4k-sqlite-cinterop-ffi/default/targets/linux_arm64/included/libsqlx4k_sqlite.a
I’m building on macOs and I’m getting this error only for linuxArm64
and linuxX64
targets.
If I explore the symbols of the .a
file I can successfully find the missing symbol:
U fcntl
U fcntl64
Any ideas?ephemient
02/17/2025, 3:39 PMephemient
02/17/2025, 3:40 PMYorgos S.
02/17/2025, 3:40 PMYorgos S.
02/17/2025, 3:41 PMephemient
02/17/2025, 3:44 PMephemient
02/17/2025, 3:45 PMfreeCompilerArgs += listOf("-linker-option", "--allow-shlib-undefined")
which tells the linker to ignore undefined symbols (hoping that they end up being provided by the actual libc of the system when executed)Yorgos S.
02/17/2025, 5:46 PMmusl
, this resolved the problem.Yorgos S.
02/17/2025, 5:46 PMDavid Nedrow
02/17/2025, 8:14 PMmusl
meaning what?ephemient
02/18/2025, 3:10 AMephemient
02/18/2025, 3:12 AM