From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: MinGW build on master broken by Gnulib update Date: Fri, 06 Sep 2024 11:52:20 +0200 Message-ID: <7918236.WG90pMdilM@nimes> References: <86y1464pvo.fsf@gnu.org> <88120d34-a38a-448b-bdc3-739bcd3d1f4a@cs.ucla.edu> <86r09x1dmf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , bug-gnulib@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Fri Sep 06 11:52:51 2024 Return-path: Envelope-to: gnu-bug-gnulib@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 1smVe7-000A9a-JU for gnu-bug-gnulib@m.gmane-mx.org; Fri, 06 Sep 2024 11:52:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smVdt-0003Nn-2D; Fri, 06 Sep 2024 05:52:37 -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 1smVdp-0003NV-DR; Fri, 06 Sep 2024 05:52:35 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.160]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smVdl-0007tY-Jw; Fri, 06 Sep 2024 05:52:31 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1725616341; cv=none; d=strato.com; s=strato-dkim-0002; b=EEnzaDXvcrJSXXmEJKKUrxrqb7r0U8DRsTV8aOGzx/SdFtEWRwYcSXLE8SQ1nBwYs3 exkE8HeoGHux6ndR8+U+yLMyx8nFC/iKYKIOWC/fmSxKSOqbtZC7kRnuQm//08ayqyEx pLIHUiiZsbXWpgTb3KWa2Cnzq1MAGGlTcBZUF/Q6gpkMnasV6yfdz6QXQHWvcZLmw8qk k1bewkETQdEdtj2p9Q+glaKgkrm2NJouE5plUt9rTSDXXyCVUemEjVND5tuyNmWKZU2D 0rp/Dvz8LgqD27PLpnk78nUMz0FmoPxSI8WOfn57BmJQe4dNzYzIpW1NPy0PpLwky2iv XcAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1725616341; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=/TjMRBV/nK9yiienWfmctEGBusUhmsqfVjkyu/O5054=; b=ojviO6kFBOTpqscWZr2LClIs3vy4dILM82rT8bR6X2oRrkNmhAuDvFylgd47/g5JrL SzGi2IAeKKkbFKEoM0N4hxmWnjrYRVmDCdmOE+tJ8jB6etSKsPq022SrM1LCbcvPm5uD FSTQZoXbIsv+fzDKU64nxOsfl5WxaLpeahIO76NnuN20Ax7Ae03OoKHWDsaIE8MHQT8K q+tvvr4M5MVL9dqcujCZ8mxGqsSWCBU5gIiNWE/1FtDQfvbgbHavjGrKpL1fC6ng2UO1 Z+QDQU2IoC2K27p4O0f9kx0JScFHiI0bwFr2eOWdPh7DNkTS4cYCjsCvvAa53PdnZVoH X9Jw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1725616341; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=/TjMRBV/nK9yiienWfmctEGBusUhmsqfVjkyu/O5054=; b=r4bhxWk5V8ZiDrLUmxttGAlyLPeznk5biDpXj9+pjyXh5gZVS7FlbNfNIFV9YEr+P0 DPF0ZKe0F3iUARBSwkFBITAT+GqUHkDC7idVxCzCdjr2cNtbLiYVDrYJK5rT4Nfpfkvp 0TGP2hat06hCNSYe8IlfXsj3b/SrFySH2z+wq3s50kfretekbKNjbcnXIVOe0QGv7wab Z3jRzPaIH5rJ9kT1nBOl2h8TLLbmaj/KJsdW40UBfINfGkQxrohf1BhuCH4S2WxxBCGS QgHyxN/iIw3zy/W/Pba8rHj9UIassig6Cz8OMrKkRWrl6Ri8Kvy//8EYcbXHRJIUSCG3 bWzw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1725616341; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=/TjMRBV/nK9yiienWfmctEGBusUhmsqfVjkyu/O5054=; b=ktRytipnP679HkyJnacN0SNPSJwBrq8PflPN7DSpL6qOBX/HAY3xvPhZDCfVvy6fMU S/w04RwgIW5zZkyzWXAg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqm2ZHWMunzFi3uOEAcb8g1Nvgrg=" Original-Received: from nimes.localnet by smtp.strato.de (RZmta 51.2.3 AUTH) with ESMTPSA id N17ea70869qKO1s (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 6 Sep 2024 11:52:20 +0200 (CEST) In-Reply-To: <86r09x1dmf.fsf@gnu.org> Received-SPF: none client-ip=81.169.146.160; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:51614 gmane.emacs.devel:323461 Archived-At: Replying to the thread that started at . I agree with everything that Paul wrote in this thread, except for the typo where we wrote "MSVC port of Emacs" but meant "mingw port of Emacs". Eli Zaretskii replied to Paul Eggert: > > ... Callers shouldn't do=20 > > that. They are supposed to include to declare sig2str.=20 > > sig2str.h is for something else: it's for defining SIGNUM_BOUND, and it= =20 > > includes signal.h only to be backwards-compatible with older Gnulib=20 > > versions. >=20 > Then document this and be done. I don't see how is this a big > problem. We already document this, in the module description of the 'sig2str' module: Include: "sig2str.h" /* for SIGNUM_BOUND */ It is a bit terse, but it means: - Callers should use '#include ' for the general part. - Callers should additionally use '#include "sig2str.h"' if they need the SIGNUM_BOUND macro. > > >> Instead, how about adjusting Emacs's MinGW shims to supply the missi= ng > > >> declarations? Something like the attached patch, say. (I don't use M= inGW > > >> so can't easily test this.) > > >=20 > > > This might solve the Emacs problem (and is not very clean even in that > > > case), but will not help other projects that use Gnulib. > >=20 > > That's not something we need to worry about. >=20 > That is strange to hear, since Gnulib is supposed to care about all > GNU projects, not just about Emacs. Gnulib cares about all GNU packages. Emacs is one of them, which is why we are discussing here. You are arguing that there are or might be other GNU packages that have the same problem as Emacs. This is not the case. Emacs uses the --avoid option far more extensively than other packages that use Gnulib. And when a packages uses the --avoid option, the documenta= tion says: "If you want to cut a dependency, i.e., not add a module although one of your requested modules depends on it, you may use the option =E2=80=98--avoid=3Dmodule=E2=80=99 to do so. Multiple uses of this optio= n are possible. Of course, you will then need to implement the same interface as the removed module." The patch that Paul suggested in is exactly the right thing: Since you decided that you don't want the signal-h module, but sig2str needs this module for providing the declaration of the two functions, you need to provide the declaration of these two functions elsewhere. > I have neither time nor energy for this Gnulib politics, so I went > ahead and installed a workaround for this. (If I had more free time, > which I don't, I'd stopped using the Gnulib sig2str.c altogether to > avoid the issue in the first place, but things being as they are, I > installed an easier cop-out.) If the Gnulib folks (CC'ed) are ready > to reconsider, I will be happy to remove the workaround. Adapting Gnulib to one's package can be done in multiple ways: - through the --avoid option for selected modules, - through the --local-dir option and *.diff files, which is roughly equivalent to applying patches after running gnulib-tool, - by upstreaming specific requirements to Gnulib. Among these possibilities, use of the --local-dir option has the highest maintenance cost, especially for a file such as signal.in.h. It would break several times a year. Patching a rarely-modified file such as sig2str.h, like you did, is going to work for some time, but will break when on the Gnulib side we decide to add more declarations to this .h file. In other words, adapting Gnulib to one's package is an art; it's a series of continuing compromises with maintainability in mind. Paul Eggert masters this art perfectly. You can 100% trust him in these matters. Bruno