<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1479</bug_id>
          
          <creation_ts>2023-11-26 09:46:12 +0100</creation_ts>
          <short_desc>NativeLibrary: Add getNativeLibraryPath() returning actual native library path, support throughout DynamicLibraryBundle[Info]</short_desc>
          <delta_ts>2023-11-26 10:02:36 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2.6.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs>gluegen c7efca6d9b0db7305f5352ebf15d915ae5a1fa24
joal 316e80eaa678c9bf1b03685c081d48d2cf927f43
jogl 736b717b5d6d2b2e7ac4066f54495e8e111d0e01
jocl 4bf432acdac37f570226affc2a341a61a1b6d16a</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6953</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-11-26 09:46:12 +0100</bug_when>
    <thetext>Motivation: It is helpful to retrieve the actually used native library pathname,
since loading a library w/o absolute path but lookup through LD_LIBRARY_PATH
may render it hard for the user to determine which library is used.

+++

Windows implementation simply can use GetModuleFileNameA() with the native library handle.

POSIX implementation may utilize a symbol-name to retrieve its address within the 
loading native library used to retrieved the library information 
via dladdr().

To support this feature throughout DynamicLibraryBundle and DynamicLibraryBundleInfo,
the custom DynamicLibraryBundleInfo specializations shall provide  
optional symbol-names per each tool-library-name for the POSIX implementation,
see above.

public interface DynamicLibraryBundleInfo {

...

/**
 * Returns optional list of optional symbol names per {@link #getToolLibNames()} 
 * in same order for an OS which requires the symbol&apos;s address to retrieve 
 * the path of the containing library.
 */
public List&lt;String&gt; getSymbolForToolLibPath();

...

}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6954</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-11-26 10:02:36 +0100</bug_when>
    <thetext>Resolved as described, implemented in GlueGen and adopted in joal, jogl and jocl</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>