Conversation
|
looks good to me. @andresy can you review and merge? |
|
I made these changed to this project only - and tested only on one system. On Thu, Dec 11, 2014 at 6:40 PM, Soumith Chintala notifications@github.com
|
points to my repository
points to my repository
my server in readme.md
| # endif | ||
|
|
||
| # if !defined LUA_LIB & !defined LUA_CORE & !defined luajit_c & !defined _LJ_ARCH_H & !defined _LJ_DEF_H & !defined _LJ_OBJ_H | ||
| # pragma comment( lib, "libluajit.lib") |
There was a problem hiding this comment.
I think it's better to use the linker options instead of #pragma.
There was a problem hiding this comment.
I odnt know what this pragma does, but concur with the comment by Ark-kun, if that's indeed what this does.
There was a problem hiding this comment.
@hughperkins this pragma just links with the library - but only in certain cases (if module is not a part of the 'core' itself). It can be moved to the options - if somebody will implement these conditions in CMake
| rocks_servers = { | ||
| [[https://raw.githubusercontent.com/torch/rocks/master]], | ||
| [[https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master]] | ||
| [[https://raw.githubusercontent.com/diz-vara/rocks/master]], |
There was a problem hiding this comment.
Not sure we want this in official torch distribution?
There was a problem hiding this comment.
@hughperkins Not for official, certainly! I keep my repo in the list for some windows-specific changes (eg in luaffifb, imgraph).
It would be OK to remove it - but we should check every rock in the official repo
|
|
||
| ```sh | ||
| git clone https://github.com/torch/luajit-rocks.git | ||
| git clone https://github.com/diz-vara/luajit-rocks.git |
There was a problem hiding this comment.
For purposes of PR, I think this should point to torch, rather than diz-vara.
| @@ -0,0 +1,38 @@ | |||
| build/*.* | |||
| build/luarocks/src/luarocks/site_config.lua | ||
| build/Makefile | ||
| build/LUA_DEV | ||
| bld07/* |
There was a problem hiding this comment.
bld07/ is non-standard :-) fine with it personally, but I reckon it'd be cleaner to remove it, on the hwole
| cmake -DCMAKE_INSTALL_PREFIX=/your/prefix -DWITH_LUAJIT21=ON -G "NMake Makefiles" -DWIN32=1 -P cmake_install.cmake | ||
| ``` | ||
|
|
||
| Under Windows - remember to update your environment variables. Assuming that your/prefix is d:/luainstall : |
There was a problem hiding this comment.
can we make this a variable, rahter than d:/luatinstall. eg %LUA_INSTALL%
| # ifndef LUA_WIN | ||
| # define LUA_WIN | ||
| # endif | ||
| # ifndef _WIN32 |
There was a problem hiding this comment.
would be cleaner to not mess wit hthe lua sourcecode I reckon? I think I'd prefer these in our CMakeLists perhaps?
| #endif | ||
| #else | ||
| #define LUA_API extern | ||
| #define LUA_API extern "C" |
There was a problem hiding this comment.
I dont think we should be messing around wit hthe original lua source code? We can simply add extern "C" in our own c++ header files?
#ifdef __cplusplus
extern "C"
#endif
#include "luaconf.h"
#ifdef __cplusplus
}
#endif
| def:write("luaopen_"..name:gsub("%.", "_").."\n") | ||
| def:close() | ||
| local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) | ||
| -- diz --- local ok = execute(variables.LD, "-dll", "-def:"..deffile, "-out:"..library, dir.path(variables.LUA_LIBDIR, variables.LUALIB), unpack(extras)) |
| } | ||
|
|
||
| rocks_servers = { | ||
| [[https://raw.githubusercontent.com/diz-vara/rocks/master]], |
There was a problem hiding this comment.
Prefer to remove this, for torch distribution
|
@diz-vara I've added comments to this PR, because I think I'd like to see this PR merged, and I reckon if we clean up the bits I've commented on, we can make a stronger case to Soumith to merge it. |
Several improvements for win64 installation:
tested with VS2013 x64 and rocks:
without any changes
paths
cwrap
torch
sys
nn
qtlua
xlua
with ';' changed to '&&' to separate build commands
optim
json
unsup
dp
gm