This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author embassy_vfx
Recipients embassy_vfx, ned.deily, ronaldoussoren
Date 2022-01-26.21:05:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643231140.7.0.949544098465.issue46540@roundup.psfhosted.org>
In-reply-to
Content
MacOS Catalina 10.15.4 and 10.15.7
tested with XCode Python3.8 install and Python3.7.9 installer from https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg (and my own build of 3.7.12)

When importing libraries that use shared object files to an NFS mounted directory, they do not open the dynamic library properly. We can use PySide2 as an example here. This workflow works fine in python 2.7 using the same steps.

Repro Steps:
1)pip install PySide2 to an NFS mounted directory: `/usr/local/bin/python3.7 -m pip install --target=/<path_to_nfs_dir>/nfs_3.7 PySide2`
2)`export PYTHONPATH=/<path_to_nfs_dir>/nfs_3.7`
3)run python `/usr/local/bin/python3.7`
4)import PySide2 - you should get an ImportError that looks like "dlopen(/<path_to_nfs_dir>/nfs_3.7/shiboken2/shiboken2.abi3.so, 2): Library not loaded: @rpath/libshiboken2.abi3.5.15.dylib" - otool shows shiboken2.abi3.so has it's rpath set as @loader_path and I've confirmed both files exist.

If I follow the same procedure above but instead install PySide2 to `/tmp/local_3.7` everything works as expected and the binaries are loaded properly.

I had this same issue with standard library .so files when I installed my custom build of python to an NFS mounted directory (_ssl as an example) but only when running through a virtual environment. Possibly @rath/@loader_path related? This seems to only be an issue on MacOS as I have no issues on the same NFS mount on Linux.
History
Date User Action Args
2022-01-26 21:05:40embassy_vfxsetrecipients: + embassy_vfx, ronaldoussoren, ned.deily
2022-01-26 21:05:40embassy_vfxsetmessageid: <1643231140.7.0.949544098465.issue46540@roundup.psfhosted.org>
2022-01-26 21:05:40embassy_vfxlinkissue46540 messages
2022-01-26 21:05:40embassy_vfxcreate