guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64-bit Guile on Windows


From: Jean Abou Samra
Subject: Re: 64-bit Guile on Windows
Date: Tue, 28 Jun 2022 10:38:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0



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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]