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 no longer easily inherited on OS X El Capitan #111

Open
kcarnold opened this issue Feb 12, 2016 · 1 comment
Open

DYLD_LIBRARY_PATH no longer easily inherited on OS X El Capitan #111

kcarnold opened this issue Feb 12, 2016 · 1 comment

Comments

@kcarnold
Copy link

The install instructions for CUDNN have you add its directory to DYLD_LIBRARY_PATH. Unfortunately, El Capitan changed how that environment variable works: certain executables (maybe everything in /bin?) don't inherit DYLD_* anymore. It has to do with System Integrity Protection, apparently. Unfortunately, since the th command is a #!/bin/sh script, th doesn't inherit the library path and you get

libcudnn (R4) not found in library path.
Please install CuDNN from https://developer.nvidia.com/cuDNN
Then make sure files named as libcudnn.so.4 or libcudnn.4.dylib are placed in your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)

I hacked around this temporarily by setting the DYLD_LIBRARY_PATH inside ~/torch/install/bin/th, but of course that's fragile. It would be great if somehow cudnn.torch could link directly against a CUDNN library so we wouldn't have to patch the linker to find it.

A workaround I haven't tried might be to put cudnn in ~/lib or /usr/local/lib, since those are on the library path by default.

Edit: some additional info from other projects: oracle/node-oracledb#231

@soumith
Copy link
Owner

soumith commented Feb 12, 2016

ugh! this has been a horrible move from Apple. I had to deal with some of these after-effects recently.

We'll think of a robust solution against this, like allowing the user to specify the path to the lib at runtime as an option. And thanks for the heads-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants