From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.lisp.guile.user Subject: Re: 64-bit Guile on Windows Date: Tue, 28 Jun 2022 10:38:44 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29036"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 To: Thomas Thiriez , guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Jun 28 11:08:24 2022 Return-path: Envelope-to: guile-user@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 1o67Cp-0007Ls-DW for guile-user@m.gmane-mx.org; Tue, 28 Jun 2022 11:08:23 +0200 Original-Received: from localhost ([::1]:47048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o67Co-0006gq-CF for guile-user@m.gmane-mx.org; Tue, 28 Jun 2022 05:08:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o66kJ-00042W-0T for guile-user@gnu.org; Tue, 28 Jun 2022 04:38:55 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.75]:46541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o66kE-0006JP-1z for guile-user@gnu.org; Tue, 28 Jun 2022 04:38:54 -0400 Original-Received: from [172.20.10.3] ([37.166.203.175]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.184]) with ESMTPSA (Nemesis) id 1M3lkT-1o5pd01ZlT-000r7X; Tue, 28 Jun 2022 10:38:45 +0200 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:GpKvL9ifyq8jiGK0TJOeT3ej0n65+viiybc/bTpa6JZw5Cpi8+H 9zAy+WjoJLIEHIEICvCmk6tvbGk/ndWmY/zpCt2aTnqOeLdnHdMbpEZWKKcmhZ/PNlfN7x/ FhpoNAEmaaADhOam3N4tqHou/Dq3vQrhlmBswhcRHiTo5tPjAOCI8nLJWR0dc6GQ039GWhc +IiT/M9WUXAtubXE3I/wQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:CsjAC3jMltI=:mgevoiIDgmgd2schnisPOO fHZllkswmAV2XRPiosnayltYCY7F15QSyb7q7iB4+eI0WEJ8FAiS/Cya3TwsFaSI7FNYRUtRj 0YmrpHXsHz6P335BK7txudDkJXNYbU6yrVIFpEkREL1R+4+ZXoSQ3dYAMJxu+B3xZf9GuZskH 1tRtYJTkVfaurmLB9GuRmYHzLw3TH4Eesbx54CWJixNWTj/m1zh7JrgmfQPxh7Q2EG4SJwOiX 78UnJg8VtAO9P0QjKnOOerk9m4XhbgCIIArYgvvmQ5hDRoVrESIvymVLpko5M1i+BI72VmnRD 81LQDg/Oobuw0SV19WsM1hdrgn5i7ek/KMndFLQNOFC9rq2qssgIN7+rrpWeGlgfywJ2f9uZs t35i87/2BIsNC8oPUiDEgl3zIjBygqLaxSQQEv9Hwqc/t2BCl1G62hvsVoFwig5aVnjs6sEvY g2jV6rSiu8yz7/cjsZB+Ci07I4fY+udI+hvOUTTO8FWiI8rUVicOEjOCeAucsrC+lGctQrecf p+KdOUGXUohL7YppSIZDwAaXFXaoL1Pky2YO7VqhV1ffR0UeyyCgHji+5rlvUbzIysNqAOizf vGBCyI3AYlv7kvqTQnG8GlON12DykZXqjqQYY3Rnr48Ocpt9IbSjKglIzdNiXdSF4JSm5cEiJ S6C0wgUcr31Re01RHQuRLHDIxuwdZNWJKX5fMcKzd7uUDBn7eBHgzBHDR898oRNmEgMgJnxPU GvE9uUJ4kCtRq44Y+axmuHWzAuaNgjnsfsIVkA== Received-SPF: none client-ip=217.72.192.75; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18353 Archived-At: Le 27/06/2022 à 15:56, Thomas Thiriez via General Guile related discussions a écrit : > Hi, > > I am currently porting a macOS application to Windows, and need to > have libguile working. > > I can see GnuCash works with Guile. I could borrow their libguile.dll, > but it is a 32-bit build, and I am making a 64-bit application. I > tried building Guile 3, but had more success with Guile 2.2, so I will > keep that version. > > I have cross compiled it on my mac with mingw, and it kind of works. > The only thing is that if I compile my .scm files to .go, then my > fixnums are not automatically converted to big nums, and I get things > like that: > > (* 999 999 999) -> -76738825 > > My fix is to keep the .scm files, and avoid compiling to .go. > > I believe this has something to do with the fact that, on that > platform, we have: > > sizeof(SCM)  == 8 > sizeof(long) == 4 > > Is there something to do about that problem? Is there something I can > do to have a working 64-bit Guile on Windows? > > Thanks a lot for any help you could provide. We had exactly the same problem at LilyPond, and this was the fix: https://gitlab.com/lilypond/lilypond/-/blob/master/release/binaries/lib/dependencies.py#L721 Namely, you need to patch libguile/conv-integer.i.c and conv-uinteger.i.c to replace "SIZEOF_TYPE < SIZEOF_SCM_T_BITS" with "SIZEOF_TYPE < SIZEOF_LONG". HTH, Jean