Skip to content

[macOS] Unable to load homebrew libraries #67

Description

@tzarc

I've been making modifications to the way we distribute https://github.com/qmk/qmk_cli -- rather than providing a brew package, we use uv to create a distribution on the user's machine as part of the bootstrapping process, which installs qmk as a global tool -- and this has hid as a dependency. These are installed fine, with uv handling the dependency management within the python virtual environment.

Now, one of the other prerequisites on macOS is to install libhidapi using brew to allow its use by this library. This gets installed into /opt/homebrew/lib on my machine, much like what you found on #50.

Unfortunately we're seeing that we simply cannot import those libraries without setting $DYLD_LIBRARY_PATH on the shell -- something we really would like to avoid requiring users to do. Unfortunately the proposed fix in #50 to set DYLD_LIBRARY_PATH using os.environ doesn't seem to function on newer versions of either Python or macOS.

#66 does seem to address this problem, but it seems you're not a fan of using that solution in this library.

Requiring QMK users (who in general aren't the most tech-savvy) to run DYLD_LIBRARY_PATH=/opt/homebrew/lib qmk console on macOS instead of the current qmk console isn't too palatable on our end either.

What options do we have to move forward with any sort of solution, if any?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions