Closed hughperkins closed 8 years ago
@salicylic , just to confirm ,this is for Mac, right?
Yes, Mac OS 10.11.2.
k, thanks!
Interesting: seems like everything in ~/torch/install/lib
is a .dylib
, whereas everything in ~/torch/install/lib/lua/5.1
is an .so
, on Mac, https://travis-ci.org/hughperkins/clnn/builds/99959543#L1563-L1577
$ ls ~/torch/install/lib
libEasyCL.dylib libclBLAS.dylib libthreadsmain.so
libTH.dylib libclew.1.0.0.dylib lua
libTHCl.dylib libclew.dylib luarocks
libclBLAS.2.4.0.dylib libluaT.dylib
libclBLAS.2.dylib libluajit.dylib
The command "ls ~/torch/install/lib" exited with 0.
0.01s$ ls ~/torch/install/lib/lua/5.1
base64.so lfs.so libimage.so libpng.so libthreads.so
cjson.so libTHCLNN.dylib libjpeg.so libppm.so libtorch.so
crypto.so libTHNN.so libnn.so libsignal.so readline.so
ffi libclnn.so libnnx.so libsundown.so treplutils.so
ffi.so libcltorch.so libpaths.so libsys.so
I guess somehow libTHCLNN.dylib should in fact be a .so too somehow.
Changed THCLNN to a .so in https://github.com/hughperkins/clnn/commit/3026b4e233835c7848e3b7edde758e4cc5eff683 but now get error about libpaths cant be found, https://travis-ci.org/hughperkins/clnn/builds/99961544#L2443-L2452 :
$ luajit -e 'require "clnn"'
luajit: /Users/travis/torch/install/share/lua/5.1/paths/init.lua:1: module 'libpaths' not found:
no field package.preload['libpaths']
no file './libpaths.lua'
no file '/Users/travis/torch/install/share/luajit-2.1.0-beta1/libpaths.lua'
no file '/usr/local/share/lua/5.1/libpaths.lua'
no file '/usr/local/share/lua/5.1/libpaths/init.lua'
no file '/Users/travis/torch/install/share/lua/5.1/libpaths.lua'
no file '/Users/travis/torch/install/share/lua/5.1/libpaths/init.lua'
no file '/Users/travis/torch/install/lib/libpaths.dylib'
no file '/Users/travis/torch/install/lib/libpaths.dylib'
But the odd thing is that libpaths.so
exists, https://travis-ci.org/hughperkins/clnn/builds/99961544#L2429-L2433 :
$ ls ~/torch/install/lib/lua/5.1
cjson.so lfs.so libclnn.so libpaths.so libtorch.so
ffi libTHCLNN.so libcltorch.so libsundown.so
ffi.so libTHNN.so libnn.so libsys.so
... so that is a mystery. I seem to remember seeing this problem before though. I think its something to do with flat namespace, or having to load using dyload( ... , GLOBAL_TLD)
, but I remember it's not very easy to solve...
apparently can reproduce in cltorch, dont even need clnn to reproduce https://travis-ci.org/hughperkins/cltorch/builds/99968449#L2514 :
$ luajit -e 'require "cltorch"'
luajit: /Users/travis/torch/install/share/lua/5.1/paths/init.lua:1: module 'libpaths' not found:
no field package.preload['libpaths']
no file './libpaths.lua'
no file '/Users/travis/torch/install/share/luajit-2.1.0-beta1/libpaths.lua'
no file '/usr/local/share/lua/5.1/libpaths.lua'
no file '/usr/local/share/lua/5.1/libpaths/init.lua'
no file '/Users/travis/torch/install/share/lua/5.1/libpaths.lua'
no file '/Users/travis/torch/install/share/lua/5.1/libpaths/init.lua'
no file '/Users/travis/torch/install/lib/libpaths.dylib'
I think it's all working ok now actually :-) https://travis-ci.org/hughperkins/clnn/branches
SHARED
to MODULE
exe/env
from the travis build, to try to save build time, but breaking the ~/torch/install/bin/torch-activate
script in the meantime, so libpaths.so
didnt load correctlyWorks for me now also (Mac OS 10.11.2). Thanks for the quick attention!
Cool! :-)
see https://github.com/hughperkins/clnn/issues/22#issuecomment-168491731 :
Per @salicylic :
After updating to most recent clnn version, build goes through, but now require 'clnn' fails: