Ben, thanks for the references. On 2018-10-17 13:57, Ben Coman wrote:
On Wed, 17 Oct 2018 at 18:33, Michel Onoff <michel.onoff@web.de <mailto:michel.onoff@web.de>> wrote:
Afaik, dlopen(3), which I presume UFFI uses internally to load (shared) libraries on demand (I cannot imagine anything else), looks in LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS), not in PATH.
What is the strategy that UFFI internally uses in its own implementation to search for a library? What if that library depends on other libraries in turn? Where would these ones be searched for?
I'm not really familiar with the mechanism, but a quick trawl of the VM sources found these... [1] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/vm... [2] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/Mac%20O... [3] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/... [4] https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/...
For [1] and [2], ioLoadModule() seems to use LD_LIBRARY_PATH, but [3] and [4] don't.
IIUC, [2] is a deprecated version and [3] is the one you are concerned about.
btw, If you want to discuss those files, consider cross posting to vm-dev. http://lists.squeakfoundation.org/mailman/listinfo/vm-dev
cheers -ben