Skip to content

[Fix] Search system paths for shared libraries - #65

Merged
JamePeng merged 3 commits into
JamePeng:mainfrom
benniekiss:find-library
Feb 21, 2026
Merged

[Fix] Search system paths for shared libraries#65
JamePeng merged 3 commits into
JamePeng:mainfrom
benniekiss:find-library

Conversation

@benniekiss

@benniekiss benniekiss commented Feb 21, 2026

Copy link
Copy Markdown

This PR implements using ctypes.util.find_library to find the shared library paths while still falling back to the manual path searching logic.

This improves support for libraries which are installed into standard locations, or which appropriately install themselves with the correct linker targets.

Closes #63

@JamePeng

Copy link
Copy Markdown
Owner

If you are using AI programming, it's best to validate it locally before submitting a pull request.

@benniekiss

Copy link
Copy Markdown
Author

I did not have AI weite this, I just did not run the test suite locally. I did test the change locally, and it worked. I'll check what's going wrong here...

@benniekiss

Copy link
Copy Markdown
Author

Tests pass locally. The issue was a missing import statement.

@benniekiss

Copy link
Copy Markdown
Author

I'm closing this for now, as the library-search is still failing in my case. I believe I must have had a hardcoded path when I initially tested this that allowed the library to load correctly.

Apologies for the bother!

@benniekiss benniekiss closed this Feb 21, 2026
@benniekiss

Copy link
Copy Markdown
Author

Ok, I have this straightened out now -- I had unset DYLD_LIBRARY_PATH. Resetting allows the package to load with this PR, otherwise, the env var paths are never searched. This PR makes it respect both DYLD_LIBRARY_PATH and LD_LIBRARY_PATH.

@benniekiss benniekiss reopened this Feb 21, 2026
@JamePeng
JamePeng merged commit 4088f7b into JamePeng:main Feb 21, 2026
12 checks passed
@benniekiss
benniekiss deleted the find-library branch February 21, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support system-installed ggml

2 participants