Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Setting DYLD_LIBRARY_PATH may lead to crashes #2

Open
athas opened this issue Feb 23, 2018 · 0 comments
Open

Setting DYLD_LIBRARY_PATH may lead to crashes #2

athas opened this issue Feb 23, 2018 · 0 comments

Comments

@athas
Copy link

athas commented Feb 23, 2018

After installing Bohrium with the Python bridge (#1), I can run code with the OpenMP backend just fine. However, I get an error when I try to use the OpenCL backend:

$ BH_STACK=opencl python2 -c "import bohrium as bh; print(bh.bh_info.runtime_info())"
Cannot load library: dlopen(/usr/local/Cellar/bohrium/0.8.10/lib/libbh_ve_opencl.dylib, 2): Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: ConfigParser: Cannot load library
Abort trap: 6

The reason seems to be that /usr/local/lib/libJPEG.dylib (which is installed via Homebrew, probably as the dependency of something else) takes precedence over the one at /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib, because of Bohrium's instructions to set

export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"

After unsetting this variable, Bohrium (with the OpenCL backend) seems to work. Why is this environment variable necessary? It seems very fragile.

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

No branches or pull requests

1 participant