-
Notifications
You must be signed in to change notification settings - Fork 26
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
Cannot load 'libcltorch.so' on OSX Yosemite #24
Comments
Ok. Doesnt look similar to any errors I've seen before. I don't have a Mac, so I dont have any way to replicate the issue, or experiment, unfortunately. |
So I'm thinking it can't find the THCl library, but libcltorch.so seems to be looking for THCl.dylib at the proper place.
|
One thing I've noticed, and dont understand fully, is that sometimes a .so/.dylib loaded by one executable/shared-object is not always available to others, but somehow does prevent the others from loading it themselves too. Two things that seem to be related to this are:
|
OK, thanks. I'm new to luarocks... how can I get a prompt when compiling in order to try some changes ? EDIT: cloned the repo, simpler |
You could
|
I'm so confused... This has absolutely nothing to do with cltorch. I'm using an non-POSIX shell (Fish) with a command that converts the torch activate script, which didn't set the DYLD_LIBRARY_PATH environment variable properly. Everything is working now... thanks for your help ! (I would have preferred a more interesting solution ;) ) |
Ah, interesting. By the way, there is a Mac-related issue that sounds like it might be maybe related to this: the |
I don't have this issue... probably a little difference in the configuration. |
Ok
Cool! :-) |
@hughperkins I have the same issue when i try https://github.com/jcjohnson/neural-style and i've tried |
As far as I know, the issue is caused by environment variables are not quite right. Can you print out the output of the following please:
|
env:
|
Ok. Your env is different after running |
No, the problem is not fiexed yet. This's what i get:
|
Ah :-P Hmmm... that's disappointing :-P Hmmmm.... |
Can you repaste the following values from your enviornment please:
(edit: ie, do |
Hmmm, I just found your earlier env in my email, and it seems like you dont have a DYLD_LIBRARY_PATH or an LD_LIBRARY_PATH env var, right? |
Hmmm, right. I can't find a DYLD_LIBRARY_PATH or an LD_LIBRARY_PATH env var. How can I fix this? Did I miss something? |
Hmmm, interesting. Well, I'm not sure why they're not there, but they should be there, and I guess you can fix it by doing something like, directly in your terminal:
or:
|
I get the same exact error as this when trying to run the neural-style demo. The LD_LIBRARY_PATH and DYLD_LIBRARY_PATH seems to be there for me, but no go on the torch. I filed an issue: jcjohnson/neural-style#119 Also running ElCap. Brandons-iMac:neural-style brandonhurr$ env
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
LUA_PATH=/Users/brandonhurr/.luarocks/share/lua/5.1/?.lua;/Users/brandonhurr/.luarocks/share/lua/5.1/?/init.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/brandonhurr/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua
LUA_CPATH=/Users/brandonhurr/torch/install/lib/?.dylib;/Users/brandonhurr/.luarocks/lib/lua/5.1/?.so;/Users/brandonhurr/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so Brandons-iMac:neural-style brandonhurr$ cat ~/torch/install/bin/torch-activate
export LUA_PATH='/Users/brandonhurr/.luarocks/share/lua/5.1/?.lua;/Users/brandonhurr/.luarocks/share/lua/5.1/?/init.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/brandonhurr/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua'
export LUA_CPATH='/Users/brandonhurr/.luarocks/lib/lua/5.1/?.so;/Users/brandonhurr/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so'
export PATH=/Users/brandonhurr/torch/install/bin:$PATH
export LD_LIBRARY_PATH=/Users/brandonhurr/torch/install/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/Users/brandonhurr/torch/install/lib:$DYLD_LIBRARY_PATH
export LUA_CPATH='/Users/brandonhurr/torch/install/lib/?.dylib;'$LUA_CPATH Brandons-iMac:neural-style brandonhurr$ ls ~/torch/install/lib
libEasyCL.dylib libTHCl.dylib libclBLAS.2.dylib libclew.1.0.0.dylib libluaT.dylib libqlua.dylib libthreadsmain.so luarocks
libTH.dylib libclBLAS.2.4.0.dylib libclBLAS.dylib libclew.dylib libluajit.dylib libqtlua.dylib lua
Brandons-iMac:neural-style brandonhurr$ ls ~/torch/install/lib/lua/5.1
base64.so lfs.so libimage.so libpaths.so libqtide.so libsignal.so lzmq
cjson.so libTHCLNN.so libjpeg.so libpng.so libqtsvg.so libsundown.so lzmq.so
crypto.so libTHNN.so libloadcaffe.so libppm.so libqttorch.so libsys.so readline.so
ffi libclnn.so libnn.so libqtcore.so libqtuiloader.so libthreads.so treplutils.so
ffi.so libcltorch.so libnnx.so libqtgui.so libqtwidget.so libtorch.so Brandons-iMac:neural-style brandonhurr$ source ~/torch/install/bin/torch-activate
Brandons-iMac:neural-style brandonhurr$ env
LUA_PATH=/Users/brandonhurr/.luarocks/share/lua/5.1/?.lua;/Users/brandonhurr/.luarocks/share/lua/5.1/?/init.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?.lua;/Users/brandonhurr/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/brandonhurr/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua
LUA_CPATH=/Users/brandonhurr/torch/install/lib/?.dylib;/Users/brandonhurr/.luarocks/lib/lua/5.1/?.so;/Users/brandonhurr/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so |
Hmmm. Unfortunately I have no way of reproducing this. Travis OS X version seems to work ok for me If it was me, and I had a Mac handy, what I'd probably try doing is modify init.lua to preload all the libraries that seem relevant, and then rebuild, ie
And keep adding lines for all the libraries that are being loaded. You can use
so, candidates to try loading include: libTHCl.so, libTH.so, libEasyCL.so, libclew.so, libclBLAS.so.2. The othre libraries in the list are pretty standard, unlikely to be causing issues. You can also try creating an empty script, and just preloading one of the lower level libraries, eg libclew.so has no dependencies, then gradually add higher and higher level libraries, until all are loaded, or there is some issue. clew has no depednencies, other than standard ones:
|
(forgot to add link to travis build, it is here: https://travis-ci.org/hughperkins/cltorch/builds/100248975 ) |
It was #21. It's grinding away right now. Fantastic. :) |
Ok cool :-) We should fix this sometime somehow really... |
Request: can you provide the output of the following please?
|
Seems to fail th> local ffi = require('ffi')
*[0.0000s]*
th> print('ffi.os', ffi.os)
[string "print('ffi.os', ffi.os)"]:1: attempt to index global 'ffi' (a nil
value)
stack traceback:
[string "print('ffi.os', ffi.os)"]:1: in main chunk
[C]: in function 'xpcall'
...s/brandonhurr/torch/install/share/lua/5.1/trepl/init.lua:668: in
function 'repl'
...hurr/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main
chunk
[C]: at 0x01083a2bc0
*[0.0001s]* |
Ok, sorry, like this please, without the
|
Much better this time: th> ffi = require('ffi')
[0.0000s]
th> print('ffi.os', ffi.os)
ffi.os OSX
[0.0000s] |
Thanks! |
This problem happens in iTorch as well, and the removing However, I added |
Cool. Good information alsaksen :-) |
Just a quick update that I could confirm this issue has something to do with
I'm not quite sure about the root cause and where to report this issue, but hopefully this helps @hughperkins to track down the issue. Btw, great job building out the library, love your work! |
Hi,
The installation went just fine, however I can't load the module. Here's the dump of the gdb session:
Apparently the module is trying to load some object files coming from the compilation temporary directory.. which have been deleted at the end of the installation. I'm looking into this, will post my progress here. Any suggestions appreciated :)
The text was updated successfully, but these errors were encountered: