Hi,
originally I had asked my question on the ruby-talk mailing list, and there it was pointed out that the RubyInstaller list might be a better place to get an answer:
So I will repeat the question here:
How can I build Ruby on Windows with MSYS2 so that I can modify and
debug the interpreter? I read the instructions in the Ruby GitHub
repository about building Ruby, and I tried the build using autoconf,
configure and make, and this fails with the following error:
compiling cont.c
In file included from cont.c:19:
coroutine/ucontext/Context.h:12:10: fatal error: ucontext.h: No such
file or directory
12 | #include <ucontext.h>
| ^~~~~~~~~~~~
This happens on Windows 10 version 2004 in a bash shell started from the MSYS2 environment that
came with Ruby 2.7.1.
$ ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
$ gem --version
3.1.2
I attached the 'config.log' output, compressed with gzip.
I then made an attempt to build Ruby with rubyinstaller2 from
https://github.com/oneclick/rubyinstaller2. This apparently does work
because it produces an installable package, but it is unclear how I
could use this build system to get a debuggable Ruby installation where
I also can make modification to the sources.
The background is that I need to analyze a problem with a gem that
embeds a C library and also curl for HTTP transfers. We wrap this C
library including curl for several programming languages, and only in
the context of Ruby on Windows there is a problem with network transfers
via curl. So the current hypothesis is that there is some interaction
between the Ruby interpreter and the embedded curl library that causes
these problems.
Thanks
Stephan