Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sqlite extension loading

69 views
Skip to first unread message

Torsten Berg

unread,
Oct 2, 2022, 4:18:35 AM10/2/22
to
Hi,

not sure, this is probably not really a Tcl issue, but maybe someone has a clue here:

When I try to load an Sqlite extension, it seems as if the path to the extension library get's mangled.

This is on a Mac running macOS Catalina and Tcl 8.6.11. Let's start on a Wish console:

1 % package require sqlite3
3.25.3
() 2 % sqlite3 db /Users/Torsten/somefile.gpkg
() 3 % db enable_load_extension true

Until here, everything works as expected. I have opened the Geopackage file (which is just a special Sqlite file). Then I want to enable the spatialite extension:

() 4 % db eval {SELECT load_extension('/pathTo/libspatialite-5.0.1/mod_spatialite')}
dlopen(libsqlite3/pathTo/libspatialite-5.0.1/mod_spatialite.dylib, 6): image not found

The message I get suggests that the path to the extension library now has an element 'libsqlite3' prepended ... and of course this path does not exist.

Has anyone seen this before and has a hint on what I might be doing wrongly?

Thanks!

Torsten Berg

unread,
Oct 5, 2022, 5:00:42 PM10/5/22
to
For the record: it is solved. I just had to compile a recent version of the sqlite3 package for Tcl (took the current version 3.39.4) and then everything worked as expected.

File closed.
0 new messages