Closed larskanis closed 2 years ago
This issue is fixed by https://github.com/oneclick/rubyinstaller2-packages/commit/08db12ba39bea1b72080c118b19107b6a1bcd325 .
Neither the x86 nor the UCRT build suffer from this issue.
Thanks for working on this. Would you consider this a MSYS2 bug, a Ruby bug, a dlfcn-win32 bug, or none of the above?
This is pretty sure another instance of this issue https://github.com/ffi/ffi/pull/553 , but now in dlfcn. It uses LOAD_WITH_ALTERED_SEARCH_PATH with relative paths, where the behavior is undefined.
Thanks.
Currently the dlfcn package is installed by setup-ruby when using any ucrt or a mingw build with windows-2022 image.
Question I should have asked, is there any benefit to using dlfcn with ucrt64 builds?
Or, should setup-ruby install dlfcn at all?
Note that all packages required by Ruby are installed when using windows-2022.
Not sure if you're on vacation. Would you mind if I opened an issue in dlfcn linking to your explanation in
https://github.com/ffi/ffi/pull/553/commits/b3a0a876067c976ccc659985fed7cb70b60dbb0d
Yes, @MSP-Greg that's nice! Thank you for your help!
Discussion about the change to dlfcn-win32 is here: https://github.com/dlfcn-win32/dlfcn-win32/issues/104
What problems are you experiencing?
Fiddle is unable to load DLLs from a path set by RubyInstaller::Runtime.add_dll_directory, when fiddle is built with libdl from the MSYS2-package
mingw-w64-x86_64-dlfcn
. Only the x64-mingw32 platform is affected. Neither the x86 nor the UCRT build suffer from this issue. It fails with:Debugging the DLL loader gives the following output:
... while a successful load looks like so:
The only similar issue found by google is this one in our same repository: https://github.com/oneclick/rubyinstaller2/issues/243 So obviously the .net DLL loading mechanism is similar to the loading mechanism of libdl, since it fails with the same error in a similar situation.
Steps to reproduce
Build fiddle with package
mingw-w64-x86_64-dlfcn
installed, so that fiddle is linked against libdl and the DLL is loaded through the DL library instead of direct Windows API calls (LoadLibrary etc).What's the output from
ridk version
?