-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE-131] Library: patch possible misuse of find_library() (#132)
On Linux, the Library.load_default() function fails to properly resolve the JLink shared library if not installed in `/opt/SEGGER/JLink`, regardless of the value of `LD_LIBRARY_PATH`. This is possibly caused by an improper use of the ctypes `find_library()` API, which: - On all platforms expects as parameter the library name without any prefix like lib, suffix like `.so`, `.dylib` or version number - Returns the full file path on MacOS and Windows, but only the file name (so name) on Linux. Changes introduced by this patch: - On Linux `find_library('jlinkarm')` will return the resolved soname, for e.g. `libjlinkarm.so.7`, and we'll use the native `dlinfo()` API to retrieve the full file path.
- Loading branch information
Showing
2 changed files
with
279 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters