clementfarabet / gfx.js

A graphics backend for the browser (with a Torch7 client).
MIT License
125 stars 35 forks source link

cannot load '/usr/local/lib/lua/5.1/libtorch.so' #33

Closed rolfvandam closed 9 years ago

rolfvandam commented 9 years ago

Trying to install gfx.js but after following all the instructions I'm still stuck with:

root@d21846a41387:/# luajit -lgfx.start
luajit: /usr/local/share/lua/5.1/torch/init.lua:11: cannot load '/usr/local/lib/lua/5.1/libtorch.so'
stack traceback:
[C]: in function 'require'
/usr/local/share/lua/5.1/torch/init.lua:11: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/image/init.lua:32: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/js.lua:5: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/start.lua:6: in main chunk
[C]: at 0x0045d4f0
[C]: at 0x00405e60

I've tried it numerous times, on Ubuntu 14.10 and a docker instance with Ubuntu 12.04. Same exact problem. The file it says it can't find is present. Adding /usr/local/lib/lua/5.1/ to LD_LIBRARY_PATH doesn't help.

I'm following the instructions provided here: http://code.cogbits.com/wiki/doku.php?id=tutorial_basics

rolfvandam commented 9 years ago

This is what I got after trying some stuff (Ubuntu 14.10):

rolf@shogun:~$ luajit -lgfx.start
luajit: /usr/local/share/lua/5.1/paths/init.lua:43: attempt to call global 'concat' (a nil value)
stack traceback:
/usr/local/share/lua/5.1/paths/init.lua:43: in function 'thisfile'
/usr/local/share/lua/5.1/paths/init.lua:56: in function 'dofile'
/usr/local/share/lua/5.1/torch/init.lua:37: in function 'include'
/usr/local/share/lua/5.1/torch/init.lua:110: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/image/init.lua:32: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/js.lua:5: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/start.lua:6: in main chunk
[C]: at 0x00467ac0
[C]: at 0x00405990

After some "fixes":

luajit: cannot open /usr/local/share/lua/5.1/torchTensor.lua: No such file or directory
stack traceback:
[C]: in function 'dofile'
/usr/local/share/lua/5.1/torch/init.lua:37: in function 'include'
/usr/local/share/lua/5.1/torch/init.lua:110: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/image/init.lua:32: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/js.lua:5: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/gfx/start.lua:6: in main chunk
[C]: at 0x00467ac0
[C]: at 0x00405990

Is this even a gfx.js issue? th starts up fine (unless it try to give it -lgfx.start etc)

soumith commented 9 years ago

this all looks super-weird

soumith commented 9 years ago

i'm creating a docker instance now (first time) of torch + gfx.js lets see how this goes.

soumith commented 9 years ago

okay so I created a docker instance that is working with this buildfile: https://github.com/soumith/torch-docker

Looks like there's some RPATH setting that might have screwed up recently?

A simple solution for you right now is: export LD_LIBRARY_PATH=/usr/local/lib:/opt/OpenBLAS/lib:$LD_LIBRARY_PATH

I'm looking into fixing RPATH properly

soumith commented 9 years ago

this is fixed properly in the torch trunk now.

rolfvandam commented 9 years ago

The trunk fix worked for me. Thanks!

Issue #21 is still alive and well :(