Closed kubo closed 2 years ago
A bug report was filed at the ruby issue tracker. I think that it is an issue of this repository. https://bugs.ruby-lang.org/issues/18472
The following code tries to load the ruby dll in the ruby bin directory. However it doesn't work on ruby 3.1 x64 distributed by rubyinstaller.org. That's because the dll name is x64-ucrt-ruby310.dll and doesn't match *msvcr*ruby*.dll. https://github.com/treasure-data/serverengine/blob/4d6dbd3d1b4e1af88cc2593b5b19cf0f6da7d5dd/lib/serverengine/winsock.rb#L104-L110
x64-ucrt-ruby310.dll
*msvcr*ruby*.dll
I think that it will be fixed by the following code:
require 'rbconfig' dlload RbConfig::CONFIG['LIBRUBY_SO']
Well, I checked that a small script including the above code and extern "int rb_w32_map_errno(int)" worked fine but I have not tested it inside of serverengine. I'm not a user of serverengine.
extern "int rb_w32_map_errno(int)"
Thanks for your report! I'll check it.
A bug report was filed at the ruby issue tracker. I think that it is an issue of this repository. https://bugs.ruby-lang.org/issues/18472
The following code tries to load the ruby dll in the ruby bin directory. However it doesn't work on ruby 3.1 x64 distributed by rubyinstaller.org. That's because the dll name is
x64-ucrt-ruby310.dll
and doesn't match*msvcr*ruby*.dll
. https://github.com/treasure-data/serverengine/blob/4d6dbd3d1b4e1af88cc2593b5b19cf0f6da7d5dd/lib/serverengine/winsock.rb#L104-L110I think that it will be fixed by the following code:
Well, I checked that a small script including the above code and
extern "int rb_w32_map_errno(int)"
worked fine but I have not tested it inside of serverengine. I'm not a user of serverengine.