Description
Loading Julia as a library currently fails on Windows, e.g., in the case that the loading application provides a conflicting library (e.g. an incompatible version of libssh). In that case, the application binary's directory takes precedence over most other DLL search paths, including everywhere that Julia can install its dependencies.
This means that even though Julia is requesting the library to be loaded, the correct file is available, and no conflicting library is actually loaded into memory yet, our LoadLibrary
call gets confused and ends up loading the incompatible version.
The fix is pretty simple (although incomplete, since it does not fix the case that the loading application actually already loaded its conflicting library). We need to make sure we provide a proper path to LoadLibrary
, at least when none of the USE_SYSTEM_*
flags apply.
@staticfloat has already laid out a lot of the groundwork needed for this in #50687, but that work won't land until BB2 is good and ready
This issue is for making just the loading path change early, before fully lazy JLLs are available.