On Wed, Sep 15, 2010 at 11:19:16AM +0300, Nikodemus Siivola wrote:
[snip]
> To get the actual absolute pathname of the .so you have to duplicate
> the searching behaviour of dlopen(), which is somewhat platform
> dependent, and also depends on the current working directory at the
> time the library was loaded.
[snip]
> (defun fix-shared-object (obj new-pathname)
> (declare (pathname new-pathname))
> (setf (sb-alien::shared-object-pathname obj) new-pathname)
> (setf (sb-alien::shared-object-namestring obj)
> (native-namestring (translate-logical-pathname new-pathname)
> :as-file t))
> obj)
The above ideas coupled with parsing the output of /sbin/ldconfig -p
has provided a reliable enough method to find and preserve the shared
libraries used by sb-sys:*shared-objects* for linux on x86 or x86-64
architectures.
Thank you *very* much for your suggestions!
Later,
-pete
|