Sanju Naik
10/28/2025, 2:37 PMsqlite3 linker errors while building the iOS App which depends on KMP dependency that uses libs.sqldelight.native .
Tried adding -lsqlite3 to Xcode's other linker flags and also passing it as linkerOptions in
listOf(
iosX64(), // Simulator running on Intel based chips.
iosArm64(), // Actual devices running on Apple bionic.
iosSimulatorArm64() // Simulator running on M1 chips.
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "SomeName"
isStatic = true
linkerOpts("-lsqlite3")
}}
But still it didn't help, Any idea on how to solve this?
NOTE: the same setup was working when we were depending on KMM as a cocoapods dependency. Adding linker errors in the threadSanju Naik
10/28/2025, 2:37 PM[19:49:49]: ▸ ❌ "_sqlite3_load_extension", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_load_extension_wrapper189 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_mutex_held", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_mutex_held_wrapper213 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_mutex_notheld", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_mutex_notheld_wrapper214 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_unlock_notify", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_unlock_notify_wrapper239 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_win32_set_directory", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_win32_set_directory_wrapper171 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_win32_set_directory16", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_win32_set_directory16_wrapper173 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[19:49:49]: ▸ ❌ "_sqlite3_win32_set_directory8", referenced from:
[19:49:49]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_win32_set_directory8_wrapper172 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)Simon Binder
10/28/2025, 2:39 PMSanju Naik
10/28/2025, 2:44 PMSimon Binder
10/28/2025, 2:45 PMdependencies task to view all dependencies and their resolved versions.Sanju Naik
10/28/2025, 2:58 PMsqldelight = "2.0.0-rc02" , looks like that internally uses older version of SQLiter? Let me try updating sqldelight to latest version. latest version depends on 1.3.3 SQLiter - https://github.com/sqldelight/sqldelight/blob/master/gradle/libs.versions.toml#L8 , hopefully that should resolve the issueSanju Naik
10/28/2025, 3:24 PM_sqlite3_load_extension
[20:50:34]: ▸ ❌ "_sqlite3_load_extension", referenced from:
[20:50:34]: ▸ ⚠️ _co_touchlab_sqliter_sqlite3_sqlite3_load_extension_wrapper179 in GopartnerKMM[8](libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a.o)
[20:50:34]: ▸ ❌ ld: symbol(s) not found for architecture arm64
[20:50:34]: ▸ ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)Simon Binder
10/28/2025, 3:35 PMBijan Cronin
11/09/2025, 8:21 PMSanju Naik
11/10/2025, 3:26 AMdebug mode for device arm64 architecture. For now we have worked around this by generating release variant when building for device, as long term solution its good to get this fixed.