Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYLD_LIBRARY_PATH not searched for libraries #222

Open
peastman opened this issue Jul 19, 2024 · 4 comments
Open

DYLD_LIBRARY_PATH not searched for libraries #222

peastman opened this issue Jul 19, 2024 · 4 comments
Assignees
Labels

Comments

@peastman
Copy link

Describe the bug
I'm setting DYLD_LIBRARY_PATH to tell delocate where to find my libraries, but it still fails to find them:

$ export DYLD_LIBRARY_PATH=/usr/local/openmm/lib
(openmm) CHM-Q05002H061:build peastman$ delocate-listdeps python/dist/OpenMM-8.1.0-cp39-cp39-macosx_11_0_arm64.whl
ERROR:delocate.libsana:
@rpath/libOpenMM.dylib not found:
  Needed by: /usr/local/openmm/lib/libOpenMMAmoeba.dylib
  Search path:

On the other hand, if I invoke it as a python module then it does work:

$ python -m delocate.cmd.delocate_listdeps python/dist/OpenMM-8.1.0-cp39-cp39-macosx_11_0_arm64.whl 
/Users/peastman/miniconda3/envs/openmm/lib/libc++.1.0.dylib
/usr/local/openmm/lib/libOpenMM.dylib
/usr/local/openmm/lib/libOpenMMAmoeba.dylib
/usr/local/openmm/lib/libOpenMMDrude.dylib
/usr/local/openmm/lib/libOpenMMRPMD.dylib

I tried modifying delocate_listdeps.main() to add the line

print(os.environ.get('DYLD_LIBRARY_PATH'))

at the very start. This confirms that the environment variable is seen when I run it with python -m, but not when I use the delocate-listdeps command line tool. Something in there is blocking the environment variables.

Platform (please complete the following information):

  • OS version: macOS 14.4.1
  • Delocate version: 0.11.0
@peastman peastman added the bug label Jul 19, 2024
@isuruf
Copy link
Collaborator

isuruf commented Jul 19, 2024

@HexDecimal
Copy link
Collaborator

Should Delocate add an alternative syntax for handing DYLD_LIBRARY_PATH? Such as an --extra-library-path <dir> argument?

@peastman
Copy link
Author

That would be really useful. In the mean time, it's no problem to use python -m. Maybe document it so people know about the issue?

@qartik
Copy link

qartik commented Oct 15, 2024

Should Delocate add an alternative syntax for handing DYLD_LIBRARY_PATH? Such as an --extra-library-path <dir> argument?

This could be quite helpful in general as macOS SIP can be quite confusing.

@HexDecimal HexDecimal self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants