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.devel Subject: Re: sqlite3 Date: Wed, 08 Dec 2021 15:43:59 +0200 Message-ID: <83lf0vw6sg.fsf@gnu.org> References: <87tufmjyai.fsf@gnus.org> <87sfv5ljxn.fsf@gnus.org> <8735n5leza.fsf@gnus.org> <837dch1qox.fsf@gnu.org> <87ee6odu65.fsf@gnus.org> <83h7bjye0b.fsf@gnu.org> <87sfv360np.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8353"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 14:46:18 2021 Return-path: Envelope-to: ged-emacs-devel@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 1muxGz-0001zU-AY for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 14:46:17 +0100 Original-Received: from localhost ([::1]:44676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muxGy-0007Xx-6u for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 08:46:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxF5-0006Yr-A2 for emacs-devel@gnu.org; Wed, 08 Dec 2021 08:44:19 -0500 Original-Received: from [2001:470:142:3::e] (port=58882 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxF4-0003MB-VC; Wed, 08 Dec 2021 08:44:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NQBeMzyMcevfvS3Sggz5+cW65kXrMEC6SU8YmIU+02w=; b=fXT1pLRfyOHH lxF/HhPfS6/CI+wVl73GvZ/+A0O1yfclrSINOqgxpoWuyS6NCVYI6eQM9jbsEdJ8RThtOztqFu1jg 90DlFEv3hhk9GkGA1RDIh7KI5fUXWMBkJZlCnKOC4qJazwo/Vxs8PtakD4RU1WUi7A06teZiXIp9E ELjZqZs1NFisqBQIFowQku5QHaPE/mZCLcbyZ6+e/6P40SCUmMyUeLivoOOSFctjl/HXDRBZxK/jF Qw/rZMV9JeiVoiOAeTHERfxa3R2vLb+k6lWp3GguRj34V6KCLhxcbxQFIDTQu/v4aFgAtS10gDYog 5/eJMKlcRDjHkihir2faMg==; Original-Received: from [87.69.77.57] (port=3724 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 1muxF4-0006fx-NM; Wed, 08 Dec 2021 08:44:19 -0500 In-Reply-To: <87sfv360np.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 08 Dec 2021 08:00:58 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281353 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Wed, 08 Dec 2021 08:00:58 +0100 > > I've now cargo culted the Windows-specific invocations from xml.c into > sqlite.c, and it compiles... but invoking any of the sqlite functions > now makes Emacs segfault. Which isn't quite the result I was hoping > for. :-/ > > And running it under gdb is apparently not very helpful, but I've never > run gdb under Windows... The MinGW port of GDB works very well on Windows, I use it all the time. What problems did you see? > Can you have a look? It's probably obvious to you what's going wrong. I see two problems: . Emacs is linked against the sqlite3 DLL statically, because configure.ac unconditionally adds -lsqlite3 to the link command line. This -lsqlite3 should be removed in the Windows build, since we will be loading the library at run time by an explicit call to the moral equivalent of 'dlopen'. See how this is done in configure.ac for other optional libraries. . You didn't add the necessary stuff to dynamic-library-alist in w32-win.el. Without that, Emacs doesn't know which DLL to try to load.