Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mbakhterev opened this issue Jan 19, 2018 · 18 comments
Open

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

mbakhterev opened this issue Jan 19, 2018 · 18 comments

Comments

@mbakhterev
Copy link

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?

@irakhlin
Copy link
Contributor

irakhlin commented Jan 24, 2018

I don't believe that guile currently builds for mingw64 due to a long standing issue with the guile package itself. #699

@Alexpux
Copy link
Member

Alexpux commented Jan 24, 2018

@irakhlin try to build both 32 and 64 yourself

@vzh
Copy link

vzh commented Oct 2, 2019

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.

@Alexpux
Copy link
Member

Alexpux commented Oct 2, 2019

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

@vzh
Copy link

vzh commented Oct 2, 2019

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

@spk121
Copy link

spk121 commented Oct 7, 2019

@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.

@gjanssens
Copy link

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

@spk121
Copy link

spk121 commented Mar 14, 2021

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.

@alex-tee
Copy link
Contributor

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

@Biswa96
Copy link
Member

Biswa96 commented May 30, 2021

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

@alex-tee
Copy link
Contributor

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)

@jcalve
Copy link

jcalve commented Jun 14, 2021

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...

@Biswa96
Copy link
Member

Biswa96 commented Oct 12, 2022

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
Copy link
Member

Biswa96 commented Oct 12, 2022

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)

@mmuetzel
Copy link
Collaborator

mmuetzel commented Oct 12, 2022

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.

@Biswa96
Copy link
Member

Biswa96 commented Oct 12, 2022

I have tried that but same build error with gethostname.

@mmuetzel
Copy link
Collaborator

mmuetzel commented Oct 12, 2022

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

@spk121
Copy link

spk121 commented Oct 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants