From: Eli Zaretskii <eliz@gnu.org>
To: Lennart Vogelsang <lennart@vogelsang.berlin>
Cc: 63590@debbugs.gnu.org
Subject: bug#63590: 29.0.90; can't load sqlite extension
Date: Sat, 20 May 2023 12:59:16 +0300 [thread overview]
Message-ID: <83mt1zs4qz.fsf@gnu.org> (raw)
In-Reply-To: <2a8d4ca6-1fdf-98c7-6d4b-01f9cca30e8b@vogelsang.berlin> (bug-gnu-emacs@gnu.org)
> Date: Fri, 19 May 2023 15:25:21 +0200
> From: Lennart Vogelsang via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> To reproduce, I've created an empty folder, cd'ed into it, started
> emacs -Q, copied the sqlite's csv extension source code [0] into
> csvtable.c,
> compiled it with
>
> gcc -O3 -Wall -Wno-unknown-pragmas -fPIC -shared -lm -o
> csvtable.so csvtable.c
>
> and executed the following elisp forms in the scratch buffer:
>
> (setq-local mydb (sqlite-open))
> (sqlite-load-extension mydb "./csvtable.so")
>
> I get a nil return value from the second expression, indicating
> that it did not load the extension (verified by using the `csv` module
> in a `sqlite-execute` call). If I try the same from the `sqlite3` cli
> interface, it works:
>
> .load ./csvtable.so
I think you made one more change to csv.c: you renamed the function
sqlite3_csv_init to the name sqlite3_csvtable_init. Otherwise, the
loading would fail, because sqlite3's cli will not find the entry
function it expects.
More importantly: the csv.c source file to which you point, viz.:
https://www.sqlite.org/src/artifact?ci=trunk&filename=ext/misc/csv.c
is NOT the source file of the libsqlite3_mod_csvtable.so extension
distributed by Debian, which we currently have on the "allow list", it
is a different extension. The source of csvtable is here:
https://packages.debian.org/sid/libsqlite3-mod-csvtable
next prev parent reply other threads:[~2023-05-20 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 13:25 bug#63590: 29.0.90; can't load sqlite extension Lennart Vogelsang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-19 16:36 ` Eli Zaretskii
2023-05-20 9:53 ` Eli Zaretskii
2023-05-20 9:59 ` Eli Zaretskii [this message]
2023-05-20 10:39 ` Lennart Vogelsang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-20 12:35 ` Eli Zaretskii
2023-05-20 12:45 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mt1zs4qz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63590@debbugs.gnu.org \
--cc=lennart@vogelsang.berlin \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).