When I install io-event gem with Ruby 3.1 on Windows, it fails with following error message.
With Ruby 3.2 and 3.3, I can install io-event well.
PS C:\Users\watson> ruby -v
ruby 3.1.6p260 (2024-05-29 revision a777087be6) [x64-mingw-ucrt]
PS C:\Users\watson> gem install io-event
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing io-event:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.6.5/ext
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/3.1.0 extconf.rb
checking for rb_ext_ractor_safe()... yes
checking for &rb_fiber_transfer()... yes
checking for -luring... no
checking for sys/epoll.h... no
checking for sys/event.h... no
checking for sys/wait.h... no
checking for sys/eventfd.h... no
checking for rb_io_descriptor()... yes
checking for &rb_process_status_wait()... no
checking for rb_fiber_current()... yes
checking for &rb_fiber_raise()... yes
checking for epoll_pwait2()... no
checking for ruby/io/buffer.h... yes
creating extconf.h
creating Makefile
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.6.5/ext
make DESTDIR\= sitearchdir\=./.gem.20240821-200492-eo54tq sitelibdir\=./.gem.20240821-200492-eo54tq clean
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.6.5/ext
make DESTDIR\= sitearchdir\=./.gem.20240821-200492-eo54tq sitelibdir\=./.gem.20240821-200492-eo54tq
generating IO_Event-x64-mingw-ucrt.def
compiling ./io/event/event.c
compiling ./io/event/selector/selector.c
compiling ./io/event/interrupt.c
./io/event/interrupt.c: In function 'IO_Event_Interrupt_open':
./io/event/interrupt.c:71:9: error: implicit declaration of function 'pipe'; did you mean '_pipe'? [-Wimplicit-function-declaration]
71 | pipe(interrupt->descriptor);
| ^~~~
| _pipe
make: *** [Makefile:247: interrupt.o] エラー 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.6.5 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/io-event-1.6.5/gem_make.out
When I install io-event gem with Ruby 3.1 on Windows, it fails with following error message. With Ruby 3.2 and 3.3, I can install io-event well.
https://github.com/fluent/fluentd/pull/3842