{"action":"created","issue":{"url":"https://api.github.com/repos/xinyadu/nqg/issues/20","repository_url":"https://api.github.com/repos/xinyadu/nqg","labels_url":"https://api.github.com/repos/xinyadu/nqg/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/xinyadu/nqg/issues/20/comments","events_url":"https://api.github.com/repos/xinyadu/nqg/issues/20/events","html_url":"https://github.com/xinyadu/nqg/issues/20","id":319090078,"node_id":"MDU6SXNzdWUzMTkwOTAwNzg=","number":20,"title":"how can i fix errors when run \"th convert.lua\"?","user":{"login":"r-baradaran","id":21004470,"node_id":"MDQ6VXNlcjIxMDA0NDcw","avatar_url":"https://avatars2.githubusercontent.com/u/21004470?v=4","gravatar_id":"","url":"https://api.github.com/users/r-baradaran","html_url":"https://github.com/r-baradaran","followers_url":"https://api.github.com/users/r-baradaran/followers","following_url":"https://api.github.com/users/r-baradaran/following{/other_user}","gists_url":"https://api.github.com/users/r-baradaran/gists{/gist_id}","starred_url":"https://api.github.com/users/r-baradaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-baradaran/subscriptions","organizations_url":"https://api.github.com/users/r-baradaran/orgs","repos_url":"https://api.github.com/users/r-baradaran/repos","events_url":"https://api.github.com/users/r-baradaran/events{/privacy}","received_events_url":"https://api.github.com/users/r-baradaran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-01T01:31:13Z","updated_at":"2018-11-28T16:37:48Z","closed_at":null,"author_association":"NONE","body":"**Hello!\r\nWhen i run this code received followed error:\r\n    \"th convert.lua\"**\r\n/    home/my/torch/install/bin/lua:                          /home/my/torch/install/share/lua/5.2/trepl/init.lua:389: module 'npy4th' not found:No   LuaRocks module found for npy4th\r\n\tno field package.preload['npy4th']\r\n\tno file '/home/my/.luarocks/share/lua/5.2/npy4th.lua'\r\n\tno file '/home/my/.luarocks/share/lua/5.2/npy4th/init.lua'\r\n\tno file '/home/my/torch/install/share/lua/5.2/npy4th.lua'\r\n\tno file '/home/my/torch/install/share/lua/5.2/npy4th/init.lua'\r\n\tno file '/home/my/code/torch/install/share/lua/5.2/npy4th.lua'\r\n\tno file '/home/my/code/torch/install/share/lua/5.2/npy4th/init.lua'\r\n\tno file '/home/my/code/torch/install/lib/lua/5.2/npy4th.lua'\r\n\tno file '/home/my/code/torch/install/lib/lua/5.2/npy4th/init.lua'\r\n\tno file './npy4th.lua'\r\n\tno file '/home/my/.luarocks/lib/lua/5.2/npy4th.so'\r\n\tno file '/home/my/torch/install/lib/lua/5.2/npy4th.so'\r\n\tno file '/home/my/torch/install/lib/npy4th.so'\r\n\tno file '/home/my/code/torch/install/lib/npy4th.so'\r\n\tno file '/home/my/code/.luarocks/lib/lua/5.2/npy4th.so'\r\n\tno file '/home/my/code/torch/install/lib/lua/5.2/npy4th.so'\r\n\tno file '/home/my/code/torch/install/lib/lua/5.2/loadall.so'\r\n\tno file './npy4th.so'\r\nstack traceback:\r\n\t[C]: in function 'error'\r\n\t/home/my/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require'\r\n\tconvert.lua:1: in main chunk\r\n\t[C]: in function 'dofile'\r\n\t...aran/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk\r\n\t[C]: in ?\r\n\r\n**Also i try to setup npy4th by this commands:\r\n\"git clone https://github.com/htwaijry/npy4th.git\r\ncd npy4th\r\nluarocks make\"**\r\n\r\n**but receive these errors:**\r\n\r\n\r\ncmake -E make_directory build;\r\ncd build;\r\ncmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=\"/home/my/torch/install/bin/..\" -DCMAKE_INSTALL_PREFIX=\"/home/my/torch/install/lib/luarocks/rocks/npy4th/1.3-3\"; \r\nmake\r\n   \r\n\"-- Found Torch7 in /home/my/torch/install\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/my/npy4th/build\r\n[ 50%] Built target cnpy\r\n[ 75%] Building CXX object CMakeFiles/npy4th.dir/npy4th.cpp.o\r\n/home/my/npy4th/npy4th.cpp: In function ‘void load_array_to_lua(lua_State*, cnpy::NpyArray&)’:\r\n/home/my/npy4th/npy4th.cpp:37:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.FloatTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:37:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.FloatTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:37:77: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.FloatTensor\"));\r\n                                                                             ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:43:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.DoubleTensor\"))\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:43:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.DoubleTensor\"))\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:43:78: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n      luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.DoubleTensor\"));\r\n                                                                             ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:50:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ByteTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:50:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ByteTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:50:76: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ByteTensor\"));\r\n                                                                            ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:56:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ShortTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:56:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ShortTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:56:77: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.ShortTensor\"));\r\n                                                                             ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:62:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.IntTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:62:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.IntTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:62:75: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.IntTensor\"));\r\n                                                                           ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:68:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.LongTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:68:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.LongTensor\"));\r\n                                 ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp:68:76: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]\r\n       luaT_pushudata(L, tensor, luaT_checktypename2id(L, \"torch.LongTensor\"));\r\n                                                                            ^\r\nIn file included from /home/my/npy4th/npy4th.cpp:12:0:\r\n/home/my/torch/install/include/luaT.h:132:38: note: declared here\r\n LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State *L, const \r\n                                      ^\r\n/home/my/npy4th/npy4th.cpp: At global scope:\r\n/home/my/npy4th/npy4th.cpp:213:1: error: elements of array ‘const luaL_reg npyth []’ have incomplete type\r\n };\r\n ^\r\n/home/my/npy4th/npy4th.cpp:213:1: error: storage size of ‘npyth’ isn’t known\r\n/home/my/npy4th/npy4th.cpp: In function ‘int luaopen_libnpy4th(lua_State*)’:\r\n/home/my/npy4th/npy4th.cpp:216:40: error: ‘luaL_openlib’ was not declared in this scope\r\n   luaL_openlib(L, \"libnpy4th\", npyth, 0);\r\n                                        ^\r\nCMakeFiles/npy4th.dir/build.make:62: recipe for target 'CMakeFiles/npy4th.dir/npy4th.cpp.o' failed\r\nmake[2]: *** [CMakeFiles/npy4th.dir/npy4th.cpp.o] Error 1\r\nCMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/npy4th.dir/all' failed\r\nmake[1]: *** [CMakeFiles/npy4th.dir/all] Error 2\r\nMakefile:127: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n\r\nError: Build error: Failed building.\"\r\n\r\n\r\nHow can I fix it and run this model?\r\nPlease help me.\r\nThanks very much.\r\n"},"comment":{"url":"https://api.github.com/repos/xinyadu/nqg/issues/comments/442514553","html_url":"https://github.com/xinyadu/nqg/issues/20#issuecomment-442514553","issue_url":"https://api.github.com/repos/xinyadu/nqg/issues/20","id":442514553,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjUxNDU1Mw==","user":{"login":"adrien-jacquot","id":45296023,"node_id":"MDQ6VXNlcjQ1Mjk2MDIz","avatar_url":"https://avatars3.githubusercontent.com/u/45296023?v=4","gravatar_id":"","url":"https://api.github.com/users/adrien-jacquot","html_url":"https://github.com/adrien-jacquot","followers_url":"https://api.github.com/users/adrien-jacquot/followers","following_url":"https://api.github.com/users/adrien-jacquot/following{/other_user}","gists_url":"https://api.github.com/users/adrien-jacquot/gists{/gist_id}","starred_url":"https://api.github.com/users/adrien-jacquot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrien-jacquot/subscriptions","organizations_url":"https://api.github.com/users/adrien-jacquot/orgs","repos_url":"https://api.github.com/users/adrien-jacquot/repos","events_url":"https://api.github.com/users/adrien-jacquot/events{/privacy}","received_events_url":"https://api.github.com/users/adrien-jacquot/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T16:37:48Z","updated_at":"2018-11-28T16:37:48Z","author_association":"NONE","body":"Facing the same issue, I tried both building npy4th from source and installing with luarocks:\r\n**Method 1**\r\n`git clone https://github.com/htwaijry/npy4th.git`\r\n`cd npy4th`\r\n`luarocks make`\r\n\r\n**Method 2**\r\n`luarocks install npy4th`\r\n\r\nGetting this error:\r\n\r\n/tmp/luarocks_npy4th-1.3-3-1149/npy4th/npy4th.cpp:213:1: error: elements of array ‘const luaL_reg npyth []’ have incomplete type\r\n };\r\n ^\r\n/tmp/luarocks_npy4th-1.3-3-1149/npy4th/npy4th.cpp:213:1: error: storage size of ‘npyth’ isn’t known\r\n/tmp/luarocks_npy4th-1.3-3-1149/npy4th/npy4th.cpp: In function ‘int luaopen_libnpy4th(lua_State*)’:\r\n/tmp/luarocks_npy4th-1.3-3-1149/npy4th/npy4th.cpp:216:40: error: ‘luaL_openlib’ was not declared in this scope\r\n   luaL_openlib(L, \"libnpy4th\", npyth, 0);\r\n                                        ^\r\nmake[2]: *** [CMakeFiles/npy4th.dir/npy4th.cpp.o] Error 1\r\nmake[1]: *** [CMakeFiles/npy4th.dir/all] Error 2\r\nmake: *** [all] Error 2\r\n\r\nError: Build error: Failed building."}}
{"actor":{"display_login":"adrien-jacquot"}}