MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

[mingw-w64-make] Is it possible to bring back Guile support?

Open mbakhterev opened this issue 6 years ago • 18 comments

It is much more easier and efficient to automate complex build processes with embedded Guile procedures than with GNU Make's own internal language. Is it possible to enable Guile support again?

mbakhterev avatar Jan 19 '18 20:01 mbakhterev

I don't believe that guile currently builds for mingw64 due to a long standing issue with the guile package itself. https://github.com/msys2/MINGW-packages/issues/699

irakhlin avatar Jan 24 '18 17:01 irakhlin

@irakhlin try to build both 32 and 64 yourself

Alexpux avatar Jan 24 '18 17:01 Alexpux

Hi there, There was reported on the guile-user mailing list that the following branch should work: http://git.savannah.gnu.org/cgit/guile.git/log/?h=wip-mingw-guile-2.2 There are several patches for MinGW there.

vzh avatar Oct 02 '19 09:10 vzh

@vzh I will not build package from git, only release versions

Alexpux avatar Oct 02 '19 09:10 Alexpux

OK, thank you! I'll ask guile devs if they have any plans on releasing it.

vzh avatar Oct 02 '19 12:10 vzh

@vzh @Alexpux Yeah, that mingw guile git branch is mine, so I suppose it is up to me to see if I can get those patches past the maintainers and into mainline. I'll see what I can do.

spk121 avatar Oct 07 '19 14:10 spk121

@spk121 Have you made some progress in mainlining your patches ? It would really be helpful to have a mingw guile package.

gjanssens avatar Jun 13 '20 14:06 gjanssens

The upcoming 3.0.6 release should support MinGW out of the box at least at some level. The unthreaded, 32-bit build will definitely work, though it won't pass the test suite 100% due to missing features. We're hoping to get the 64-bit build and the threaded build fixed by 3.0.6 as well, but, it is TBD.

spk121 avatar Mar 14 '21 14:03 spk121

Guile 3.0.7 is out. is it possible to re-add guile support with this release?

alex-tee avatar May 30 '21 04:05 alex-tee

Are we asking for mingw-w64-guile package here? Or somehow adding guile in make 😕

Biswa96 avatar May 30 '21 13:05 Biswa96

I personally just want libguile (so a mingw-w64-guile package), but the guile base package is also stuck at version 2 and could use an update (if possible)

alex-tee avatar May 30 '21 13:05 alex-tee

I tried to compile 3.0.7, master, and a branch named "wip-mingw", the furthest I got was on the later with ./configure --enable-mini-gmp --disable-networking but it still fails after a while...

jcalve avatar Jun 14 '21 09:06 jcalve

I have sent an email in guile mailing list here https://lists.gnu.org/archive/html/guile-devel/2022-10/msg00019.html. If things go well I can try to add mingw-w64-guile package.

Biswa96 avatar Oct 12 '22 02:10 Biswa96

Some updates.

  1. With gethostname(), the build fails with the error:
ld.exe: .libs/libguile_3.0_la-posix.o: in function `scm_gethostname':
libguile/posix.c:2379: undefined reference to '__imp_gethostname_used_without_requesting_gnulib_module_gethostname'

Some info about that in here https://lists.gnu.org/archive/html/bug-gnulib/2010-09/msg00265.html

  1. If I disable the gethostname() check with this diff
--- a/configure.ac
+++ b/configure.ac
@@ -565,7 +565,7 @@ AC_CHECK_DECLS([_NL_NUMERIC_GROUPING], [], [], [[#include <langinfo.h>]])
 #       only with `_XOPEN_SOURCE' or some such.
 #
 AC_CHECK_HEADERS([crypt.h netdb.h pthread.h pthread_np.h sys/param.h sys/resource.h sys/file.h sys/mman.h])
-AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
+AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname)
 AC_CHECK_DECLS([sethostname, hstrerror, cuserid])
 
 # crypt() may or may not be available, for instance in some countries there

guile.exe itself fails with the errors

  • with lto:
Mingw-w64 runtime failure:
32 bit pseudo relocation at 00007FF721B21584 out of range, targeting 00007FFECD4B7690, yielding the value 00000007AB996108.
  • without lto:
Pre-boot error; key: misc-error, args: ("primitive-load-path" "Unable to find file ~S in load path" ("ice-9/boot-9") #f)

Biswa96 avatar Oct 12 '22 14:10 Biswa96

For the first error, you might need to add gethostname to the list of gnulib modules (gl_MODULES) in m4/gnulib-cache.m4. After that, you might need to run autogen.sh to regenerate the files.

Edit: Noticed a bit late that autogen.sh isn't part of the tarball. (I wonder why.) I was looking at the git repository: http://git.savannah.gnu.org/cgit/guile.git/tree/autogen.sh But afaict, all that script actually does is running autoreconf -fi.

mmuetzel avatar Oct 12 '22 15:10 mmuetzel

I have tried that but same build error with gethostname.

Biswa96 avatar Oct 12 '22 15:10 Biswa96

Sorry. That was a bit more involved than I initially thought. I regenerated the gnulib files including the gethostname module from the same commit they used to get their gnulib files the last time (rev 8f4538a53d64054ae2fc8b86c0f87c418c6176e6). (First patch.) With that, compilation still failed pretty early on because of a missing header. (Second patch.) But even with those patches, it still doesn't work for me.

Just wanted to share the patches in case you are more successful: guile-patches.zip

mmuetzel avatar Oct 12 '22 19:10 mmuetzel

Hi. The only version of Guile that I've built successfully on MinGW recently is MSys2 MinGW 32. From the latest commit in the 'main' branch of the upstream repo, the configure line that works is ./configure CFLAGS="-g -Wall -O1" --enable-lto=no --without-threads --enable-jit=no --enable-mini-gmp -C

So it is 32-bit only, unthreaded.

The 64-bit build remains broken because of long == 4 bytes, when guile expects long == 8 bytes. There are some patches, but, nothing moved into the main tree

spk121 avatar Oct 15 '22 20:10 spk121