Hi everyone,
Yesterday, I updated my msys2 environment with "pacman -Syuu".
It went well, but after that, the gem charlock_holmes was not working anymore.
I tried to uninstall/reinstall the gem the way I always did (and was working fine):
gem install charlock_holmes -- --with-icui18nlib=icuin --with-icudatalib=icudt
But now the install fails miserably (see the command output below).
I guess this an issue with rubyinstaller, since what was working before the msys2 update does not work any more (correct me if I'm wrong): any idea?
Thanks!
-- Thierry
$ uname -a
MSYS_NT-10.0-19045 Hyperion 3.6.2-24ff97bf.x86_64 2025-05-29 07:57 UTC x86_64 Msys
> ruby -v
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x64-mingw-ucrt]
> gem install charlock_holmes -- --with-icui18nlib=icuin --with-icudatalib=icudt
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions with: '--with-icui18nlib=icuin --with-icudatalib=icudt'
This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
current directory: c:/ruby-3.4.2-x64/lib/ruby/gems/3.4.0/gems/charlock_holmes-0.7.9/ext/charlock_holmes
c:/ruby-3.4.2-x64/bin/ruby.exe extconf.rb --with-icui18nlib\=icuin --with-icudatalib\=icudt
checking for pkg-config for icu-i18n... ["-Ic:/msys64/ucrt64/bin/../include ", "-Lc:/msys64/ucrt64/bin/../lib", "-licuin -licuuc -licudt"]
checking for pkg-config for icu-io... ["-Ic:/msys64/ucrt64/bin/../include ", "-Lc:/msys64/ucrt64/bin/../lib", "-licuio -licuin -licuuc -licudt"]
checking for pkg-config for icu-uc... ["-Ic:/msys64/ucrt64/bin/../include ", "-Lc:/msys64/ucrt64/bin/../lib", "-licuuc -licudt"]
checking for -licuin... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudt... yes
checking for icu that requires explicit C++ version flag... no
Static linking is disabled.
creating Makefile
current directory: c:/ruby-3.4.2-x64/lib/ruby/gems/3.4.0/gems/charlock_holmes-0.7.9/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20250603-17520-hpk71s sitelibdir\=./.gem.20250603-17520-hpk71s clean
current directory: c:/ruby-3.4.2-x64/lib/ruby/gems/3.4.0/gems/charlock_holmes-0.7.9/ext/charlock_holmes
make DESTDIR\= sitearchdir\=./.gem.20250603-17520-hpk71s sitelibdir\=./.gem.20250603-17520-hpk71s
generating charlock_holmes-x64-mingw-ucrt.def
compiling converter.c
converter.c: In function '_init_charlock_converter':
converter.c:56:62: error: passing argument 3 of 'rb_define_singleton_method' from incompatible pointer type [-Wincompatible-pointer-types]
56 | rb_define_singleton_method(rb_cConverter, "convert", rb_converter_convert, 3);
| ^~~~~~~~~~~~~~~~~~~~
| |
| VALUE (*)(VALUE, VALUE, VALUE, VALUE) {aka long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)}
In file included from C:/ruby-3.4.2-x64/include/ruby-3.4.0/ruby/internal/anyargs.h:76,
from C:/ruby-3.4.2-x64/include/ruby-3.4.0/ruby/ruby.h:27,
from C:/ruby-3.4.2-x64/include/ruby-3.4.0/ruby.h:38,
from common.h:9,
from converter.c:2:
C:/ruby-3.4.2-x64/include/ruby-3.4.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, VALUE)' {aka 'long long unsigned int (*)(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);
| ~~~~~~~^~~~~~~~~~~~~~
converter.c:7:14: note: 'rb_converter_convert' declared here
7 | static VALUE rb_converter_convert(VALUE self, VALUE rb_txt, VALUE rb_src_enc, VALUE rb_dst_enc) {
| ^~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:251: converter.o] Error 1
make failed, exit code 2
Gem files will remain installed in c:/ruby-3.4.2-x64/lib/ruby/gems/3.4.0/gems/charlock_holmes-0.7.9 for inspection.
Results logged to c:/ruby-3.4.2-x64/lib/ruby/gems/3.4.0/extensions/x64-mingw-ucrt/3.4.0/charlock_holmes-0.7.9/gem_make.out