viorik/extracunn

Installation Succeeds but require fails

Closed this issue · 3 comments

th> require 'extracunn'
/home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:384: /home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:384: ...e/arnabg/torch/install/share/lua/5.2/luarocks/loader.lua:117: error loading module 'libextracunn' from file '/home/arnabg/torch/install/lib/lua/5.2/libextracunn.so':
/home/arnabg/torch/install/lib/lua/5.2/libextracunn.so: undefined symbol: luaL_openlib
stack traceback:
/home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:501: in function </home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:494>
[C]: in function 'error'
/home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:384: in function 'require'
[string "_RESULT={require 'extracunn'}"]:1: in main chunk
[C]: in function 'xpcall'
/home/arnabg/torch/install/share/lua/5.2/trepl/init.lua:651: in function 'repl'
...nabg/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: in ?

Hi @arnabgho
I haven't encountered this error before. What os/configuration do you have?
I googled a bit and found a similar issue here, they seem to point to incompatible lua versions. I am using 5.1, but it would seem that you are using 5.2?

I am using Lua 5.2 on a Titan X GPU
The issue was solved by changing few lines in the Huber.cu file

//luaL_register(L,NULL, extracunn_Huber__);
lua_pushvalue(L, -1);
lua_setglobal(L, "extracunn_Huber__");

Ok, good to know, if anyone else using 5.2 encounters the same issue. Thanks.