Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Dead? No excuse for laying off work.


devel / comp.lang.tcl / Sqlite extension loading

SubjectAuthor
* Sqlite extension loadingTorsten Berg
`- Re: Sqlite extension loadingTorsten Berg

1
Sqlite extension loading

<394fe5ac-4d0f-4ba8-9d58-c35da288bd27n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20254&group=comp.lang.tcl#20254

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:5bcd:0:b0:35b:b56d:b5 with SMTP id b13-20020ac85bcd000000b0035bb56d00b5mr12612718qtb.462.1664698713915;
Sun, 02 Oct 2022 01:18:33 -0700 (PDT)
X-Received: by 2002:ad4:4ea2:0:b0:4b1:86aa:e31a with SMTP id
ed2-20020ad44ea2000000b004b186aae31amr1917258qvb.10.1664698713794; Sun, 02
Oct 2022 01:18:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sun, 2 Oct 2022 01:18:33 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=77.3.191.6; posting-account=ZxsDiAkAAAC9vQQOtXQfXsMvri8SBAlg
NNTP-Posting-Host: 77.3.191.6
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <394fe5ac-4d0f-4ba8-9d58-c35da288bd27n@googlegroups.com>
Subject: Sqlite extension loading
From: berg@typoscriptics.de (Torsten Berg)
Injection-Date: Sun, 02 Oct 2022 08:18:33 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1988
 by: Torsten Berg - Sun, 2 Oct 2022 08:18 UTC

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!

Re: Sqlite extension loading

<04a9b8b2-917c-48a7-bb79-e04bdff2fe19n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=20275&group=comp.lang.tcl#20275

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a0c:cb8d:0:b0:4b1:7a87:8ad5 with SMTP id p13-20020a0ccb8d000000b004b17a878ad5mr1407931qvk.35.1665003639886;
Wed, 05 Oct 2022 14:00:39 -0700 (PDT)
X-Received: by 2002:a37:ac0e:0:b0:6e4:9fd5:bf1e with SMTP id
e14-20020a37ac0e000000b006e49fd5bf1emr1054204qkm.84.1665003639685; Wed, 05
Oct 2022 14:00:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Wed, 5 Oct 2022 14:00:39 -0700 (PDT)
In-Reply-To: <394fe5ac-4d0f-4ba8-9d58-c35da288bd27n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=95.119.120.136; posting-account=ZxsDiAkAAAC9vQQOtXQfXsMvri8SBAlg
NNTP-Posting-Host: 95.119.120.136
References: <394fe5ac-4d0f-4ba8-9d58-c35da288bd27n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <04a9b8b2-917c-48a7-bb79-e04bdff2fe19n@googlegroups.com>
Subject: Re: Sqlite extension loading
From: berg@typoscriptics.de (Torsten Berg)
Injection-Date: Wed, 05 Oct 2022 21:00:39 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2443
 by: Torsten Berg - Wed, 5 Oct 2022 21:00 UTC

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.

On Sunday, October 2, 2022 at 10:18:35 AM UTC+2, Torsten Berg wrote:
> 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!


devel / comp.lang.tcl / Sqlite extension loading

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor