rubyinstaller2 icon indicating copy to clipboard operation
rubyinstaller2 copied to clipboard

websocket-driver v0.8.0 don't install on ruby less than 3.4 on windows10

Open net1957 opened this issue 7 months ago • 1 comments

with ruby 3.1.7, 3.2.8, 3.3.8 this gem fail to compile on windows with latest version of ruby installer. All mingw packages are on the latest version. On ruby 3.4.4 it install correctly.

logs: `current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver D:/program/Ruby/Ruby33-x64/bin/ruby.exe extconf.rb creating Makefile

current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver make DESTDIR= sitearchdir=./.gem.20250525-11528-y6pu5x sitelibdir=./.gem.20250525-11528-y6pu5x clean

current directory: D:/program/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/websocket-driver-0.8.0/ext/websocket-driver make DESTDIR= sitearchdir=./.gem.20250525-11528-y6pu5x sitelibdir=./.gem.20250525-11528-y6pu5x generating websocket_mask-x64-mingw-ucrt.def compiling websocket_mask.c websocket_mask.c: In function 'Init_websocket_mask': websocket_mask.c:31:46: error: passing argument 3 of 'rb_define_singleton_method' from incompatible pointer type [-Wincompatible-pointer-types] 31 | rb_define_singleton_method(Mask, "mask", method_websocket_mask, 2); | ^~~~~~~~~~~~~~~~~~~~~ | | | VALUE ()(VALUE, VALUE, VALUE) {aka long long unsigned int ()(long long unsigned int, long long unsigned int, long long unsigned int)} In file included from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/internal/anyargs.h:76, from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/ruby.h:27, from D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby.h:38, from websocket_mask.c:1: D:/program/Ruby/Ruby33-x64/include/ruby-3.3.0/ruby/internal/intern/class.h:365:68: note: expected 'VALUE ()(void)' {aka 'long long unsigned int ()(void)'} but argument is of type 'VALUE ()(VALUE, VALUE, VALUE)' {aka 'long long unsigned int ()(long long unsigned int, long long unsigned int, long long unsigned int)'} 365 | void rb_define_singleton_method(VALUE obj, const char *mid, VALUE(*func)(ANYARGS), int arity); | ~~~~~~~^~~~~~~~~~~~~~ websocket_mask.c:3:7: note: 'method_websocket_mask' declared here 3 | VALUE method_websocket_mask(VALUE self, VALUE payload, VALUE mask) | ^~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:248: websocket_mask.o] Error 1

make failed, exit code 2 ` Any idea?

see https://github.com/faye/websocket-driver-ruby/issues/96

net1957 avatar May 26 '25 07:05 net1957

This is a known issue with the gcc-15 release. It is fixed in ruby-3.4.4 but not yet on older stable branches. I'm waiting for ruby-3.2 and 3.3 point releases.

Rubyinstaller-Devkit versions still work, if the MSYS2 isn't updated after the installation.

larskanis avatar May 26 '25 16:05 larskanis

Hello,

Any idea about the next point release? It's very annoying when using gem or bundle update. At this time bigdecimal, cgi, debug, resolv & websocket-driver gems fails. Regards

net1957 avatar Jul 02 '25 18:07 net1957

the latest (3.2.9 and 3.3.9) release solve this issue.

net1957 avatar Aug 03 '25 20:08 net1957