Skip to content

Load stdlib JLLs by path #55478

Open
Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    JLLsstdlibJulia's standard library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions