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: Thu, 04 Jan 2024 11:40:30 +0100 Message-ID: References: <1629803116.370682.1686084646758.ref@mail.yahoo.com> <1629803116.370682.1686084646758@mail.yahoo.com> <3f3c0be57479e0566ada30b0a012d9d6876281d5.camel@hahnjo.de> Reply-To: Jonas Hahnfeld Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-PgKn7g8/ba76OS9+Mwgn" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40276"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.2 To: Mike Gran , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Jan 04 11:41:04 2024 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 1rLL9r-000ABs-CT for guile-devel@m.gmane-mx.org; Thu, 04 Jan 2024 11:41:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLL9Y-0004RL-P1; Thu, 04 Jan 2024 05:40:46 -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 1rLL9P-0004Qn-Pv for guile-devel@gnu.org; Thu, 04 Jan 2024 05:40:37 -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 1rLL9N-0002Np-7j for guile-devel@gnu.org; Thu, 04 Jan 2024 05:40:35 -0500 Original-Received: from [IPv6:2001:16b8:6e:6000:8507:1dbb:32ec:d29] (200116b8006e600085071dbb32ec0d29.dip.versatel-1u1.de [IPv6:2001:16b8:6e:6000:8507:1dbb:32ec:d29]) (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 30E84760DB23; Thu, 4 Jan 2024 11:40:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hahnjo.de; s=default; t=1704364831; bh=4i3NTvx8RuMZYwgdQLfbumxbb4DRL87j5Mf6L7jOCBE=; h=Subject:From:To:Date:In-Reply-To:References; b=gQYnpoztVrLne7XZrJXLTAlYNOi5yAWSincxNMs5zJXlTjh68HweWB8ECUJnPl/SH AtaFdJ69yENq7Py/h5PeCh7GUFR08mzt6wxU9Feu0OA2ioBYPlVUb6cW+ySmaXYs7W p/Qb8eAZhszkoKH0i1CqTNPCWvEcxi4M6PfxguD9a7h2kipbiC75aPvpR4yriaBsTX PCzGgKg2kOXoLvbXR7KfqzxpODoS9Z95KrwFqZkvW9xhe9zURyKdynKjr4ioEp2O0t Wf/DMi4V042VMOI2KEqJlY0ASwPiR/QeLjLsksGSH3R8QouiwIIcgmGUqTdezAuylq krz/67RIjzlzA== In-Reply-To: <3f3c0be57479e0566ada30b0a012d9d6876281d5.camel@hahnjo.de> 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:22264 Archived-At: --=-PgKn7g8/ba76OS9+Mwgn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2023-11-28 at 22:04 +0100, Jonas Hahnfeld wrote: > 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 = patch. > > > Here, for example: > > >=20 > > > https://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dwip-mingw&id= =3D76950b4281c7dfff78b9ead6d3d62c070bbc1f13 > >=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? >=20 > 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. Another ping; meanwhile we switched to building the official binaries of LilyPond with Guile 3.0 starting from version 2.25.11, but it would be really great to get rid of our downstream patches... Cheers, Jonas --=-PgKn7g8/ba76OS9+Mwgn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEXw/5YGpL6H9VOgO2kcnDPSxhrNsFAmWWix4ACgkQkcnDPSxh rNv98AgAlpywQ4eVt+dizdxB8PSNL4axbDeQ2AxYTs6oy68jOYTU7xQwCwfodVsy kZ5lZW4R4Ydnv+j2H+sHu8ifFEioxK7++d16i2CKyz8gWxi8YVW2GI0+aT51Q1CA yH+Glg++47XE9U+EqkmRXBSkLHxJ7+lDPO+wiE3PjK0OqjdqDd6fNupCkN6IaN3x ShDtnxOEVwl8keddk15EMKUdpSTKM5JLaIw5cDomuX3G6JfdxmBtn/2YBxFyOl2z 9njFPIuC9aDUiaUE1XPRw8nk+Jx3BrURdk6Uz/YnoS4QgXH8FGUzNJsknRw8LmeR a+/cmO7R5BfBTYuBmvTeS9Nmo0yKYQ== =c5v7 -----END PGP SIGNATURE----- --=-PgKn7g8/ba76OS9+Mwgn--