From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63590: 29.0.90; can't load sqlite extension Date: Sat, 20 May 2023 12:59:16 +0300 Message-ID: <83mt1zs4qz.fsf@gnu.org> References: <2a8d4ca6-1fdf-98c7-6d4b-01f9cca30e8b@vogelsang.berlin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63590@debbugs.gnu.org To: Lennart Vogelsang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 20 12:00:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0JO2-0004Hr-8m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 May 2023 12:00:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0JNe-0003hT-EM; Sat, 20 May 2023 06:00:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0JNb-0003gq-Po for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 06:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0JNb-0007vX-9j for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 06:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0JNb-0004V3-5I for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 06:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 May 2023 10:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63590 X-GNU-PR-Package: emacs Original-Received: via spool by 63590-submit@debbugs.gnu.org id=B63590.168457674917172 (code B ref 63590); Sat, 20 May 2023 10:00:03 +0000 Original-Received: (at 63590) by debbugs.gnu.org; 20 May 2023 09:59:09 +0000 Original-Received: from localhost ([127.0.0.1]:57910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0JMi-0004Ss-LI for submit@debbugs.gnu.org; Sat, 20 May 2023 05:59:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0JMf-0004S3-Eo for 63590@debbugs.gnu.org; Sat, 20 May 2023 05:59:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0JMa-0007mr-6y; Sat, 20 May 2023 05:59:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=9WuX1idncOfsyTuPpLOIli8kMaeCdZXZ2lTkWFJUURg=; b=FJAhrIyf/llPld6gOnYC DIRq9nZJdBApe82NdxS8Ajx/zsgEzzcOEhh9CdDztalwdNbb5waaAuK0y/QiJeZTLud3drjviWgEA /VnrYhjtEAcm1x4DLeFJBNvIdMsgbUqlaiOHssctAmRQR5AqaO+OjA+EH2brKkq3kXsnZhat9BHU/ oUBkk5axVTXs+hWcKqXKECwkgc3T/ssPAuhSzBxjE8cb+yrW3qfN9umC4u/w+hRHeTcKjiqWXX2dQ SPny2Gay2dy/VDDi9elwA5vK8oSOz7+tlP/egTcJS+eFp6wUmsvjGHtKFrf6k43exqsbL08dE2UDv hcLe1jezv52VJw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0JMZ-0000Wc-Lw; Sat, 20 May 2023 05:59:00 -0400 In-Reply-To: <2a8d4ca6-1fdf-98c7-6d4b-01f9cca30e8b@vogelsang.berlin> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262046 Archived-At: > 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" > > 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