Bug 1510 - NativeLibrary shall respect OS library-path environment variable for searching in system-path
Summary: NativeLibrary shall respect OS library-path environment variable for searchin...
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.6.0
Hardware: All all
: P4 major
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1511
  Show dependency treegraph
 
Reported: 2025-06-21 11:15 CEST by Sven Gothel
Modified: 2025-06-24 09:18 CEST (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
390794a4647e1f7e9755f2936922abbe096c85eb
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2025-06-21 11:15:17 CEST
NativeLibrary's 'enumerateLibraryPaths' system search 
only uses the library basename to utilize the OS's search algorithm.

This is not sufficient for all OS, e.g. Windows 10.
Example: Prepend a custom Mesa3D OpenGL library to the environment variable PATH.

Solution is to explicitly search in all directories of the system environment variable:
- Windows: PATH
- MacOS: DYLD_LIBRARY_PATH
- Unix: LD_LIBRARY_PATH

before using the plain basename.
Comment 1 Sven Gothel 2025-06-21 11:35:31 CEST
resolved w/ commit 390794a4647e1f7e9755f2936922abbe096c85eb