Explain how to respond to the error message
ryandesign at macports.org
Sun Mar 27 00:55:25 UTC 2022
Please direct all mailing list questions to the addresses at lists.macports.org, not the older addresses that were deprecated in late 2016. I've fixed the address in this reply.
On Mar 26, 2022, at 04:54, Epstein, David wrote:
> I am using MacPorts base version 2.7.2 under OS 11.6.4.
> All my dealings with MacPorts is done using sudo
> I got the following error:
When doing what?
> 45 try
> ---> 46 _lib = cdll.LoadLibrary('libopenslide.0.dylib')
> 47 except OSError
> 48 # MacPorts doesn't add itself to the dyld search path, but
> 49 # does add itself to the find_library() search path
> 50 # (DEFAULT_LIBRARY_FALLBACK in ctypes.macholib.dyld) on
> 51 # Python 2.6 and 2.7. Python 3 users on MacPorts should add
> 52 # the MacPorts lib directory to DYLD_LIBRARY_PATH.
> Q1 Where is DYLD_LIBRARY_PATH defined?
> Q2 What is the official pathname of the “MacPorts lib directory”?
> Q3 How should I have found the answers to the above two questions, without
> bothering macports-users?
> It would be nice if the standard MacPorts distribution dealt with this
> problem so that I didn’t have to deal with it manually.
Normally, DYLD_LIBRARY_PATH should not be defined. It should only be set by a build system at very specific times when needed during the build. You should not need to set it after the build is done.
Sounds like whatever third-party software you're running here is under the mistaken belief that you should set DYLD_LIBRARY_PATH to some value when running their program. You should ask them to fix their program so that that is not necessary, because setting DYLD_LIBRARY_PATH other than at the very specific times I mentioned can cause unintended consequences. If they believe they need to set DYLD_LIBRARY_PATH because of some deficiency in MacPorts, they should be discussing that with us so that we can correct whatever the problem is.
If the software you're running was installed by a MacPorts port, we could patch it to fix the problem for them; if so, let us know what port it is.
The MacPorts library directory it's referring to would be whatever directory libopenslide.0.dylib is located in, which might be /opt/local/lib.
More information about the macports-users