Re: [EXT] relocatable guile on windows

2022-12-08 Thread Mike Gran
On Wed, Dec 07, 2022 at 08:55:10AM -0500, Thompson, David wrote:
> Hi Mike,
> 
> On Sat, Dec 3, 2022 at 9:49 PM Mike Gran  wrote:
> >
> It would be really great if we could organize a bit around upstreaming
> patches for proper Windows support and come up with some documentation
> with official recommendations for how to build for Windows.  I never
> know what the best approach is: cygwin? mingw? native build (more work
> than the other two)?  A lot of other Scheme implementations run on
> Windows, so Guile should, too.

Cygwin is basically and emulated POSIX layer using a C library
(newlib) that is fairly similar to GNU libc.  Guile builds and works
fine with Cygwin already.  The disadvange to Cygwin is that graphical
programs in cygwin require an X server, so they are a bit slow to run
and quite difficult to package up without requiring a downstream user
to get all of Cygwin.

MinGW is basically GCC plus a C library that is definitely not POSIX:
UCRT or MSVCRT, the native Windows libraries.  The result is a native
Windows app.  It comes with just enough of a shell to run autotools.

Native windows using Microsoft's C compiler is always tough because
autotools doesn't support it without extreme gymnastics.  It works
better for CMake programs. I haven't attempted it. It has some quirks
like the lack of #include_next that gnulib depends on.

The long integer patch is the most important and most disruptive if we
want 64-bit windows support.  We have to start there, and everything
descends from that. I'm not sure how to gather support for that.

Regards,
Mike Gran



Re: relocatable guile on windows

2022-12-08 Thread Mike Gran
On Thu, Dec 08, 2022 at 06:56:44AM +0100, Janneke Nieuwenhuizen wrote:
> Mike Gran writes:
> 
> Hi!
> 
> > Almost all instances of the long integer are replaced with intptr_t,
> > since on 64-bit Windows, sizeof(long) < sizeof(void *), in violation
> > of Guile's expectations.  Largely janneke did this work, but, I added
> > a couple more.
> 
> Now that you found more, do you know if JIT works?  I couldn't get it to
> work on wip-mingw, so I've been using --disable-jit.

Sorry, I didn't even look into the lightening directory or try to
patch it.  I just assumed that JIT would be too compilicated
for me to understand.

A recompile with JIT enabled seems to fail almost immediately.

Regards,
Mike Gran