From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Hahnfeld via "Developers list for Guile, the GNU extensibility library" Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile 64-bit Windows support, redux Date: Tue, 28 Nov 2023 22:04:03 +0100 Message-ID: <3f3c0be57479e0566ada30b0a012d9d6876281d5.camel@hahnjo.de> References: <1629803116.370682.1686084646758.ref@mail.yahoo.com> <1629803116.370682.1686084646758@mail.yahoo.com> Reply-To: Jonas Hahnfeld Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-/PUqzEm+o2e1p710RP4V" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15228"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.1 To: Mike Gran , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Nov 28 22:04:51 2023 Return-path: Envelope-to: guile-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 1r85GB-0003YW-G7 for guile-devel@m.gmane-mx.org; Tue, 28 Nov 2023 22:04:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r85Fj-0000bF-R1; Tue, 28 Nov 2023 16:04:19 -0500 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 1r85Fh-0000au-UC for guile-devel@gnu.org; Tue, 28 Nov 2023 16:04:17 -0500 Original-Received: from backus.hahnjo.de ([2a03:4000:2a:2c1::1] helo=mail.hahnjo.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r85FV-0002Hi-Sj for guile-devel@gnu.org; Tue, 28 Nov 2023 16:04:17 -0500 Original-Received: from [IPv6:2001:16b8:f7:af00:1c4e:838e:a1f5:77b5] (200116b800f7af001c4e838ea1f577b5.dip.versatel-1u1.de [IPv6:2001:16b8:f7:af00:1c4e:838e:a1f5:77b5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hahnjo.de (Postfix) with ESMTPSA id 877F675CC9AC; Tue, 28 Nov 2023 22:04:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hahnjo.de; s=default; t=1701205444; bh=Xyo4ReOoJHw5Bq5H5UI6iQfQGui883LfpE2a1QLSuko=; h=Subject:From:To:Date:In-Reply-To:References; b=fjXwiZn9BiFgN6hQ1mMBN/bMnfJhAQAzMetrDLxdvfBPVr9QLeoXbfS/IteZ59HG8 5FYv4HhU4NdLB1DlpOkvJ3eknZvRNp6dqipnnpRuDZUISkUiVsy7IqORwZ8Rv+yqfr OMUSpVtWpBqHrcrOJm0RXbbTz+Hw3rfR8kpWXxwO55MLMXVl4AfN9VsmC2qoQlsKaZ 1NXiIUusK9GRKITP1qZgQ0EZh7S4g+s5oV2qLYrfPrlWbySkTIve8V6YMF0C72fP1V Vfm7qLcG/5DoFAlO6E/K7eUVk89sM3BSQjmHirDSo1nlesTBz8UMleRFzxTVEM3Osa ykC4Mma924FlA== In-Reply-To: Autocrypt: addr=hahnjo@hahnjo.de; prefer-encrypt=mutual; keydata=mQENBFIIleUBCAC94iH8XbAOTIPKPTRiMFcYyWaERWsRS1u3Cu6h3tlvTgLj02j9byL4uChGHhb0p6kuIqP89OlS/PGONDyMaMDvV4DL0woqbw87Y0qNLGHYiFtIXLqyhutHsNgsKObWKb2U7rhfmRbr5JUXFB3D5AWjKL1EBaYWlzH+wjJM3l3gqO9zmt5Q+4IhZkZHkb22SYsaAw4sdNtQ+SN3KUc1OYIZcJcooeQyQiddmiHCXQocMxQMGAbOSxuQhHaujsGWfwoqkAOAry0xt9Ry0FLKCGmj5F0YUlO3trSKuuWQ0xmJdXUMXCEFZ3odZ7t2pN0kGsKFhWN5ZyMqQF9E7igSOfdTABEBAAG0KUpvbmFzIEhhaG5mZWxkIDxqb25hcy5oYWhuZmVsZEBvbmxpbmUuZGU+iQE5BBMBAgAjBQJSKg3hAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQkcnDPSxhrNs1lAgAjEpy/TTOPTLEmdjXJDWgDom7y1+jTBHk37r3zjwWDJCkwr3WmVAnhY9muwo/8gkltvYk6CqzrIuUNxO7pTCfduEE04S19xUxd5IXVSxQoBG+AgzqvDqBmRCwMbDRXQ1EMu7qmX4FtZfjUmCZumQTf8unHzgGE5TgmYPM+UAS528AAWjT526lkLRhoSJHQlSBdaWGjiexCSyF76SedsXboCs9cS47mBWDwZOEin3eyycQlM0xBBPtEABF+Tq7Bt5/W9jc+wIe1f0QaUedsga75UY9wRYWu7Sjs90 1WSpEpdF+beU48rqaxEWLmLWkQy/3Vl571F21U+XP Received-SPF: pass client-ip=2a03:4000:2a:2c1::1; envelope-from=hahnjo@hahnjo.de; helo=mail.hahnjo.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22134 Archived-At: --=-/PUqzEm+o2e1p710RP4V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2023-10-29 at 22:34 +0100, Jonas Hahnfeld wrote: > On Tue, 2023-06-06 at 20:50 +0000, Mike Gran wrote: > > Hello Guile, >=20 > Hi Mike, >=20 > I'm sorry for "necrobumping" this thread; I wanted to reply back in > June but didn't have enough time to work through what I will explain > further below. In any case, I would very much like to see good Windows > 64-bit support in Guile to make use of it in LilyPond. >=20 > > [...] > >=20 > > I'd be willing [1] to update the patches for MinGW support for > > review and inclusion into the main branch > > for 3.0.10 or 3.2 but, only if maintainers are open, in principle, > > to committing the most disruptive patch: the one where all > > long integers become intptr_t to deal with Window's stupid > > 4-byte longs on 64-bit OSs.=C2=A0 Without agreeing on that as a > > possibility, 64-bit Windows support is DOA. >=20 > For a long time, I wasn't really convinced by this argument until I > realized that the alternative would complicate cross-compilation and > move away from the simple {32-bit, 64-bit} x {little-endian, big- > endian} matrix for the bytecode. >=20 > > There are a couple of slightly outdated versions of janekke's 64-bit pa= tch. > > Here, for example: > >=20 > > https://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dwip-mingw&id=3D= 76950b4281c7dfff78b9ead6d3d62c070bbc1f13 >=20 > If I understand correctly, one of the contentious points of this commit > (apart from being big and having many changes in one) is that it moves > GMP away from long. IIRC there was a statement somewhere that GMP will > not change their APIs, which basically means that Guile on Windows > would forever be stuck with a quite significantly patched mini-gmp. >=20 > I would like to propose a different approach: It turns out to be > possible to just define scm_t_inum as intptr_t, while leaving GMP > interfaces alone (be that mini-gmp or a full GMP). Instead, the > mismatch in type widths can be handled during the conversion to mpz. > For a practical implementation, see the fourth patch attached to this > message. >=20 > Afterwards, the fifth patch takes care of the hashes, which are > expected to have the same width as pointers. This is required because > (at least) hashes of symbols are stored into the bytecode. Taken > together, this seems to enable enough functionality to run LilyPond > with Guile 3 on Windows. >=20 > What do you and others think of this approach, would this be "more" > acceptable to land in main? Ping, any comments on this approach? I built binaries for LilyPond 2.25.10 using these patches applied on top of Guile 3.0.9 and the result seems to work fine on Windows. > Jonas --=-/PUqzEm+o2e1p710RP4V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEXw/5YGpL6H9VOgO2kcnDPSxhrNsFAmVmVcMACgkQkcnDPSxh rNu1Sgf+JXk/alMmja7SpoHeoPMLSPPNAjQximBzzsdI14N0IuGf+F0yIfoEov6a kD3YgkEN9VteRrVcTkrlgp8xYgMSPSRkKfsZWrYcn+CSqfootsaL+xzbjGqI5XPg xZVnFLzyOfWYgItrPPKXuS+FxRly3SJiM36Hs5vM2Pz0be807fGttcuHvMvhXUPm mEKcHu/MFP5DJqA57nVLiVgH3VKqgp+HZprsRN9JQgBVTE6+Vm2DO5KHJOOxgRKO DbzhPsBqBuEL1EHI5r9eMk+VJqQByKqd5G67kdUP25Fz4pUu0CVCUF4wH4Vyz+Wz sNdViQGDBcGN6mntZe762KJFsNc7dA== =ZT0F -----END PGP SIGNATURE----- --=-/PUqzEm+o2e1p710RP4V--