Bug 1510

Summary: NativeLibrary shall respect OS library-path environment variable for searching in system-path
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major    
Priority: P4    
Version: 2.6.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
390794a4647e1f7e9755f2936922abbe096c85eb
Workaround: ---
Bug Depends on:    
Bug Blocks: 1511    

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