How to build guile on Windows through MSYS2?

I have tried different repositories:

  1. https://github.com/texmacs/guile (install dep and run as guide, could not compile)
/bin/sh ../libtool --tag=CC   --mode=link gcc -I/mingw32/include  -g -O2 -Wall -Wmissing-prototypes -I/mingw32/include   -o guile.exe guile-guile.o libguile.la -lregex -lgmp -lws2_32 -lm -lltdl
libtool: link: gcc -I/mingw32/include -g -O2 -Wall -Wmissing-prototypes -I/mingw32/include -o .libs/guile.exe guile-guile.o  ./.libs/libguile.a -L/mingw32/lib -lintl -lregex -lgmp -lws2_32 -lltdl
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: guile-guile.o: in function `inner_main':
C:\msys64\home\Me\guile-1.8.8\libguile/guile.c:53: undefined reference to `_imp__scm_shell'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: guile-guile.o: in function `main':
C:\msys64\home\Me\guile-1.8.8\libguile/guile.c:63: undefined reference to `_imp__scm_boot_guile'
  1. https://github.com/slowphil/mingw-w64-guile1.8 (segmentation fault, disable warning in PKGBUILD file)

With the latest MSYS2, I either couldn’t compile it successfully, or I compile successfully but the binary reports segmentation fault.

Would appreciate anyone to shed some lights on this :slight_smile:

MXE is a better solution to build TeXmacs.

I do not have time to write a guide on it until this Sunday.

We need anyway to provide a way for people on Windows to compile within the OS. I will try to look at this as soon as I have some time. There is an SDK provided with TeXmacs and one can try to use also older versions of Guile, e.g. Guile 1.6, it should also work.

Here you can find development environments for various systems including MSYS2:

ftp://ftp.texmacs.org/TeXmacs/dev/SDK

I fixed my sdk installer. It can build the latest svn of TeXmacs in the latest msys2/mingw environment. AFAICT guile1.8 also builds fine in that environment after fixing the issue reported the first post (but the build process for TeXmacs normally pulls a pre-built binary).

Note that I had to make copies of msys2 packages that were removed from the msys2 repo, most notably qt4.

2 Likes