{"action":"opened","issue":{"url":"https://api.github.com/repos/bh107/homebrew-bohrium/issues/2","repository_url":"https://api.github.com/repos/bh107/homebrew-bohrium","labels_url":"https://api.github.com/repos/bh107/homebrew-bohrium/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bh107/homebrew-bohrium/issues/2/comments","events_url":"https://api.github.com/repos/bh107/homebrew-bohrium/issues/2/events","html_url":"https://github.com/bh107/homebrew-bohrium/issues/2","id":299636253,"number":2,"title":"Setting DYLD_LIBRARY_PATH may lead to crashes","user":{"login":"Athas","id":55833,"avatar_url":"https://avatars0.githubusercontent.com/u/55833?v=4","gravatar_id":"","url":"https://api.github.com/users/Athas","html_url":"https://github.com/Athas","followers_url":"https://api.github.com/users/Athas/followers","following_url":"https://api.github.com/users/Athas/following{/other_user}","gists_url":"https://api.github.com/users/Athas/gists{/gist_id}","starred_url":"https://api.github.com/users/Athas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Athas/subscriptions","organizations_url":"https://api.github.com/users/Athas/orgs","repos_url":"https://api.github.com/users/Athas/repos","events_url":"https://api.github.com/users/Athas/events{/privacy}","received_events_url":"https://api.github.com/users/Athas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-23T08:40:54Z","updated_at":"2018-02-23T08:40:54Z","closed_at":null,"author_association":"NONE","body":"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:\r\n\r\n```\r\n$ BH_STACK=opencl python2 -c \"import bohrium as bh; print(bh.bh_info.runtime_info())\"\r\nCannot load library: dlopen(/usr/local/Cellar/bohrium/0.8.10/lib/libbh_ve_opencl.dylib, 2): Symbol not found: __cg_jpeg_resync_to_restart\r\n  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\n  Expected in: /usr/local/lib/libJPEG.dylib\r\n in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\nlibc++abi.dylib: terminating with uncaught exception of type std::runtime_error: ConfigParser: Cannot load library\r\nAbort trap: 6\r\n```\r\n\r\nThe 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\r\n\r\n```\r\nexport DYLD_LIBRARY_PATH=\"/usr/local/lib:$DYLD_LIBRARY_PATH\"\r\n```\r\n\r\nAfter unsetting this variable, Bohrium (with the OpenCL backend) seems to work.  Why is this environment variable necessary?  It seems very fragile."}}
{"actor":{"display_login":"Athas"}}