{"action":"created","issue":{"url":"https://api.github.com/repos/soumith/torch-distro/issues/4","labels_url":"https://api.github.com/repos/soumith/torch-distro/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/soumith/torch-distro/issues/4/comments","events_url":"https://api.github.com/repos/soumith/torch-distro/issues/4/events","html_url":"https://github.com/soumith/torch-distro/issues/4","id":54007233,"number":4,"title":"require 'cunn' fails","user":{"login":"alexbw","id":161935,"avatar_url":"https://avatars.githubusercontent.com/u/161935?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbw","html_url":"https://github.com/alexbw","followers_url":"https://api.github.com/users/alexbw/followers","following_url":"https://api.github.com/users/alexbw/following{/other_user}","gists_url":"https://api.github.com/users/alexbw/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbw/subscriptions","organizations_url":"https://api.github.com/users/alexbw/orgs","repos_url":"https://api.github.com/users/alexbw/repos","events_url":"https://api.github.com/users/alexbw/events{/privacy}","received_events_url":"https://api.github.com/users/alexbw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-11T22:13:29Z","updated_at":"2015-01-11T22:37:59Z","closed_at":null,"body":"I'm on OS X 10.10\r\n\r\n```\r\nth> require 'nn'\r\ntrue\r\n                                                                      [0.0603s]\r\nth> require 'cunn'\r\n/usr/local/share/lua/5.1/trepl/init.lua:318: loop or previous error loading module 'cunn'\r\nstack traceback:\r\n\t[C]: in function 'error'\r\n\t/usr/local/share/lua/5.1/trepl/init.lua:318: in function 'require'\r\n\t[string \"require 'cunn'\"]:1: in main chunk\r\n\t[C]: in function 'xpcall'\r\n\t/usr/local/share/lua/5.1/trepl/init.lua:587: in function 'repl'\r\n\t/usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk\r\n\t[C]: at 0x010d8957b0\r\n                                                                      [0.1432s]\r\nth>\r\n```\r\n\r\nlooking deeper, seems to be an issue with the libcunn.so file\r\n\r\n```\r\nth> require 'libtorch'\r\n{\r\n  ceil : function: 0x0dd82c58\r\n  tan : function: 0x0dd82b90\r\n  test : function: 0x0dd9ca38\r\n  sinh : function: 0x0dd82b68\r\n  loadobj : function: 0x0dd75408\r\n... \r\n\r\nth> require 'libcunn'\r\n/usr/local/share/lua/5.1/trepl/init.lua:318: /usr/local/share/lua/5.1/luarocks/loader.lua:117: error loading module 'libcunn' from file '/usr/local/lib/lua/5.1/libcunn.so':\r\n\tdlopen(/usr/local/lib/lua/5.1/libcunn.so, 6): no suitable image found.  Did find:\r\n\t/usr/local/lib/lua/5.1/libcunn.so: malformed mach-o image: load command #23 length (0) too small in /usr/local/lib/lua/5.1/libcunn.so\r\nstack traceback:\r\n\t[C]: in function 'error'\r\n\t/usr/local/share/lua/5.1/trepl/init.lua:318: in function 'require'\r\n\t[string \"require 'libcunn'\"]:1: in main chunk\r\n\t[C]: in function 'xpcall'\r\n\t/usr/local/share/lua/5.1/trepl/init.lua:587: in function 'repl'\r\n\t/usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk\r\n\t[C]: at 0x010d8957b0\r\n```\r\n\r\nI've run into an issue like this before with installing libraries like OpenCV, which required some .so surgery, but I'm a Lua newbie, so I'm not sure exactly how to proceed. OS X 10.10.1, Retina MBP 15\".\r\n\r\nAny suggestions or further information for debugging required would be appreciated! Would love to get to the bottom of this."},"comment":{"url":"https://api.github.com/repos/soumith/torch-distro/issues/comments/69515401","html_url":"https://github.com/soumith/torch-distro/issues/4#issuecomment-69515401","issue_url":"https://api.github.com/repos/soumith/torch-distro/issues/4","id":69515401,"user":{"login":"alexbw","id":161935,"avatar_url":"https://avatars.githubusercontent.com/u/161935?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbw","html_url":"https://github.com/alexbw","followers_url":"https://api.github.com/users/alexbw/followers","following_url":"https://api.github.com/users/alexbw/following{/other_user}","gists_url":"https://api.github.com/users/alexbw/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbw/subscriptions","organizations_url":"https://api.github.com/users/alexbw/orgs","repos_url":"https://api.github.com/users/alexbw/repos","events_url":"https://api.github.com/users/alexbw/events{/privacy}","received_events_url":"https://api.github.com/users/alexbw/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T22:37:59Z","updated_at":"2015-01-11T22:37:59Z","body":"I'm at 3.1, installed via homebrew. The errors I posted above were built with that version."}}